Programming the statistical procedures from SAS

Predicted probabilities for mixed multinomial model

Reply
Occasional Contributor
Posts: 5

Predicted probabilities for mixed multinomial model

[ Edited ]

I'm trying to create a mixed model with a multinomial outcome and a random effect.  I want to model the probability of a speech tag in a sentence coming at the beginning, middle, or end of a sentence, and I have a large sample of sentences.  The outcome can have three levels (beginning, middle, end), the only fixed effect is decade of publication, and I want to account for author as a random effect, since there are multiple sentences in the sample written by the same author.

 

I want to graph the predicted probability of each type of speech tag (beginning, middle, or end) by decade of publication.  I figured I could use LSMEANS to get the predicted probability of each outcome (beginning, middle, end).  But, I can't seem to figure out how to do this using SAS.

 

I've tried to use PROC LOGISTIC, PROC GENMOD, and PROC GLIMMIX.  PROC LOGISTIC won't take the random effect into account, but will give me the correct LSMEANS if I use link=glogit.  PROC GENMOD will account for the random effect but will not allow link=glogit, and I am not sure how to interpret the LSMEANS when link=cumlogit because the probabilities of the three outcomes do not add up to one.  PROC GLIMMIX won't allow LSMEANS for the multinomial distribution.  Attached are the codes I've tried.  Does anyone have any ideas?

 

 


Screen Shot 2016-03-05 at 4.12.45 PM.png
Respected Advisor
Posts: 2,655

Re: Predicted probabilities for mixed multinomial model

GLIMMIX is probably the way to proceed, but you will have to use the ESTIMATE statement to get your predicted probabilities.  See Example 45.13 in the SAS/STAT 14.1 documentation for an example of how to do this.  You'll have to adapt from a cumulative logit in the example to a generalized logit in your situation, and it requires the use of the %CONTRAST macro.

 

Steve Denham

Occasional Contributor
Posts: 5

Re: Predicted probabilities for mixed multinomial model

Thank you so much for your help, Steve!  I had pretty much given up on being able to do this with SAS, but I'll take a look at the example you suggested.

Ask a Question
Discussion stats
  • 2 replies
  • 328 views
  • 0 likes
  • 2 in conversation