A collection of miscellaneous helper function for running multilevel/mixed models in 'lme4'. This package aims to provide functions to compute common tasks when estimating multilevel models such as computing the intraclass correlation and design effect, centering variables, estimating the proportion of variance explained at each level, pseudo-R squared, random intercept and slope reliabilities, tests for homogeneity of variance at level-1, and cluster robust and bootstrap standard errors. The tests and statistics reported in the package are from Raudenbush & Bryk (2002, ISBN:9780761919049), Hox et al. (2018, ISBN:9781138121362), and Snijders & Bosker (2012, ISBN:9781849202015).
A package of helper functions for multilevel models fit using the lme4
package
To install the latest development version directly from Github, type:
install.packages(“remotes”)
remotes::install_github(“lrocconi/mlmhelpr”)
boot_seCompute bootstrap standard errors and confidence intervals for fixed effects
centerAutomatically grand- or group-mean center variables and re-estimates the model
design_effectCalculate the design effect to determine if multilevel modeling is needed
hausmanPerform a Hausman test to test for differences between random- and fixed-effects models (experimental)
iccCalculate the intraclass correlation
ncv_testsComputes three different Non-constant variance tests (experimental)
plausible_valuesCompute the plausible value range for random effects
r2_corCalculate the squared correlation between the observed and predicted values
r2_pveCompute the proportion of variance explained for each random effect in the model
reliabilityCalculate reliability coefficients for random effects
robust_seComputes robust standard errors for lmer models
taucovCalculate correlation between random intercepts and slopes