
Create a Summary of Marginal Subgroup Treatment Effects
Source:R/summary_subgroup_effects.R
summary_subgroup_effects.RdThis function orchestrates calls to estimate_subgroup_effects to generate
a summary table for specific subgroups.
Usage
summary_subgroup_effects(
brms_fit,
trt_var = NULL,
response_type = NULL,
subgroup_vars = "auto"
)Arguments
- brms_fit
A
brmsfitobject. Fitted model object fromfit_brms_model()orrun_brms_analysis(). Must contain the necessary attributes for extracting treatment variable and response type information.- trt_var
A character string or
NULL. Treatment variable name (coded 0/1). IfNULL, automatically extracted from model attributes (set byfit_brms_model()). This should match the treatment variable used in model fitting.- response_type
A character string or
NULL. Outcome type, one of"binary","count","continuous", or"survival". IfNULL, automatically extracted from model attributes (set byfit_brms_model()). This determines the appropriate scale for summarizing effects.- subgroup_vars
A character vector or
"auto". Subgrouping variable names for which to generate summaries. Defaults to"auto", which automatically detects treatment interactions from all formula components (unshrunktermeffect,shprogeffect,shpredeffect). Cannot beNULL.