powered by
A famous example of Simpson's paradox.
A data frame with 326 observations. The factors are coded more succinctly in deathPen, but otherwise the data are the same.
deathPen
DeathPenalty a factor with levels Yes No
Yes
No
Penalty a factor with levels Death Not
Death
Not
Victim a factor with levels Black White (or Bl Wh)
Black
White
Bl
Wh
Defendant a factor with levels Black White (or Bl Wh)
# NOT RUN { xtabs(~Defendant+Penalty,deathPenalty) xtabs(~Defendant+Victim+Penalty,deathPenalty) # }
Run the code above in your browser using DataLab