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!
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.
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...
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.
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!
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.