Session Ready
Exercise

Multiple linear regression

We will return to the data from Acupuncture study that we used in Chapter 1. This study compared acupuncture to a control intervention on the effects of headache score.

Regression analyses allow us to account for multiple explanatory variables (aka covariates or independent variables). We will perform linear regression analyses using percentage change from baseline in headache score at 12 months as our dependent variable. Treatment group, sex, and quartiles of baseline headache score will be the explanatory variables. The Acupuncture dataset has been preloaded for this session.

Instructions
100 XP
  • Re-familiarize yourself with the Acupuncture dataset with the head function.
  • Use the relevel() function to set ‘Control' as the reference group for treatment.
  • Use the lm() function to fit a multiple linear regression model for pct.month12 with treatment.group, sex and score.baseline.4 as explanatory variables.
  • Display the results of the model.