Practical Computing Exercise for Week 8 :Fairness in the use of the Death Penalty

Download the template R markdown file for this workshop.

Aims of this practical exercise

In this exercise you will:

  • fit a log-linear model.
  • compare the outcome for a log-linear model with that of a logistic regression.

The exercise

Agresti (2007) presented an example on the counts of murderers given the death penalty in the state of Florida. The data can be used to judge the level of racial prejudice that might exist in the justice system as the race of the murderer and their victims are noted. Use a log-linear model to determine the appropriate model for this scenario and draw a conclusion on the possible prejudice that may exist. Do your results match those that could be found using a logistic regression approach?

The data can be obtained using:

    data(DeathPenalty, package="ELMER") 
str(DeathPenalty)

Solutions

You should compare your work with the solutions for this workshop.