[R] code for mixed model in R?

jurgen_vercauteren jurgen_vercauteren at hotmail.com
Fri Feb 24 12:36:20 CET 2012


Dear

I am analysing my data wit a mixed model. I used SAS but I want to redo the
same analysis in R. Here the SAS code and what I wrote in R. It seems to
work but the results are not the same. I don't know how to specify the class
variable in R or specify the variance matrix. Can you please help me?

Thanks
Jurgen

## SAS:
proc glimmix data=trend method=RSPL;
   class pid;
   model mdrfinal (event = '1') = time therapy comment / dist=binary
link=logit solution cl;
   random intercept / subject=pid type=un;
run;

## R:
model_GLMM<- glmmPQL(mdrfinal ~ time + therapy + comment, data = data,
family = binomial, random = ~1| time)
summary(model_GLMM) 

--
View this message in context: http://r.789695.n4.nabble.com/code-for-mixed-model-in-R-tp4416915p4416915.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list