Chapter Contents Previous Next
 The LOGISTIC Procedure

## Response Level Ordering

For binary response data, the default response function modeled is
where p is the probability of the response level identified in the "Response Profiles" table in the displayed output as "Ordered Value 1." Since
the effect of reversing the order of the two values of the response is to change the signs of and in the model .Response level ordering is important because PROC LOGISTIC always models the probability of response levels with lower Ordered Value.

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