hlmLab: Hierarchical Linear Modeling with Visualization and Decomposition

Provides functions for visualization and decomposition in hierarchical linear models (HLM) for applications in education, psychology, and the social sciences. Includes variance decomposition for two-level and three-level data structures following Snijders and Bosker (2012, ISBN:9781849202015), intraclass correlation (ICC) estimation and design effect computation as described in Shrout and Fleiss (1979) <doi:10.1037/0033-2909.86.2.420>, and contextual effect decomposition via the Mundlak (1978) <doi:10.2307/1913646> specification distinguishing within- and between-cluster components, with the uncertainty of the contextual contrast obtained from the full fixed-effect covariance matrix. Teaching displays cover simulated intraclass correlations, partial pooling of cluster means, random-slope heterogeneity, and cross-level interaction with an observed Level-2 moderator, following Hofmann and Gavin (1998) <doi:10.1177/014920639802400504> and Hamaker and Muthen (2020) <doi:10.1037/met0000239>. Multilevel models are estimated using 'lme4' (Bates et al., 2015 <doi:10.18637/jss.v067.i01>). An optional 'Shiny' application enables interactive exploration of model components and parameter variation. The implementation follows the multilevel modeling framework of Raudenbush and Bryk (2002, ISBN:9780761919049).

Version: 0.2.0
Depends: R (≥ 4.1.0)
Imports: dplyr, ggplot2 (≥ 3.4.0), grDevices, grid, lme4, scales, stats
Suggests: shiny, spelling, testthat (≥ 3.0.0)
Published: 2026-09-28
DOI: 10.32614/CRAN.package.hlmLab
Author: Subir Hait ORCID iD [aut, cre]
Maintainer: Subir Hait <haitsubi at msu.edu>
BugReports: https://github.com/subirhait/hlmLab/issues
License: MIT + file LICENSE
URL: https://github.com/subirhait/hlmLab
NeedsCompilation: no
Language: en-US
Materials: README, NEWS
CRAN checks: hlmLab results

Documentation:

Reference manual: hlmLab.html , hlmLab.pdf

Downloads:

Package source: hlmLab_0.2.0.tar.gz
Windows binaries: r-devel: hlmLab_0.1.0.zip, r-release: hlmLab_0.1.0.zip, r-oldrel: hlmLab_0.1.0.zip
macOS binaries: r-release (arm64): hlmLab_0.2.0.tgz, r-oldrel (arm64): hlmLab_0.2.0.tgz, r-release (x86_64): hlmLab_0.2.0.tgz, r-oldrel (x86_64): hlmLab_0.2.0.tgz
Old sources: hlmLab archive

Linking:

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