In a logistic or probit model for a binary response, the signs of the parameter estimates might seem to be backward if you model the probability of the wrong response level. The LOGISTIC, PROBIT, GENMOD, GLIMMIX, GAM, and GAMPL procedures document the level it models (for binary responses), the order of levels (for ordinal responses), or the reference level (for nominal responses) in a NOTE in the SAS Log and below the Response Profile table in the displayed results. For binary and ordinal response models, switching the level modeled or the level ordering is reflected in the model by the parameter estimates switching signs. It also causes odds ratio estimates in a logistic model to be inverted as described in this note.
You can specify options following your response variable in the MODEL statement to explicitly set the modeled response level, order of levels, or reference level. You should always use these options to ensure that the procedure fits the model you want. In the following, these options are discussed using PROC LOGISTIC, but they can be used in the same way in the other procedures mentioned above.
proc logistic; model y(event='1') = <your model effects>; run;If your response variable has a format associated with it, specify the formatted value of the desired level in the EVENT= option.
For example, suppose response Y has values "lo ", "med", "hi ". By default, LOGISTIC sorts the levels in ascending order and assigns Ordered Value 1 to the lowest level, Ordered Value 2 to the next lowest level, etc. resulting in the nonmonotonic ordering below:
proc logistic; model y = x; run;
The parameter estimates from this analysis are meaningless since the natural order of the response was not preserved.
Probabilities modeled are cumulated over the lower Ordered Values.
|
If the levels appear in proper ascending or descending order in your input data set (for example, if "lo " appears before "med" and "med" before "hi "), then you can use the ORDER=DATA option to establish a proper order:
proc logistic; model y(order=data) = x; run;
In this case, LOGISTIC models the probabilities toward the "lo " end of the scale since "lo " is assigned the lowest Ordered Value. The positive parameter estimate for X (0.2441) means that the probability of lower Y values increases as X increases.
Probabilities modeled are cumulated over the lower Ordered Values.
|
By including the DESCENDING response option, the ordering of the levels is reversed and the "hi " end is modeled:
proc logistic; model y(order=data descending) = x; run;
Notice that the sign of the X parameter has now changed. The negative parameter estimate (-0.2441) means that the probability of higher Y values decreases as X increases. This is consistent with the analysis without the DESCENDING option, but just changes the focus from the probability of lower levels of Y to higher levels.
The odds ratio (not shown) also changes to be consistent. Without the DESCENDING option, the odds ratio for X is exp(0.2441) = 1.277. With the DESCENDING option, the odds ratios for X is exp(-0.2441) = 1/1.277 = 0.783.
Probabilities modeled are cumulated over the lower Ordered Values.
|
proc logistic; model y(ref='1') = <your model effects>; run;This will cause the following generalized logits to be modeled:
log(p2/p1)
log(p3/p1)
Note that reference level 1 appears in the denominator of both logits.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/STAT | All | n/a |
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> Procedures ==> LOGISTIC Analytics ==> Categorical Data Analysis Analytics ==> Regression SAS Reference ==> Procedures ==> GAM SAS Reference ==> Procedures ==> GAMPL SAS Reference ==> Procedures ==> GENMOD SAS Reference ==> Procedures ==> GLIMMIX SAS Reference ==> Procedures ==> PROBIT |
Date Modified: | 2019-05-02 15:08:22 |
Date Created: | 2002-12-16 10:56:39 |