Hello,
I am running an analysis examining the association between sleep offset, aka rest end (disaggregated into within- and between-person components: restend_PMC and restend_PM, respectively) and odds of breakfast consumption (with adjustment for a covariate) in PROC GLIMMIX. See below the results:
Solutions for Fixed Effects | |||||
Effect | Estimate | Standard | DF | t Value | Pr > |t| |
Error | |||||
Intercept | 1.5619 | 0.6444 | 578 | 2.42 | 0.0157 |
restend_PMC | -0.06121 | 0.03114 | 2658 | -1.97 | 0.0494 |
restend_PM | -0.0994 | 0.04668 | 578 | -2.13 | 0.0337 |
Covariate | -0.6233 | 0.1477 | 2658 | -4.22 | <.0001 |
Odds Ratio Estimates | |||||||||
restend_PMC | restend_PM | Covariate | _restend_PMC | _restend_PM | _Covariate | Estimate | DF | 95% Confidence Limits | |
1.0038 | 8.3449 | 5.00E-18 | 0.0038 | 8.3449 | 5.00E-18 | 0.941 | 2658 | 0.885 | 1 |
0.0038 | 9.3449 | 5.00E-18 | 0.0038 | 8.3449 | 5.00E-18 | 0.905 | 578 | 0.826 | 0.992 |
0.0038 | 8.3449 | 1 | 0.0038 | 8.3449 | 5.00E-18 | 0.536 | 2658 | 0.401 | 0.716
|
Type III Tests of Fixed Effects | ||||
Effect | Num DF | Den DF | F Value | Pr > F |
restend_PMC | 1 | 2658 | 3.86 | 0.0494 |
restend_PM | 1 | 578 | 4.53 | 0.0337 |
Covariate | 1 | 2658 | 17.81 | <.0001 |
The odds ratios for restend_PMC and restend_PM (bolded above) are below 1, meaning that with each unit increase in either variable, the odds of breakfast go down (negative relationship). I've used "output out" within the code to produce predicted probability and standard error of the outcome within the model in order to graph my results. Below is my code:
Proc glimmix data=Data NOCLPRINT NOITPRINT METHOD= RSPL namelen=40;
CLASS idnum;model breakfast(ref='0')=restend_PMC restend_PM covariate / ODDSRATIO SOLUTION DIST=BINARY ddfm=bw;
output out=Sleep_offset_Break
pred(noblup ilink)= Sleep_offset_Break_Pred_PA
STDERR(noblup ilink)= Sleep_offset_Break_STDERR_PA;
RANDOM Intercept / TYPE=AR(1) Subject=idnum;
Title 'sleep_offset predicting breakfast, adjusted';run;title;run;
I graphed rest_end_PMC on the x-axis and the predicted probability of breakfast consumption (output from output out) on the y-axis, with dotted lines indicating the standard error (see image below):
To my surprise, the line is slightly upward, indicating a positive relationship (really, the line is almost straight). I have not had this issue when graphing other predicted results using the "output out" command in proc glimmix, including graphing the association between rest_end_PM and the predicted probability (the graph indicated a negative relationship as expected). Can anyone help me understand the issue?
Thanks.
confooseddesi89
You don't say how you did the plot.
Nevertheless, you probably want to use the STORE command in PROC GLIMMIX to save the model so that PROC PLM can do the plot for you (using the EFFECTPLOT statement). I'm sure that will produce a more reasonable plot.
You don't say how you did the plot.
Nevertheless, you probably want to use the STORE command in PROC GLIMMIX to save the model so that PROC PLM can do the plot for you (using the EFFECTPLOT statement). I'm sure that will produce a more reasonable plot.
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!
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.