levelCompare | R Documentation |
Uses AIC and BIC to compare whether the model that accounts for the correlation of responses within the same unit fits the data better than a model that assumes 0 correlation between responses within the same unit.
levelCompare(model)
model |
A linear mixed-effects model of class lmerMod or lmerModLmerTest |
Computes the AIC and BIC of the requested model and a model with the same predictors but absent the random intercept(s) and slope(s).
Burnham, K. P., & Anderson, D. R. (2004). Multimodel inference: understanding AIC and BIC in model selection. Sociological methods & research, 33(2), 261-304. Raftery, A. E. (1995). Bayesian model selection in social research. Sociological methodology, 111-163.
data(instruction) mod <- lme4::lmer(mathgain ~ (1 | classid), data = instruction) levelCompare(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.