I have created a random intercept and slope model (lmer
) and need to inspect the covariances of the random effects to see which is significant.
I've seen that SAS outputs provide a 'covariance parameter estimates' table as part of the model summary - see section 'Output 56.2.6 Repeated Measures Analysis' of PROC MIXED
Is there a way of doing this (and obtaining p values for each covariance) in R?
Yes, you can find this in the output of the summary of your model:
x <- lm(formula)
y <- summary(x)
print(y$cov.unscaled)
From the documentation of ?summary
:
cov.unscaled a p x p matrix of (unscaled) covariances of the
coef[j], j=1, …, p
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With