Whether The Association Differs Between Groups
Use a heterogeneity comparison when you want to test whether an association differs by a modifier.
- classical models: interaction-style comparison
- survival heterogeneity: comparison workflow, not
split.by
het <- associate$compare(
data,
outcome = demented,
predictors = PRS,
covariates = c(age, PCA),
by = sex,
type = "heterogeneity"
)What comes back
Comparison rows describing the heterogeneity test. The key result is the test statistic and p-value for effect modification.
Plotting
Comparison forest or heatmap views once comparison rows are available.