Prev: SPSS files quadrupling in size when imported to SAS
Next: SAS ODS RTF, used in a DATA _NULL_ step, how to increase the font?
From: Jay Weedon on 17 Jun 2010 17:05 Hi folks, I've performed what seems to be the same analysis using MIXED & GLIMMIX. I don't particularly want to discuss the rationale behind the analysis, I'm more concerned right now with the fact that the 2 procs come up with utterly different ideas of what the p-value should be for the DOSE effect, despite the fact that the LL statistics are identical and the covariance estimates all extremely similar. LS means are identical too, but their SEs vary markedly. It apparently has something to do with the implementation of the DDFM=KR option, because without KR I get the same result with both procs. Code follows. *Construct phony dataset; data one; do animal=1 to 40; animalfx=rannor(1)*2; do slice=1 to 2; slicefx=rannor(1)/16885; type=rantbl(1,0.25,0.25,0.25,0.25); dose=0; treated=0; score=20+animalfx+slicefx+rannor(1); output; treated=1; dose=type; score=score+rannor(1)+dose/6; output; end; end; run; proc mixed data=one; class animal slice dose treated type; model score=dose /ddfm=kr; random int /sub=animal; repeated treated /sub=slice(animal) type=un group=type; lsmeans dose /pdiff; run; proc glimmix data=one; class animal slice dose treated type; model score=dose /ddfm=kr; random int /sub=animal; random treated /sub=slice(animal) residual type=un group=type; nloptions TECHNIQUE=NRRIDG; *To make estimation methods similar; lsmeans dose /pdiff; run; Jay Weedon |