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

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
EffectEstimateStandardDFt ValuePr > |t|
Error
Intercept1.56190.64445782.420.0157
restend_PMC-0.061210.031142658-1.970.0494
restend_PM-0.09940.04668578-2.130.0337
Covariate-0.62330.14772658-4.22<.0001

 

Odds Ratio Estimates
restend_PMCrestend_PMCovariate_restend_PMC_restend_PM_CovariateEstimateDF95% Confidence Limits
1.00388.34495.00E-180.00388.34495.00E-180.94126580.8851
0.00389.34495.00E-180.00388.34495.00E-180.9055780.8260.992
0.00388.344910.00388.34495.00E-180.53626580.401

0.716

 

 

Type III Tests of Fixed Effects
EffectNum DFDen DFF ValuePr > F
restend_PMC126583.860.0494
restend_PM15784.530.0337
Covariate1265817.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):

Sleep offset breakfast graph within.png

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

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

2 REPLIES 2
SASJedi
SAS Super FREQ
Moved to Analytical Procedures forum where it should get better visibility
Check out my Jedi SAS Tricks for SAS Users
PaigeMiller
Diamond | Level 26

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.

--
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!

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
  • 2 replies
  • 499 views
  • 0 likes
  • 3 in conversation