Package: mlmoderator 0.3.0.9000

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.

Authors:Subir Hait [aut, cre]

mlmoderator_0.3.0.9000.tar.gz
mlmoderator_0.3.0.9000.zip(r-4.7-any)mlmoderator_0.3.0.9000.zip(r-4.6-any)mlmoderator_0.3.0.9000.zip(r-4.5-any)
mlmoderator_0.3.0.9000.tgz(r-4.6-any)mlmoderator_0.3.0.9000.tgz(r-4.5-any)
mlmoderator_0.3.0.9000.tar.gz(r-4.7-any)mlmoderator_0.3.0.9000.tar.gz(r-4.6-any)
mlmoderator_0.3.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
mlmoderator/json (API)

# Install 'mlmoderator' in R:
install.packages('mlmoderator', repos = c('https://subirhait.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/subirhait/mlmoderator/issues

Datasets:

On CRAN:

Conda:

4.78 score 370 downloads 8 exports 32 dependencies

Last updated from:1d5794a74d. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK151
source / vignettesOK196
linux-releaseOK175
macos-releaseOK223
macos-oldrelOK228
windows-develOK87
windows-releaseOK157
windows-oldrelOK113
wasm-releaseOK108

Exports:mlm_centermlm_jnmlm_plotmlm_probemlm_sensitivitymlm_summarymlm_surfacemlm_variance_decomp

Dependencies:bootclicpp11farverggplot2gluegtableisobandlabelinglatticelifecyclelme4lmerTestMASSMatrixminqanlmenloptrnumDerivR6rbibutilsRColorBrewerRcppRcppEigenRdpackreformulasrlangS7scalesvctrsviridisLitewithr

A complete workflow with real data: SES and school context in High School and Beyond
Model | Probing the interaction | Plots | How much do school slopes vary beyond the moderator? | Is the interaction driven by a few schools? | What this workflow does not do | Reference

Last update: 2026-10-07
Started: 2026-10-07

Cross-Level Interaction Workflow
What is a cross-level interaction? | Setup | Centering strategy for cross-level interactions | Fit the random-slopes model | Probe simple slopes | Johnson–Neyman region | Visualise | Full summary for reporting | Reporting guidance | Assumptions to check

Last update: 2026-03-19
Started: 2026-03-19

Getting Started with mlmoderator
Overview | The built-in dataset | Step 1: Center variables | Step 2: Fit the model | Step 3: Probe simple slopes | Step 4: Johnson–Neyman interval | Step 5: Plot the interaction | Step 6: Full summary report | Tips

Last update: 2026-03-19
Started: 2026-03-19