[R-sig-ME] glmmPQL Question

Ben Bolker bbolker at gmail.com
Mon Jun 4 23:27:10 CEST 2012


John Michel <jwmichel at ...> writes:

>  I am working on some analyses in which I have a two level random
> effects model and a dichotomous dependent variable. I am using
> glmmPQL with family=binomial in my model command. I have calculated
> my models successfully; however, I am now trying to calculate my
> variance components. I have done a lot using the lme function and
> have used the following formula to estimate variance components:
 
> VarCorr(Model.1)
> GRPpdSymm(1)

> What is the syntax to get the variance components in glmmPQL? If
> this is not simple, I am assuming I could use lmer; however, I also
> cannot figure out how to get the variance components in lmer. In any
> even, I would appreciate any suggestions here.

  Did you try VarCorr() ??

 From ?glmmPQL:

x <- glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
  family = binomial, data = bacteria)

 VarCorr(x)
ID = pdLogChol(1) 
            Variance  StdDev   
(Intercept) 1.9898963 1.4106368
Residual    0.6084797 0.7800511

  You probably already know that the object returned by VarCorr()
has a slightly weird format.
 
 I don't know where your second line, GRPpdSymm(1) comes from??

  VarCorr() should work just fine on lmer objects too.

  Perhaps you can give a reproducible example of what you've tried/
what fails for you?
 
  Follow-ups should probably go to r-sig-mixed-models <at> r-project.org



More information about the R-sig-mixed-models mailing list