4.3. A Three-Way Table

As we’ve just seen, using GENMOD to estimate a logit model for a 2 × 2 table doesn’t tell you much more than you would get with PROC FREQ. But with a 3-way table, things get more interesting.

Consider Table 4.2, which shows the cross classification of race, gender, and occurrence of sexual intercourse for a national sample of 15- and 16-year-olds, reported by Morgan and Teachman (1988).

Table 4.2. Race by Gender by Sexual Intercourse

Let’s analyze Table 4.2 as a logit model, with intercourse as the dependent variable and race and sex as independent variables. Using the events/trials syntax in GENMOD, we have:

DATA interco; INPUT white male yes ...

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.