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
  Intercourse
RaceGenderYesNo
WhiteMale43134
 Female26149
BlackMale2923
 Female2236

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.