Formats output of lx_ppc() for a single model and a cohort set into a
one-sheet spreadsheet summary.
The renderer keeps one row per subgroup and packs component metrics into two
df-columns (raw_p_public and raw_p_private).
Tail diagnostics and CRPS receive background fills to help scan for problematic rows.
Arguments
- summary
Output of
lx_ppc()when called withcohortsas acohort_set.- wb
Optional
openxlsxworkbook to append to.- sheet_name
Sheet name to write into. If
NULL, uses metadata fieldexperimentfromsummary(if available), otherwise"PPC".
Examples
if (FALSE) { # \dontrun{
cohort_set <- example_srv_lx |>
g6tr.cohorts::create_cohort_set(
id_col = response_id,
grp_cols = c(d_gender),
weight_col = weight
)
ppc <- lx_ppc(example_lx_model, cohorts = cohort_set)
wb <- lx_ppc_render(ppc)
} # }