BookmarkSubscribeRSS Feed
Dawa93
Fluorite | Level 6

I used crude log-binomial regression with GEE for my analysis. When I ran the below code I get this error message. 

proc genmod data = myproject_1e descending;
class ParticipantID;
class state_marijuana_legal_status1 (ref='3');
model Marijuana_Use2 = state_marijuana_legal_status1/ dist=binomial; link=log;
repeated subject=ParticipantID/type=exch;
run;
 

Screen Shot 2023-08-07 at 11.48.55 AM.png

4 REPLIES 4
sbxkoenk
SAS Super FREQ

Hello,

 

one semi-colon ( ; ) too much ...

model  
Marijuana_Use2 = state_marijuana_legal_status1 / dist=binomial link=log;

 

SAS/STAT User's Guide
The GENMOD Procedure
MODEL Statement
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_genmod_syntax22.htm

 

Note there's also a PROC GEE !

 

BR, Koen

 
Dawa93
Fluorite | Level 6

Hi, Thank you for your comment.

I was able to run the code after removing the extra semi colon but I get this warning in my log . I have attached both my output and log screen shot. Can you look into it and let me know if I need to modify anything. Thank you.

 

 

Screen Shot 2023-08-08 at 10.35.20 AM.png

sbxkoenk
SAS Super FREQ

Hello,

 

So, you get the warning :

WARNING: The number of response pairs for estimating correlation is less than or equal to the number of regression parameters. A simpler correlation model might be more appropriate.

 

That warning message is the result of having very few measurements at some time points. With few clusters having measurements at some time point(s), there is insufficient data available to estimate correlations involving those time points. This is particularly likely if you use the unstructured correlation matrix (TYPE=UN) and have clusters of varying sizes. If there is only one, or very few, clusters of the largest size, then this condition occurs. The solution is either to remove the few clusters with the largest size or to simply use a simpler correlation structure. The GEE method is robust to the choice of correlation structure. So, even if you select a structure that doesn't match the true structure, you still get statistically consistent estimators. As a result, you can use the method without needing to precisely define the nested correlation structure. Many analysts routinely use simple structures such as TYPE=IND or TYPE=EXCH.

 

Also, note that PROC GEE is a newer procedure specifically for fitting the GEE model and is the recommended procedure when fitting that model. It adds support for nominal multinomial response data and data that are missing at random and might perform better in some cases.

 

See also ( look for 'GEE' )

BR, Koen

 
MichaelL_SAS
SAS Employee

To add to what what @sbxkoenk noted, based on the SUBJECT=ParticipantId specification in your code, I suspect you might be running an analysis where you have one measurement from each subject and are using the GEE model to get the empirical/robust/sandwich covariance matrix estimate. If that is the case, then specifying TYPE=EXCH, would be a likely cause for that WARNING message, since estimating the exchangeable working correlation structure would require clusters with two or more observations. As mementioned in the note @sbxkoenk rreferenced, you can switch to using an independent working correlation structure. The independent working correlation structure is used by default if you omit the TYPE= option.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 944 views
  • 7 likes
  • 3 in conversation