Pub. online:26 Mar 2026Type:Computing In Data ScienceOpen Access
Journal:Journal of Data Science
Volume 24, Issue 2 (2026): Special Issue: The 2025 Symposium on Data Science and Statistics (SDSS 2025),, pp. 455–475
Abstract
Hierarchical linear mixed models are commonly used in many scientific fields. However, without a strong statistical background, it can be hard to understand the relationships between the random effect variables and the inferences that can be made when a model has nested random effects. Visualizing relationships makes it easier for the practitioner to understand what relationships the model is capable of estimating and testing. We present an R package modeldiagramR that seamlessly creates a visualization of the model based on the data and the model object created when fitting a linear mixed model using either lme4 or nlme.