Programming the statistical procedures from SAS

Change in behavior of the group= option in the RANDOM statement in PROC GLIMMIX

Accepted Solution Solved
Reply
Respected Advisor
Posts: 2,655
Accepted Solution

Change in behavior of the group= option in the RANDOM statement in PROC GLIMMIX


As a watch out, be aware that the output changes in 9.4/12.3 from 9.3/12.1 for the following (buried inside a macro

proc glimmix data=for_Stats1 ic=pq;

by param ;

nloptions tech=nrridg;

  class grp_no studyday anml_nbr ;

   model value = grp_no

          studyday

                          grp_no*studyday

                        / ddfm=kr2;

  random studyday /residual type=&covtype subject= anml_nbr(grp_no) group=grp_no;

  %if "&covtype" = "AR(1)" OR "&covtype" = "ARH(1)" %then %do;

     random intercept/subject=anml_nbr(grp_no) group=grp_no;

     %end;

  covtest homogeneity;

   ods output fitstatistics = &outdata._a convergencestatus = &outdata.status ; 

run;

If &covtype is AR(1) or ARH(1), then under 9.3/12.1, a separate intercept is reported for each grp_no.  However, under 9.4/12.3, I do not get separate estimates, only a pooled estimate, almost as if the group= option was ignored.

Steve Denham


Accepted Solutions
Solution
‎11-15-2013 02:37 PM
Respected Advisor
Posts: 2,655

Re: Change in behavior of the group= option in the RANDOM statement in PROC GLIMMIX

I would like to thank the good folks at technical support (and in particular, Jill) for taking the time to work on this, when the problem is with my code and NOT an inconsistency between versions.  So, I apologize to everyone, and remind us all:  If you do something more than once in a program using a PROC, make sure the syntax used is IDENTICAL, as even small differences can make you insane.  And in particular, if you apply the group= option in one RANDOM statement, make sure you apply it in all of the RANDOM statements if you are fitting an AR + random effect model.

Steve Denham

View solution in original post


All Replies
Valued Guide
Valued Guide
Posts: 684

Re: Change in behavior of the group= option in the RANDOM statement in PROC GLIMMIX

I think you should report this to technical support.

Respected Advisor
Posts: 2,655

Re: Change in behavior of the group= option in the RANDOM statement in PROC GLIMMIX

- That was my first step after the great gnashing of teeth and rending of garments this morning.  Figured I should get the news out here as well.

Steve Denham

Solution
‎11-15-2013 02:37 PM
Respected Advisor
Posts: 2,655

Re: Change in behavior of the group= option in the RANDOM statement in PROC GLIMMIX

I would like to thank the good folks at technical support (and in particular, Jill) for taking the time to work on this, when the problem is with my code and NOT an inconsistency between versions.  So, I apologize to everyone, and remind us all:  If you do something more than once in a program using a PROC, make sure the syntax used is IDENTICAL, as even small differences can make you insane.  And in particular, if you apply the group= option in one RANDOM statement, make sure you apply it in all of the RANDOM statements if you are fitting an AR + random effect model.

Steve Denham

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 239 views
  • 3 likes
  • 2 in conversation