Session Ready
Exercise

Model prediction

In the previous exercise, the multiple linear regression provided no evidence for an association between sex and the endpoint, so it can be removed from the model.

Here we will predict values for percentage change from baseline in headache score at 12 months using a model with treatment group and quartiles of baseline headache score as the predictor variables. We will display these values graphically.

The ggplot2 library and Acupuncture dataset have been loaded for this session.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Explore Acupuncture with the str() function.
  • Use the relevel() function to set "Control" as reference group.