Skip to course content
Free R statistics course

Statistical Data Analytics with R

Module 10 Activity

Scenario

Model a binary outcome and report it in probabilities a reader can use.

What you build

A logistic regression with odds ratios, predicted probabilities and a justified threshold.

Steps

  1. Confirm the outcome is binary and check what a linear model would predict at the extremes of your predictor.
  2. Fit with glm(..., family = binomial) and verify the output reports deviance rather than a residual standard error.
  3. Report odds ratios with intervals, label them as odds ratios, and give the baseline rate.
  4. Produce a table of predicted probabilities at meaningful predictor values, with intervals computed on the link scale.
  5. Report the confusion matrix against the majority-class baseline, and say how many positives were caught.
  6. Check calibration by binning predictions against observed rates, then choose a threshold from the relative cost of misses and false alarms.

Evidence to hand in

Review checklist