BookmarkSubscribeRSS Feed
ahschnell
Fluorite | Level 6

I have a pre/post survey with an ordinal outcome (1 to 4) and am using Glimmix multinomial random effect model. I am searching for a way to calculate predicted probabilities for category(4 levels)  for the 2 levels of survey and of treatment/control. I can find no way to generate the predicted probabilities (for group, not individuals). My colleague can do this very easily in STATA but I can't figure out how to do it in SAS.  Any help is appreciated.Thank you,

 

 

 

5 REPLIES 5
ahschnell
Fluorite | Level 6
Thank you so much. I just glanced through and it might do the trick, I will
have to look at it closely. I’m not proficient at estimate statements so if
that is what I need, wish me luck. Once again, thank you!


ahschnell
Fluorite | Level 6

I have pre post survey data on subjects. The outcome is 1(not at all) to 4 (very). I used the code with Proc Glimmix but I'm not sure how to translate these subject specific probabilities to say the probability of group 1 at time 1 being in Category 1.

 

Thank you so much for your help.

Audrey

 

proc GLIMMIX data=gsdatav2 METHOD=LAPLACE;
class RE_M_GCARDEV_3(REF='1')
RE_M_GCARDEV_Event(REF='1')
GGENDER(REF='1')
Survey (REF='1')
NIH_GROUP (REF='2')
ANALYSIS_ID;
model M_R_GPATHCONS_11(desc) =
RE_M_GCARDEV_3
RE_M_GCARDEV_Event
GGENDER
Survey
NIH_GROUP
Survey*NIH_GROUP
/dist=multi oddsratio (DIFF=last label ) solution;
random int/SUBJECT=ANALYSIS_ID;
output out=ds2 pred(noblup)=predpa stderr(noblup)=stderrmupa
pred(ilink noblup)=predmupa stderr(ilink noblup)=stderrmupa;
run;

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Edit: Oh, never mind. I see it's in the CLASS statement.

 

 

You should put ANALYSIS_ID in the CLASS statement, or be sure that your dataset is sorted appropriately.

 

From the GLIMMIX documentation:

 

SUBJECT=effect 
SUB=effect

identifies the subjects in your generalized linear mixed model. Complete independence is assumed across subjects. Specifying a subject effect is equivalent to nesting all other effects in the RANDOM statement within the subject effect.

Continuous variables and computed variables are permitted with the SUBJECT= option. PROC GLIMMIX does not sort by the values of the continuous variable but considers the data to be from a new subject whenever the value of the continuous variable changes from the previous observation. Using a continuous variable can decrease execution time for models with a large number of subjects and also prevents the production of a large "Class Levels Information" table.

 

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

You could use ESTIMATE statements, I think. But this suggestion uses the OUTPUT statement with NOBLUP options for predicted values.

 

Follow up as need be. If you need more input, code and an example data set would probably be useful.

 

Good luck!

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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