AE 14: Comparing logistic regression models

Published

November 8, 2023

Important

Go to the course GitHub organization and locate your ae-14 repo to get started.

Render, commit, and push your responses to GitHub by the end of class. The responses are due in your GitHub repo no later than Saturday, November 11 at 11:59pm.

Packages

library(tidyverse)
library(tidymodels)
library(knitr)

Response to Leukemia treatment

Today’s data is from a study where 51 untreated adult patients with Acute Myeloid Leukemia who were given a course of treatment, and they were assessed as to their response to the treatment.1

The goal of today’s analysis is to use pre-treatment factors to predict how likely it is a patient will respond to the treatment.

We will use the following variables:

  • Age: Age at diagnosis (in years)
  • Smear: Differential percentage of blasts
  • Infil: Percentage of absolute marrow leukemia infiltrate
  • Index: Percentage labeling index of the bone marrow leukemia cells
  • Blasts: Absolute number of blasts, in thousands
  • Temp: Highest temperature of the patient prior to treatment, in degrees Fahrenheit
  • Resp: 1 = responded to treatment or 0 = failed to respond
leukemia <- read_csv("data/leukemia.csv") |>
  mutate(Resp = factor(Resp))

Comparing models

  1. Consider a model with all the pre-treatment variables: Age, Smear, Infil, Index, Blasts and Temp. Fit a model using these six variables to predict whether a patient responded to the treatment. Call the model full_model. Display the model.
# add code
  1. Based on the model, which pre-treatment variables are statistically significant using a threshold of \(\alpha = 0.05\)? (We will talk more about inference for logistic regression coefficients in an upcoming lecture.)

  2. Fit a model that only includes the statistically significant predictors. Call the model reduced_model.

# add code
  1. Use a drop-in-deviance test to compare a model that includes only the significant predictors to the full model. Which model do you choose based on the results of this test?
# add code
  1. Is your choice based on AIC consistent with your choice from the previous exercise? What about a choice based on BIC?
# add code

Submission

Important

To submit the AE:

  • Render the document to produce the PDF with all of your work from today’s class.
  • Push all your work to your ae-14 repo on GitHub. (You do not submit AEs on Gradescope).

Footnotes

  1. The data set is from the Stat2Data R package. This AE is adapted from exercises in Stat 2.↩︎