MyNixOS website logo
Description

Regularized Bayesian Estimator for Two-Level Latent Variable Models.

Implements a regularized Bayesian estimator that optimizes the estimation of between-group coefficients for multilevel latent variable models by minimizing mean squared error (MSE) and balancing variance and bias. The package provides more reliable estimates in scenarios with limited data, offering a robust solution for accurate parameter estimation in two-level latent variable models. It is designed for researchers in psychology, education, and related fields who face challenges in estimating between-group effects under small sample sizes and low intraclass correlation coefficients. Dashuk et al. (2024) <doi:10.13140/RG.2.2.18148.39048> derived the optimal regularized Bayesian estimator; Dashuk et al. (2024) <doi:10.13140/RG.2.2.34350.01604> extended it to the multivariate case; and Luedtke et al. (2008) <doi:10.1037/a0012869> formalized the two-level latent variable framework.

MultiLevelOptimalBayes

MultiLevelOptimalBayes (MLOB) R badge

MLOB is an R package for estimating between-group effects in multilevel latent variable models using an optimally regularized Bayesian estimator. It is especially useful for small-sample settings, low ICC data, and hierarchical models commonly used in psychology, education, and social sciences.


Features

  • Regularized Bayesian estimator optimized for minimum mean squared error (MSE)
  • Robust to small sample sizes and low intraclass correlation (ICC)
  • Supports covariate adjustment and group-level balancing
  • Optional jackknife resampling for improved CI coverage
  • Returns full inferential output: point estimates, standard errors, p-values, and confidence intervals
  • Clean and user-friendly interface via the mlob() function

Installation

To install the development version from GitHub:

install.packages("devtools")
devtools::install_github("MLOB-dev/MLOB")

MLOB is available on CRAN under the GPL-3 license. To install the released version:

install.packages("MultiLevelOptimalBayes")

View the Vignette

After installing the package, run the following to open the introductory vignette:

vignette("MultiLevelOptimalBayes-Intro")

Examples

library(MultiLevelOptimalBayes)

Fit a model on the iris dataset

result <- mlob(Sepal.Length ~ Sepal.Width + Petal.Length, data = iris,
group = "Species", conf.level = 0.95)

View results

summary(result)

Limitations

-The estimator assumes approximately equal group sizes. Although balancing helps, unequal sizes may still bias results.

  • Grid-search is local around the ML estimate; global optimum is found with high probability but is not guaranteed.

  • Jackknife resampling improves inference in small samples but can be computationally heavy in larger samples.

  • Currently supports two-level models with continuous outcomes only. Extensions to GLMMs or 3+ level models are future work.

Contributing & Support

Please open an issue at:

https://github.com/MLOB-dev/MLOB/issues

Users may also join discussions or suggest enhancements on the Discussions page at

https://github.com/MLOB-dev/MLOB/discussions.

Authors

Valerii Dashuk

Binayak Timilsina

Martin Hecht

Steffen Zitzmann

Citation

If you use MLOB in your research, please cite:

Dashuk, V., Hecht, M., Luedtke, O., Robitzsch, A., & Zitzmann, S. (2024). An Optimally Regularized Estimator of Multilevel Latent Variable Models, with Improved MSE Performance https://doi.org/10.13140/RG.2.2.18148.39048

Contact:

[email protected]

[email protected]

[email protected].

Metadata

Version

0.0.2.0

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows