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

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.

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

No credit card required