Skip to Main Content
 
Translator disclaimer

ABSTRACT

Measuring the proportion of variance explained (R2) by a statistical model and the relative importance of specific predictors (semi-partial R2) can be essential considerations when building a parsimonious statistical model. The R2 statistic is a familiar summary of goodness-of-fit for normal linear models and has been extended in various ways to more general models. In particular, the generalized linear mixed model (GLMM) extends the normal linear model and is used to analyze correlated (hierarchical), non-normal data structures. Although various R2 statistics have been proposed, there is no consensus in statistical literature for the most sensible definition of R2 in this context. This research aims to build upon existing knowledge and definitions of R2 and to concisely define the statistic for the GLMM. Here, we derive a model and semi-partial R2 statistic for fixed (population) effects in the GLMM by utilizing the penalized quasi-likelihood estimation method based on linearization. We show that our proposed R2 statistic generalizes the widely used marginal R2 statistic introduced by Nakagawa and Schielzeth, demonstrate our statistics capability in model selection, show the utility of semi-partial R2 statistics in longitudinal data analysis, and provide software that computes the proposed R2 statistic along with semi-partial R2 for individual fixed effects. The software provided is adapted for both SAS and R programming languages.

Acknowledgments

Lloyd Edwards and Pranab Sen were supported by the National Center for Research Resources and the National Center for Advancing Translational Sciences, National Institutes of Health, through Grant Award Number UL1TR000083; Kalyan Das was supported by the Pranab K. Sen Distinguished Visiting Professorship, January 1–June 30, 2013.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Computation of Rβ2 in SAS and R

Proc Glimmix in SAS [30 SAS Institute Inc., Cary, NC, 2003. Available at http://www.sas.com/. [Google Scholar]] fits GLMMs using PQL as the default estimation technique. The procedure is based on a more general macro, %Glimmix, which applies the PQL algorithm by performing repeated calls to Proc Mixed. Our procedure to calculate Rβ2 in SAS utilizes this macro, saving output parameters from a full model contrast statement upon the convergent iteration of the PQL algorithm. The approximate F-statistic and denominator degrees of freedom from the pseudo linear mixed model are then used to compute Rβ2. The method outlined here is implemented in a SAS macro available in [18 B. Jaeger, Software in SAS and R to compute R2 for fixed effects in the linear and generalized linear mixed model. Available at https://github.com/bcjaeger/R2FixedEffectsGLMM/. [Google Scholar]].

The r2glmm package computes Rβ2 for the LMM using the Kenward-Roger approach as well as the method proposed by Nakagawa and Schielzeth [17 U. Halekoh and S. Højsgaard, A Kenward–Roger approximation and parametric bootstrap methods for tests in linear mixed models–the R package pbkrtest, J. Statist. Softw. 59 (2014), pp. 130, http://www.jstatsoft.org/v59/i09/. doi: 10.18637/jss.v059.i09[Crossref], [PubMed], [Web of Science ®] [Google Scholar]]. In addition to semi-partial R squared values, the package supplies confidence limits. As a note of caution, the authors of the pbkrtest package cannot guarantee that the results agree with other implementations of the Kenward–Roger approach. Therefore, it is highly encouraged to compare Rβ2 values calculated with R to corresponding calculations in SAS when performing inference. We recommend favoring results from SAS.

Login options

Purchase * Save for later
Online

Article Purchase 24 hours to view or download: USD 44.00 Add to cart

Issue Purchase 30 days to view or download: USD 429.00 Add to cart

* Local tax will be added as applicable