O'Reilly logo

Logistic Regression Using SAS®: Theory and Application by Paul D. Allison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.2. A Logit Model for a 2 × 2 Table

Let’s begin with the simplest case—a dichotomous dependent variable and a single dichotomous independent variable. That leads to a 2 × 2 table like the one in Table 2.2, reproduced here as Table 4.1.

Table 4.1. Death Sentence by Race of Defendant
 BlacksNonblacksTotal
Death282250
Life455297
Total7374147

If we have access to the individual-level data, we can simply estimate a logit model directly, as with the following GENMOD program:

PROC GENMOD DATA=my.penalty;
  MODEL death = blackd / D=B;
RUN;

Results are shown in Output 4.1. Exponentiating the BLACKD coefficient yields 1.47, which is the odds ratio we calculated earlier, directly from the table. It is not statistically significant.

Output 4.1. GENMOD Output ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required