Constructs a publication-quality gt table summarizing subgroup
identification and classification rates across one or more data generation
scenarios and analysis methods. The layout mirrors Table 4 of
Leon et al. (2024) with metrics grouped by model scenario (null / alt)
and columns for each analysis method.
build_classification_table(
scenario_results,
analyses = NULL,
digits = 2,
title = "Subgroup Identification and Classification Rates",
n_sims = NULL,
bold_threshold = 0.05,
font_size = 12
)A gt table object.
Named list. Each element is itself a list with:
data.table from
run_simulation_analysis.
Character scenario label, e.g., "M1".
Integer sample size.
DGM object (for true HRs and subgroup prevalence).
Character: "null" or "alt".
Character vector of analysis labels to include
(e.g., c("FS", "FSlg", "GRF")). When NULL, all unique
values of results$analysis across scenarios are used.
Integer. Decimal places for proportions. Default: 2.
Character. Table title. Default:
"Subgroup Identification and Classification Rates".
Integer. Number of simulations (for subtitle). Default:
NULL.
Numeric. Type I error threshold above which the
any(H) value is shown in bold. Set NULL to disable.
Default: 0.05.
Numeric. Font size in pixels for table text. Default: 12. Increase to 14 or 16 for larger display.
For each scenario the function computes:
any(H): Proportion of simulations identifying any subgroup.
sens(H): Mean sensitivity (only under alternative).
sens(Hc): Mean specificity.
ppv(H): Mean positive predictive value (only under
alternative).
ppv(Hc): Mean negative predictive value.
avg|H|: Mean size of identified subgroup (when found).
Under the null hypothesis the rows are reduced to any(H),
sens(Hc), ppv(Hc), and avg|H|.
format_oc_results,
summarize_simulation_results