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

Hello All,

 

I'm running a multinomial logistic model with a random effect using PROC GLIMMIX.  I've noticed that I get different p-values for my independent variable depending on which reference group I use.  This seems strange to me and doesn't happen if I remove the random effect.  I am wondering if I might be doing something incorrectly with the random effect.  In particular, I don't understand why I have to add the "group" option for the random effect, but SAS seems to require that I do so!  Please see my code below.  Thank you!

proc glimmix data=lib.submixed;
class author placement;
model placement(ref='Middle')=year/dist=mult link=glogit; /*p=0.0026 for year*/
random int / subject=author group=placement;
run;

proc glimmix data=lib.submixed;
class author placement;
model placement(ref='End')=year/dist=mult link=glogit; /*p=0.0089 for year*/
random int / subject=author group=placement;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Your results actually make sense, but may not be intuitive. With generalized logits and K levels to the response variable, one is actualy fitting K-1 linear predictors (one for each non-reference level of Y). So, the models being fitted depend on the one not being fitted (for the reference level, which is essentially assigned a linear predictor of 0). The overall relationship to X for levels 1 and 2 (for instance) can be different from the relationship to X for levels 2 and 3, and so on. See the excert below from the User's Guide, especially the part I put in bold. Likewise the random effects can be different for each of the K-1 linear predictors; this is why one is forced to have separate random effects (group= option).

 

In generalized logit models (for multinomial data with unordered categories), one response category is chosen as the reference category in the formulation of the generalized logits. By default, the linear predictor in the reference category is set to 0, and the reference category corresponds to the entry in the "Response Profile" table with the highest Ordered Value. You can affect the assignment of Ordered Values with the DESCENDING and ORDER= options in the MODEL statement. You can choose a different reference category with the REF= option. The choice of the reference category for generalized logit models affects the results. It is sometimes recommended that you choose the category with the highest frequency as the reference (see, for example, Brown and Prescott 1999, p. 160). You can achieve this with the GLIMMIX procedure by combining the ORDER= and REF= options, as in the following statements:

proc glimmix;
   class preference;
   model preference(order=freq ref=first) = feature price /
                   dist=multinomial
                   link=glogit;
   random intercept / subject=store group=preference;
run;

The ORDER=FREQ option arranges the categories by descending frequency. The REF=FIRST option then selects the response category with the lowest Ordered Value—the most frequent category—as the reference.

View solution in original post

2 REPLIES 2
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Your results actually make sense, but may not be intuitive. With generalized logits and K levels to the response variable, one is actualy fitting K-1 linear predictors (one for each non-reference level of Y). So, the models being fitted depend on the one not being fitted (for the reference level, which is essentially assigned a linear predictor of 0). The overall relationship to X for levels 1 and 2 (for instance) can be different from the relationship to X for levels 2 and 3, and so on. See the excert below from the User's Guide, especially the part I put in bold. Likewise the random effects can be different for each of the K-1 linear predictors; this is why one is forced to have separate random effects (group= option).

 

In generalized logit models (for multinomial data with unordered categories), one response category is chosen as the reference category in the formulation of the generalized logits. By default, the linear predictor in the reference category is set to 0, and the reference category corresponds to the entry in the "Response Profile" table with the highest Ordered Value. You can affect the assignment of Ordered Values with the DESCENDING and ORDER= options in the MODEL statement. You can choose a different reference category with the REF= option. The choice of the reference category for generalized logit models affects the results. It is sometimes recommended that you choose the category with the highest frequency as the reference (see, for example, Brown and Prescott 1999, p. 160). You can achieve this with the GLIMMIX procedure by combining the ORDER= and REF= options, as in the following statements:

proc glimmix;
   class preference;
   model preference(order=freq ref=first) = feature price /
                   dist=multinomial
                   link=glogit;
   random intercept / subject=store group=preference;
run;

The ORDER=FREQ option arranges the categories by descending frequency. The REF=FIRST option then selects the response category with the lowest Ordered Value—the most frequent category—as the reference.

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
  • 2 replies
  • 2681 views
  • 2 likes
  • 2 in conversation