MultiLevelOptimalBayes (MLOB): An R package for Regularized Bayesian Estimation of Multilevel Latent Variable Models with Covariates
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
We introduce MultiLevelOptimalBayes (MLOB), an R package for estimating between-groupeffects in multilevel latent variable models. MLOB implements a regularized Bayesianestimator developed by Dashuk, Hecht, Lüdtke, Robitzsch, and Zitzmann (2024), andextended to models with covariates (Dashuk, Hecht, Lüdtke, Robitzsch, and Zitzmann2025a). This estimator selects prior parameters to minimize the mean squared error(MSE) of the between-group effect by optimally balancing bias and variance. Leveragingthis bias-variance trade-off, the regularized Bayesian estimator yields robust andstable results—even in small-sample settings or when intraclass correlations (ICCs) arelow. For practical use, MLOB supports unbalanced group sizes through built-in balancingprocedures and offers comprehensive inference, including estimates, standard errors,p values, and confidence intervals for both target predictors and covariates. To providecontext, we first review the theoretical underpinnings of the regularized Bayesian estimator(Dashuk et al. 2024, 2025a), followed by a description of its implementation in MLOB,focusing on the core function mlob(). We demonstrate its application using real-worlddatasets. Ultimately, MLOB equips researchers in psychology, the education sciences, andrelated fields with a robust and accessible tool for estimating multilevel latent variablemodels—especially under small-sample conditions and low ICCs. We expect that MLOBwill advance robust and reproducible multilevel modeling in psychology, education, andbeyond.