[R-sig-ME] different output in R and SAS for GLMM

Steve Denham stevedrd at yahoo.com
Tue Dec 29 12:14:33 CET 2015


In your SAS code, try adding the option DDFM=none to the model statement to get the asymptotic estimates.  Additionally, you probably need to change the method SAS is using to fit the model.  Your current code uses the default pseudo-likelihood method.  Try METHOD=laplace in the PROC GLIMMIX statement. Steve Denham Director, Biostatistics MPI Research, Inc.
 

 
      From: Adeela Munawar <adeela.uaf at gmail.com>
 To: R-sig-mixed-models at r-project.org 
 Sent: Monday, December 28, 2015 11:56 PM
 Subject: [R-sig-ME] different output in R and SAS for GLMM
   
Dear all,

I am comparing the output of SAS and R for generalized linear mixed models
with gamma family. Code for SAS are

proc glimmix data=ch12_ex1 plot=residualpanel(ilink) noprofile;
 class block a b;
 model days=a|b / d=gamma;
 random intercept a/subject=block;
 lsmeans a*b / slicediff=(a b) ilink cl;
 covtest /cl(type=plr);

while I am fitting this using lme4 package as
a<-factor(a)
b<-factor(b)
block<-factor(block)

ModelGamma <- glmer(days~a*b+(1|block/a),family=Gamma(link = "log"))
 lsmeans(ModelGamma,~a*b)

but the results are altogether different. SAS gives 9 df while NA in R and
least sqaure means are also different.

a b  lsmean        SE      df  asymp.LCL asymp.UCL
 1 1 3.212923 0.5677001 NA  2.100251  4.325595
 2 1 3.229803 0.5662713 NA  2.119932  4.339675
 3 1 3.279271 0.5688496 NA  2.164346  4.394196
 1 2 2.499457 0.5679181 NA  1.386358  3.612556
 2 2 3.248968 0.5659105 NA  2.139804  4.358132
 3 2 3.563672 0.5689044 NA  2.448640  4.678705

Why this happens? Please suggest.

Thanks,
Adeela

    [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


   

	[[alternative HTML version deleted]]



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