Interactions

The database insurance from package hecstatmod contains information about medical charges billed to 1338 Americans during 2003. Figure 1 shows a plot obtained from an exploratory data analysis, showing the potential interaction between smoking and body mass index.

Figure 1: Graph of insurance charges against body mass index, colored by smoking status.
  1. Create a dummy variable obesity that indicates if a person bmi is equal or above 30.1
  2. Fit a model including suitable interactions with obesity, smoker, bmi and age.
  3. Write down the mean model equation for each combination of obesity and smoker.
  4. Test for the significance of the interactions and test whether the effect of bmi is the same for obese or not.

Footnotes

  1. According to the World Health Organization, people with a \(\texttt{bmi} \ge 25\) are overweight and those with \(\texttt{bmi} \ge 30\) are obese. However, BMI is perceived as being a flawed indicator of health: see this New York Times paper for example.↩︎