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,
See whether the suggestion I made in this thread works for you
https://communities.sas.com/t5/SAS-Procedures/Glimmix-for-multinomial-data/td-p/229818
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;
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.
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!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.