mlmoderator: Probing, Plotting, and Interpreting Multilevel Interaction Effects

Provides a workflow for probing, plotting, and checking cross-level interaction effects in two-level mixed-effects models fitted with 'lme4' (Bates et al., 2015) <doi:10.18637/jss.v067.i01>. Implements simple slopes analysis following Aiken and West (1991, ISBN:9780761907121), Johnson-Neyman intervals following Johnson and Fay (1950) <doi:10.1007/BF02288864> and Bauer and Curran (2005) <doi:10.1207/s15327906mbr4003_5>, and grand- or group-mean centering as described in Enders and Tofighi (2007) <doi:10.1037/1082-989X.12.2.121>. Tests and intervals use Satterthwaite degrees of freedom via 'lmerTest' (Kuznetsova et al., 2017) <doi:10.18637/jss.v082.i13> by default, with Kenward-Roger and between-cluster alternatives. Also provides confidence and new-cluster prediction intervals for simple slopes in random-slope models, contour plots of predicted outcomes over the predictor-by-moderator space, and leave-one-cluster-out influence diagnostics for the interaction.

Version: 0.3.0
Depends: R (≥ 4.1.0)
Imports: lme4, lmerTest (≥ 3.1-0), ggplot2, stats, utils, grDevices, rlang
Suggests: testthat (≥ 3.0.0), dplyr, tibble, knitr, rmarkdown, patchwork, pbkrtest, emmeans, mlmRev
Published: 2026-09-30
DOI: 10.32614/CRAN.package.mlmoderator
Author: Subir Hait ORCID iD [aut, cre]
Maintainer: Subir Hait <haitsubi at msu.edu>
BugReports: https://github.com/subirhait/mlmoderator/issues
License: MIT + file LICENSE
URL: https://github.com/subirhait/mlmoderator
NeedsCompilation: no
Language: en-US
Materials: README, NEWS
CRAN checks: mlmoderator results

Documentation:

Reference manual: mlmoderator.html , mlmoderator.pdf
Vignettes: Cross-Level Interaction Workflow (source, R code)
Getting Started with mlmoderator (source, R code)
A complete workflow with real data (source, R code)

Downloads:

Package source: mlmoderator_0.3.0.tar.gz
Windows binaries: r-devel: mlmoderator_0.3.0.zip, r-release: mlmoderator_0.2.1.zip, r-oldrel: mlmoderator_0.2.1.zip
macOS binaries: r-release (arm64): mlmoderator_0.2.1.tgz, r-oldrel (arm64): mlmoderator_0.2.1.tgz, r-release (x86_64): mlmoderator_0.3.0.tgz, r-oldrel (x86_64): mlmoderator_0.3.0.tgz
Old sources: mlmoderator archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=mlmoderator to link to this page.