r2_mlm: A command for computing R-squared measures for models fit by mixed
Anthony J. Gambino () and
D. Betsy McCoach ()
Additional contact information
Anthony J. Gambino: University of Connecticut
D. Betsy McCoach: Fordham University
Stata Journal, 2025, vol. 25, issue 4, 719-742
Abstract:
The article by Rights and Sterba (2023, Multivariate Behavioral Research 58: 340–367) provides a comprehensive framework for computing R2 measures for (linear) multilevel models. In this article, we introduce r2_mlm, a postestimation command for mixed that computes R2 measures using Rights and Sterba’s framework. We explain how this R2 framework works and demonstrate how r2_mlm can be used to compute various R2 measures for models fit by mixed. One of the most useful features of r2_mlm is that it will produce warning messages if the user specifies the model in a way that may lead to conflation bias (an easily overlooked issue). Finally, we walk through a simple example and explain how to interpret the various R2 measures.
Keywords: r2_mlm; mixed; multilevel modeling; explained variation; R2; conflation bias (search for similar items in EconPapers)
Date: 2025
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0789/
References: Add references at CitEc
Citations:
Downloads: (external link)
http://www.stata-journal.com/article.html?article=st0789 link to article purchase
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:25:y:2025:i:4:p:719-742
Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html
DOI: 10.1177/1536867X251398326
Access Statistics for this article
Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins
More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().