Session Ready
Exercise

Making probabilistic predictions

Just as we did with linear regression, we can use our logistic regression model to make predictions about new observations. In this exercise, we will use the newdata argument to the augment() function from the broom package to make predictions about students who were not in our original data set. These predictions are sometimes called out-of-sample.

Following our previous discussion about scales, with logistic regression it is important that we specify on which scale we want the predicted values. Although the default is terms -- which uses the log-odds scale -- we want our predictions on the probability scale, which is the scale of the response variable. The type.predict argument to augment() controls this behavior.

A logistic regression model object, mod, has been defined for you.

Instructions
100 XP
  • Create a new data frame which has one variable called GPA and one row, with the value 3.51.
  • Use augment() to find the expected probability of admission to medical school for a student with a GPA of 3.51.