Creates summary tables from MRCT simulation results using the gt package. Summarizes hazard ratio estimates, subgroup identification rates, and classification of identified subgroups. Optionally displays two scenarios (e.g., alternative and null hypotheses) side by side.
summaryout_mrct(
pop_summary = NULL,
mrct_sims,
mrct_sims_null = NULL,
scenario_labels = c("Alternative", "Null"),
pop_summary_null = NULL,
sg_type = 1,
tab_caption = "Identified subgroups and estimation summaries",
digits = 3,
trim_threshold = 1000,
trim_fraction = 0.01,
table_width = 600,
font_size = 11,
showtable = TRUE
)List with components:
List of summary statistics from population. When
dual-scenario, contains res_alt and res_null.
Formatted gt table object, or data.frame if gt is unavailable.
Processed mrct_sims data.table with derived variables.
When dual-scenario, also contains data_null.
Data frame of computed summary statistics.
List. Population summary from large sample approximation (optional). Default: NULL
data.table. Simulation results from
mrct_region_sims (first / primary scenario).
data.table. Optional second set of simulation results (e.g., null hypothesis). When supplied, the table displays two value columns side by side. Default: NULL (single-scenario table).
Character vector of length 2. Column headers for the
two scenarios. Only used when mrct_sims_null is supplied.
Default: c("Alternative", "Null").
List. Population summary for the null scenario (optional). Default: NULL
Integer. Type of subgroup summary: 1 = basic summary (found, biomarker, age); 2 = extended summary (all subgroup types). Default: 1
Character. Caption for the output table. Default: "Identified subgroups and estimation summaries"
Integer. Number of decimal places for numeric summaries. Default: 3
Numeric. When the raw mean of a metric exceeds this
value in absolute terms, the summary switches to a symmetrically trimmed
mean and SD (excluding the lower and upper trim_fraction of
observations). Trimmed values are marked with * and a footnote is
added to the table. Set to NULL to disable trimming entirely.
Default: 1000.
Numeric between 0 and 0.5. Fraction of observations to trim from each tail when trimming is triggered. Default: 0.01 (1 percent from each tail, i.e., the central 98 percent of values).
Numeric. Total table width in pixels. Column widths are allocated proportionally. Increase for HTML/wide displays (e.g., 750), decrease for beamer slides (e.g., 550). Default: 600.
Numeric. Base font size in pixels. Title is
font_size + 2, subtitle matches base. Reduce for beamer
(e.g., 9 or 10). Default: 11.
Logical. Print the table. Default: TRUE
mrct_region_sims for generating simulation results