Which Groups Differ From Each Other

Use contrasts when the question is which levels or terms differ.

  • pairwise contrasts across grouped predictors
  • multiplicity-adjusted p-values where multiple contrasts are requested
contrasts <- associate$compare(
  data,
  outcome = demented,
  by = prs.tertile,
  covariates = c(sex, PCA),
  type = "contrast",
  contrast = "pairwise"
)

What comes back

Contrast rows such as Mid - Low, High - Low, and High - Mid, using the comparison summary schema.

Plotting

visualize$associations$forest(contrasts)
visualize$associations$heatmap(contrasts)

Open the comparison guide