Multilevel Models

The Effective Number of Clusters

Although cluster-robust standard errors (CRSEs) are very commonly used when analyzing nested/clustered data, there are many instances where they will not work properly (e.g., the type I error will be too high). I wrote about that in Educational and Psychological Measurement, When cluster-robust inferences fail. These problems can be brought about by analyzing data that have only a few clusters– though this can be an issue even with 100 clusters (see article). Other issues are present when: a) cluster sizes differ to a large extent and b) the dataset has only a few ‘treated’ higher level groups.

Feb 2, 2026

Accounting for random slopes using cluster robust standard errors

Including random slopes (when warranted) in multilevel models is necessary to avoid making Type I errors as a result of underestimated standard errors. We typically investigate the presence of random slopes (RS) by using a likelihood ratio test and comparing two competing models. Often, random slopes are included when we have cross level interactions. If a random intercept (RI) model is used when a random slope model is warranted, the regression coefficients will be the same though the standard errors will be incorrect.

Jan 6, 2026

When cluster-robust inferences fail

Although CRSEs are commonly-used, there are many instances where they can fail.

Nov 8, 2025

Accounting for random slopes using cluster-robust standard errors in multilevel models

Robust standard errors provide a convenient way to account for random slopes in multilevel models. They can also function as a diagnostic to test for the presence of random slopes.

Oct 8, 2025

Plausible Values as Predictors

Although the mixPV function was introduced as a way to analyze large scale assessments using multiple plausible values (PV), the function only works if the plausible values are used as the outcome (i.e., it is the Y variable or on the left hand side [LHS] of the equation). However, there are times when the PV is the predictor of interest. This still has to be analyzed properly (i.e., just don’t average all the values).

Jun 27, 2025

Working with missing data in large-scale assessments (without plausible values)

This is the syntax for accounting for missing data/imputing data with large scale assessments (without plausible values). This is Appendix A and accompanies the article: Huang, F., & Keller, B. (2025). Working with missing data in large-scale assessments. Large-scale Assessments in Education. doi: 10.1186/s40536-025-00248-9

Apr 17, 2025

Working with missing data in large-scale assessments (with plausible values)

This is the syntax for accounting for missing data/imputing data with large scale assessments (with plausible values). This accompanies the article: Huang, F., & Keller, B. (2025). Working with missing data in large-scale assessments. Large-scale Assessments in Education. doi: 10.1186/s40536-025-00248-9

Apr 17, 2025

Working with missing data in large-scale assessments

The article is open access. Additional syntax can also be seen here. An updated, corrected version of the article can be accessed here.

Apr 16, 2025

Reassessing weights in large-scale assessments and multilevel models

How to use weights when analyzing LSAs.

Mar 28, 2025

Cluster-robust standard errors with three-level data

Feb 1, 2025

Using plausible values when fitting multilevel models with large-scale assessment data using R

Article is open access. The mixPV function can now be accessed by installing the MLMusingR package.

Mar 1, 2024

Using robust standard errors for the analysis of binary outcomes with a small number of clusters

CR2 plug in for SPSS can be downloaded from: https://github.com/flh3/CR2

Jan 1, 2023

Practical multilevel modeling using R

Check out the latest info on the book here sample chapters additional code and an online appendix errata Some reviews: A major strength of this book is its accessibility. Huang effortlessly bridges the divide between the sometimes-abstruse literature on advanced statistics and the needs of applied researchers who lack extensive quantitative training. The result is an approachable text that covers all the basics, but also does not shy away from important advanced topics such as diagnostics, detecting and handling heteroscedasticity, and missing data handling methods. This book would make not only a useful guide to the application of multilevel modeling, but could also serve as an excellent companion text for a course on multilevel modeling. - Kristopher J. Preacher, Vanderbilt University

Jan 1, 2023

Accounting for heteroskedasticity resulting from between-group differences in multilevel models

Robust standard errors for multilevel models.

Jan 1, 2023

Using cluster-robust standard errors when analyzing group-randomized trials with few clusters

The SPSS version can be accessed here: https://github.com/flh3/CR2/tree/master/SPSS

Jan 1, 2022

Analyzing cross-sectionally clustered data using generalized estimating equations

As of 2024.10.03, the most read article on JEBS (for the last 6 months)! In the original paper draft, I had a section which showed how much more widely used mixed models (i.e., MLMs, HLMs) were compared to GEEs but was asked to remove that. I thought the usage was interesting so I am including it here:

Jan 1, 2022

Alternatives to logistic regression models when analyzing cluster randomized trials with binary outcomes

Linear probability models and modified Poisson regression models are good alternatives.

Jan 1, 2021

Multilevel modeling myths

Preprint available here.

Sep 1, 2018

Multilevel modeling and ordinary least squares regression: How comparable are they?

Jan 1, 2018

Alternatives to multilevel modeling for the analysis of clustered data

Researchers do not need an MLM necessarily to analyze clustered data.

Jan 1, 2016