BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fdehkord
Obsidian | Level 7

I have three observations per patients and the response variable is the number of days in ICU.  There are 41 patients. The explanatory variables are age (continuous) gender (F, M), and varA (continuous). When I run the following codes. There will be no convergence

proc glimmix data=  mydata;

   class id  Gender ;

   model Length_of_ICU_stay= gender Age varA / dist=poi link=log

         solution;

   random int / subject=id;

   random residual;

   output out=gmxout pearson=pearson;

run;

 

When I run this code, I get the message “An R-side variance component is confounded with the profiled variance.

proc glimmix data=  mydata;

   class id  Gender ;

   model Length_of_ICU_stay= gender Age varA / dist=poi link=log

         solution;

   random int / subject=id residual;

   output out=gmxout pearson=pearson;

run;

I need help to understand the difference between the two models fitted through the above codes and make sense or the  message.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Recall that for a Poisson distribution the mean equals the variance.  By specifying RANDOM residual without indicating a subject you have confounded the R side variance with the residual variance.  With 3 visits per subject, perhaps this code will help (no guarantee, though):

 

proc glimmix data=  mydata;
   class id  Gender visit_no ;
nloptions maxiter=2000 tech=nrridg; model Length_of_ICU_stay= gender Age varA visit_no/ dist=poi link=log solution; random visit_no/type=cs residual subject=id; output out=gmxout pearson=pearson; run /* Or this, for a G side approach */ proc glimmix data= mydata method=laplace; class id Gender visit_no ; nloptions maxiter=2000 tech=nrridg;

model Length_of_ICU_stay= gender Age varA / dist=poi link=log solution; random visit_no/type=cs subject=id; output out=gmxout pearson=pearson; run;;

I chose a compound symmetry variance structure as I doubt that the visits are equally spaced in time, even if indexed as 1, 2 and 3.  A heterogeneous compound symmetry (csh) may give a superior fit, but simpler is usually better and has a higher chance of converging.  I also added an NLOPTIONS statement that could result in convergence, if you are hitting up against the default 20 iteration limit.

 

SteveDenham.

 

 

 

View solution in original post

3 REPLIES 3
SteveDenham
Jade | Level 19

Recall that for a Poisson distribution the mean equals the variance.  By specifying RANDOM residual without indicating a subject you have confounded the R side variance with the residual variance.  With 3 visits per subject, perhaps this code will help (no guarantee, though):

 

proc glimmix data=  mydata;
   class id  Gender visit_no ;
nloptions maxiter=2000 tech=nrridg; model Length_of_ICU_stay= gender Age varA visit_no/ dist=poi link=log solution; random visit_no/type=cs residual subject=id; output out=gmxout pearson=pearson; run /* Or this, for a G side approach */ proc glimmix data= mydata method=laplace; class id Gender visit_no ; nloptions maxiter=2000 tech=nrridg;

model Length_of_ICU_stay= gender Age varA / dist=poi link=log solution; random visit_no/type=cs subject=id; output out=gmxout pearson=pearson; run;;

I chose a compound symmetry variance structure as I doubt that the visits are equally spaced in time, even if indexed as 1, 2 and 3.  A heterogeneous compound symmetry (csh) may give a superior fit, but simpler is usually better and has a higher chance of converging.  I also added an NLOPTIONS statement that could result in convergence, if you are hitting up against the default 20 iteration limit.

 

SteveDenham.

 

 

 

fdehkord
Obsidian | Level 7

Thank you very much Steve. I appreciate your detailed explanation. It was very helpful.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 825 views
  • 7 likes
  • 3 in conversation