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.
- Create a dummy variable
obesity
that indicates if a personbmi
is equal or above 30.1 - Fit a model including suitable interactions with
obesity
,smoker
,bmi
andage
. - Write down the mean model equation for each combination of
obesity
andsmoker
. - Test for the significance of the interactions and test whether the effect of
bmi
is the same for obese or not.
Footnotes
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.↩︎