BookmarkSubscribeRSS Feed
yuchinher
Calcite | Level 5

Hello, 

 

I have encountered a problem with PROC GLIMMIX. I have 3 dummies as for a variable with 4 categories. The dummies are used as IVs in PROC GLIMMIX with binary outcome. However, one of the coefficients of the dummies is always zero in the output. I have checked the coding of the dummies and didn't find any issues. Here is my code:

 

proc glimmix data = LONG Method=quad;
class cluster;
model event(event='1') = dur child_1f_2m child_1m_2f child_bothmales /solution link=logit dist=binary ddfm=bw;
random intercept /subject=cluster;
run;

 

child_1f_2m child_1m_2f child_bothmales are the dummies and the reference category is child_bothfemales.

 

Thank you for any input! Cheers!

 

 

5 REPLIES 5
PaigeMiller
Diamond | Level 26

There's no need to create dummy variables yourself. This is what the CLASS statement does.

 

SAS modeling procedures always consider the last value alphabetically to be forced to zero. This can be over-ridden to force some other value to be zero, but there is always one zero. For interpretation and understanding of the fitted model, you are almost always better off looking at the Least Squares Means for the variable rather than the coefficients, which will always have one level with a zero coefficient. The Least Squares Means do not have this drawback. I wrote a brief example demonstrating why Least Squares Means are more easily interpreted than the model coefficients.

--
Paige Miller
yuchinher
Calcite | Level 5

Thank you for your answer! I have tried adding "LSMEANS cluster" right before the ods output command but it did not seem to work. No output was shown...

PaigeMiller
Diamond | Level 26

I have tried adding "LSMEANS cluster" right before the ods output command but it did not seem to work. No output was shown...

 

I have no idea what you did. Show me the code you used.

--
Paige Miller
yuchinher
Calcite | Level 5

proc glimmix data = LONG Method=quad;
class cluster;
model event(event='1') = dur child_1f_2m child_1m_2f child_bothmales /solution link=logit dist=binary ddfm=bw;
random intercept /subject=cluster;

LSMEANS cluster;
run;

 

Here they are. Not sure if the code is correct and if I add LSMEANS correctly. I also tried out proc reg with the 3 dummies and it works but not sure why not in proc glimmix. Thank you very much for you help again!

 

 

PaigeMiller
Diamond | Level 26

Is there an error in the LOG? If so, show us the LOG, the entire log for PROC GLIMMIX, not just the ERROR messages, with nothing chopped out.

--
Paige Miller

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 686 views
  • 0 likes
  • 2 in conversation