Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Covariance parameter estimates table in R

Tags:

r

covariance

lme4

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?

like image 490
OCT Avatar asked Oct 29 '22 02:10

OCT


1 Answers

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.

like image 172
JAD Avatar answered Nov 15 '22 05:11

JAD