[R-sig-ME] glmmPQL Question

Ben Bolker bbolker at gmail.com
Mon Jun 4 23:43:17 CEST 2012


On 12-06-04 05:38 PM, John Michel wrote:
> Ben


> I have always had an issue getting VarCorr to work with any program
> working from lme4. Here is the error message I get when I try to
> calculate the VarCorr

>> VarCorr(Model.A2)
> Error in VarCorr(Model.A2) : error in evaluating the argument 'x' in
> selecting a method for function 'VarCorr'
> 
> Thanks for any additional suggestions you have for me...
> 
> John

  Do you have nlme loaded at the same time?  Does VarCorr() work if you
detach("package:nlme")? What is the result of sessionInfo()? I can't
quite reproduce your error, but if I load nlme after lme4 I can get

Error in UseMethod("VarCorr") :
  no applicable method for 'VarCorr' applied to an object of class "mer"
> 
> 
> 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? 
> ---------------------------------------------------------- John W.
> Michel, Ph.D. Assistant Professor of Management Sellinger School of
> Business & Management Loyola University Maryland 4501 N. Charles
> Street Baltimore, MD 21201 jwmichel at loyola.edu



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