Creates forest plots showing treatment effects across different patient subgroups. This function performs subgroup analysis for clinical trials and observational studies, calculating treatment effects within patient subgroups and testing for interactions. Supports survival (time-to-event), binary, and continuous outcomes.
Clinical Applications:
Identify patient subgroups with differential treatment benefit
Test for treatment-by-subgroup interactions
Guide personalized treatment decisions
Explore heterogeneity in treatment effects
Statistical Methods:
Survival outcomes: Cox proportional hazards models (Hazard Ratios)
Binary outcomes: Logistic regression (Odds Ratios, Risk Ratios)
Continuous outcomes: Linear regression (Mean Differences)
Interaction testing: Likelihood ratio tests
Details
Effect Measures by Outcome Type:
Survival Outcomes:
Hazard Ratio (HR): Compares hazard rates between treatment groups
HR > 1: Increased hazard (worse outcome) with treatment
HR < 1: Decreased hazard (better outcome) with treatment
Binary Outcomes:
Odds Ratio (OR): Compares odds of outcome between groups
Risk Ratio (RR): Compares probability of outcome between groups
OR/RR > 1: Higher risk with treatment
OR/RR < 1: Lower risk with treatment
Continuous Outcomes:
Mean Difference (MD): Difference in means between groups
MD > 0: Higher values with treatment
MD < 0: Lower values with treatment
Interaction Testing: Tests whether treatment effect varies significantly across subgroups using likelihood ratio tests comparing models with and without interaction terms.
Sample Size Requirements:
Minimum 5 patients per subgroup for analysis
Larger samples recommended for stable estimates
Consider multiple comparison adjustments for many subgroups
Super classes
jmvcore::Analysis
-> ClinicoPath::subgroupforestBase
-> subgroupforestClass
Methods
Inherited methods
jmvcore::Analysis$.createImage()
jmvcore::Analysis$.createImages()
jmvcore::Analysis$.createPlotObject()
jmvcore::Analysis$.load()
jmvcore::Analysis$.render()
jmvcore::Analysis$.save()
jmvcore::Analysis$.savePart()
jmvcore::Analysis$.setCheckpoint()
jmvcore::Analysis$.setParent()
jmvcore::Analysis$.setReadDatasetHeaderSource()
jmvcore::Analysis$.setReadDatasetSource()
jmvcore::Analysis$.setResourcesPathSource()
jmvcore::Analysis$.setStatePathSource()
jmvcore::Analysis$addAddon()
jmvcore::Analysis$asProtoBuf()
jmvcore::Analysis$asSource()
jmvcore::Analysis$check()
jmvcore::Analysis$init()
jmvcore::Analysis$optionsChangedHandler()
jmvcore::Analysis$postInit()
jmvcore::Analysis$print()
jmvcore::Analysis$readDataset()
jmvcore::Analysis$run()
jmvcore::Analysis$serialize()
jmvcore::Analysis$setError()
jmvcore::Analysis$setStatus()
jmvcore::Analysis$translate()
ClinicoPath::subgroupforestBase$initialize()
Examples
# \donttest{
# Survival outcome subgroup analysis
subgroupforest(
data = clinical_trial,
outcome = "time_to_event",
treatment = "treatment_arm",
subgroups = c("age_group", "gender", "stage"),
time = "time_to_event",
event = "event_occurred",
outcomeType = "survival",
effectMeasure = "hr"
)
#> Error: object 'clinical_trial' not found
# Binary outcome analysis
subgroupforest(
data = study_data,
outcome = "response",
treatment = "intervention",
subgroups = c("age_category", "sex"),
outcomeType = "binary",
effectMeasure = "or"
)
#> Error: object 'study_data' not found
# }