# SO5032: Lab Materials

## 1 Week 11 Lab

For today's lab I want you to go over last week's lab, and upload your Stata (and related) work to Sulis. Please do this during or before the lab time slot – this is meant as a classroom activity replacement, not an extra assignment.

### 1.1 Logistic regression and odds ratios: Death penalty data

1: Calculate the OR from the table of

• a) Penalty by defendant's race overall
• b) Penalty by defendant's race where victim is white
• c) Penalty by defendant's race where victim is black

2: Write a sentence interpreting each OR (e.g., race X has odds of getting the DP that are 1.23 times as big as race Y)

3: What do the 2nd and 3rd ORs tell you about the first?

4: Fit the first logistic regression:

```logit pen i.def
```

Calculate the OR from this, and show that it is the same as 1a above (you might need to recalculate the 1a OR, as black vs white rather than white vs black; the logistic regression is calculting the odds for DP vs no DP, for black divided by white)

4: fit the 2nd model:

```logit pen i.def i.vic
```

Interpret the `i.def` result. Compare with questions 1b and 1c above (it won't be the same, but it is controlling for victim's race in a similar manner).

### 1.2 Model search

Using the ESS data referred to in last week's lab, search for a model predicting being married. Upload your final preferred model, and interpret it in two or three sentences.

Created: 2020-04-14 Tue 11:22

Validate