Chapter Contents |
Previous |
Next |

The LOGISTIC Procedure |

By default, response levels are assigned to Ordered Values in ascending, sorted order (that is, the lowest level is assigned Ordered Value 1, the next lowest is assigned 2, and so on). There are a number of ways that you can control the sort order of the response categories and, therefore, which level is assigned Ordered Value 1. One of the most common sets of response levels is {0,1}, with 1 representing the event for which the probability is to be modeled. Consider the example where Y takes the values 1 and 0 for event and nonevent, respectively, and Exposure is the explanatory variable. By default, PROC LOGISTIC assigns Ordered Value 1 to response level 0, causing the probability of the nonevent to be modeled. There are several ways to change this. Besides recoding the variable Y, you can do the following.

- specify the DESCENDING option in the PROC LOGISTIC
statement, which reverses the default ordering of
Y from (0,1) to (1,0), making 1 (the event) the level
with Ordered Value 1:
proc logistic descending; model Y=Exposure; run;

- assign a format to Y such that the first formatted value
(when the formatted values are put in sorted order)
corresponds to the event. For this example, Y=1 is
assigned formatted value `event' and Y=0 is assigned
formatted value `nonevent'. Since ORDER=FORMATTED by default,
Y=1 becomes Ordered Value 1.
proc format; value Disease 1='event' 0='nonevent'; run; proc logistic; model Y=Exposure; format Y Disease.; run;

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.