[R-sig-ME] glmmPQL inquiry

kennedy otwombe notwombe at yahoo.com
Thu Dec 6 21:33:31 CET 2007


Dear R users,

I have longitudinal data that is all binary and i have run it in SAS using the following code without a problem:

proc glimmix data=navs;
class id;
model y(event='1')=x1 x2 x3/solution distribution=binary;
random intercept/subject=id type=cs;
run;

I have also written a code in R for the same analysis but i am getting the following error message (iteration 1
Error in switch(mode(x), "NULL" = structure(NULL, class = "formula"),  : 
  invalid formula). 

My code in R reads as follows:

>fit<-glmmPQL(y~x1+x2+x3, random=~1|id, family=binomial, data=navs)
>summary(fit)

I am not sure where the problem lies but i realise that glmmPQL does not seem to cater for binary distributions and i aint sure how to model the probability of the event Y=1 which is my interest in the data i am assuming. My data looks as follows:

  t id y x0 x1 x2 x3
  1  1 0  0  0  1  1
  2  1 0  0  1  0  1
  3  1 0  0  1  0  1
  1  2 0  0  0  1  0
  2  2 0  1  1  1  0
  3  2 0  1  1  1  0

I will appreciate any ideas from this network.

 
Kennedy.N.Otwombe
School of Statistics & Actuarial Science 
University of the Witwatersrand 
Private Bag 3 
Wits 2050 
Johannesburg 
South Africa


      ____________________________________________________________________________________
Looking for last minute shopping deals?




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