[R] glmmPQL and variance structure

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Sat Jan 7 12:07:20 CET 2006


Dear listers,

On the line of a last (unanswered) question about glmmPQL() of the 
library MASS, I am still wondering if it is possible to pass a variance 
structure object  to the call to lme() within the functions (e.g. 
weights=varPower(1), etc...). The current weights argument of glmmPQL is 
actually used for a call to glm -and not for lme). I have tried to go 
through the code, and gathered that the variance structure passed to the 
call to lme()  was:

mcall$weights <- quote(varFixed(~invwt))

and this cannot be modified by and argument of glmmPQL().

I have tried to modify the script a bit wildly  and changed varFixed 
into VarPower(~1), in a glmmPQL2 function. I get the following error:

 > glmmPQL2(y ~ trt + I(week > 2), random = ~ 1 | ID,
+ family = binomial, data = bacteria)
iteration 1
Error in unlist(x, recursive, use.names) :
        argument not a list

I get the same error whatever the change in variance structure on this line.

Beyond this I wonder why variance structure cannot be passed to lme via 
glmmPQL...

Any idea?

Patrick Giraudoux




More information about the R-help mailing list