mlmoderator: Probing, Plotting, and Interpreting Multilevel Interaction Effects

Provides a unified workflow for probing, plotting, and assessing the robustness of 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>. Includes a slope variance decomposition that separates fixed-effect uncertainty from random-slope variance (tau11), a contour surface plot of predicted outcomes over the full predictor-by-moderator space, and robustness diagnostics comprising intraclass correlation coefficient shift analysis and leave-one-cluster-out (LOCO) stability checks. Designed for researchers in education, psychology, biostatistics, epidemiology, organizational science, and other fields where outcomes are clustered within higher-level units.

Package details

AuthorSubir Hait [aut, cre] (ORCID: <https://orcid.org/0009-0004-9871-9677>)
MaintainerSubir Hait <haitsubi@msu.edu>
LicenseMIT + file LICENSE
Version0.2.1
URL https://github.com/causalfragility-lab/mlmoderator
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("mlmoderator")

Try the mlmoderator package in your browser

Any scripts or data that you put into this service are public.

mlmoderator documentation built on April 4, 2026, 1:07 a.m.