modelPerformance.merMod | R Documentation |
For pseudo R2 by cluster, the squared correlation between observed and predicted values for each cluster unit is returned. For the overall model, the marginal and conditional R2 are calculated as described in the references.
## S3 method for class 'merMod'
modelPerformance(object, ...)
object |
A model from |
... |
Additional arguments, not currently used. |
a named vector with the marginal and conditional R2 values,
if CLUSTER = FALSE
, otherwise, a data table with the pseudo R2
for each cluster unit.
A list with a data.table
with the following elements:
A character string indicating the model type, here merMod
A character string indicating whether the model was estimated with REML or ML
The number of observations
A character string indicating the number of unique units in each grouping/clustering variable.
Akaike Information Criterion
Bayesian Information Criterion
log likelihood
log likelihood degrees of freedom
Residual standard deviation
in sample variance explained by the fixed effects
in sample variance explained by the fixed and random effects
Cohen's F2 effect size R2 / (1 - R2) based off the Marginal R2
Cohen's F2 effect size R2 / (1 - R2) based off the Conditional R2
For estimating the marginal and conditional R-squared values, see: Nakagawa, S. and Schielzeth, H. (2013) <doi:10.1111/j.2041-210x.2012.00261.x> "A general and simple method for obtaining R2 from generalized linear mixed-effects models" and also: Johnson, P. C. (2014) <doi:10.1111/2041-210X.12225> "Extension of Nakagawa & Schielzeth's R2GLMM to random slopes models"
library(JWileymisc)
data(aces_daily, package = "JWileymisc")
m1 <- lme4::lmer(PosAff ~ 1 + (1 | UserID),
data = aces_daily)
modelPerformance(m1)
m1 <- lme4::lmer(PosAff ~ STRESS + (1 + STRESS | UserID),
data = aces_daily)
modelPerformance(m1)
rm(m1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.