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 ...

Get Logistic Regression Using SAS®: Theory and Application now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.