Reputation: 71
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?
Upvotes: 5
Views: 1476
Reputation: 2170
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
.
Upvotes: 2