8. Binary logistic regression models
Amy Atkinson
Caution
This page is under construction for 24/25 and may be subject to change before the teaching week.
Lecture
Watch part 1 here
Watch part 2 here
Watch part 3 here
Watch part 4 here
Download the lecture slides here
Post Lecture
Lab Preparation
Watch the preparation video here
Download the files discussed in the video here
Lab Work
Binary logistic regression with one categorical predictor
Research Question
You are interested in whether the country an individual lives (UK/Australia) predicts reptile ownership (Yes/No).
In the dataset, the outcome variable (reptile) is coded as “Y” and “N”:
- Y = Yes
- N = No
To make sure we should all end up with the same output, set UK as your reference category
Steps
- Prepare our data for analysis
- Explore our data
- Run the binary logistic regression model
- Evaluate the model
- Evaluate the individual predictors
- Predicted probabilities
- Interpret the output
Upload your script
You can upload your finished script for feedback on your code here and feedback will be posted onto Moodle.