The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Finding interaction patterns

Hamid Bulut

2026-06-18

Overview

A common follow-up question is which strata depart most clearly from the additive expectation.

For this exploratory diagnostic, maihda() can compute the adjusted-model stratum random effects, intervals, and flags. When you use interactions = "BH", the flags use the Benjamini-Hochberg adjustment. The diagnostic is stored in the analysis object and can be reused by the effect-decomposition and predicted-strata plots.

Run a standard analysis and choose the multiplicity rule

The default is adjust = "none". This reports each stratum-level interval and flag without a multiple-testing correction.

If the goal is to scan all strata and highlight a smaller set for follow-up, use an adjustment such as Benjamini-Hochberg:

library(MAIHDA)
model_bh <- maihda(
  BMI ~ Age + Gender + Race + Education + (1 | Gender:Race:Education),
  data = maihda_health_data,
  interactions = "BH" # Benjamini-Hochberg adjustment
)

The printed output reports how many strata were flagged and which adjustment rule was used. The full table is stored in model_bh$interactions.

model_bh$interactions
#> Strata with credibly non-zero intersectional interaction
#> ========================================================
#> 
#> 1 of 50 strata flagged (95% interval; BH-adjusted p-values).
#> Model: adjusted (two-model); interaction on the link (latent) scale.
#> 
#>  stratum                       label   n interaction     se  lower upper
#>        8 male × White × Some College 328       1.359 0.3448 0.6836 2.035
#>    p_value p_adjusted flagged direction
#>  8.056e-05   0.004028    TRUE     above
#> 
#> Interaction BLUPs are shrunken (partially pooled) estimates; treat flags as
#>   exploratory. See ?maihda_interactions.

Each row is one stratum. The main columns are:

For frequentist fits, the table also includes the conditional standard error, p-value, and adjusted p-value when a correction is requested.

Highlight flagged strata

The plotting methods can reuse the stored diagnostic. Because model_bh was fitted with interactions = "BH", highlight_interactions = TRUE uses the Benjamini-Hochberg flags. In the effect-decomposition plot, the labels also follow that same flagged set.

plot(model_bh, type = "effect_decomp", highlight_interactions = TRUE)

The same flags can be reused in the predicted-strata view.

plot(model_bh, type = "predicted", highlight_interactions = TRUE)

If the analysis was fitted without a stored interaction diagnostic, pass the adjustment rule directly:

plot(model, type = "effect_decomp", highlight_interactions = "BH")

See also

References

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.