Models for several variables
In previous sections, we showed how individual numerical and categorical explanatory variables can be modelled with terms in a GLM. In this section, we have also shown how to model the interaction between any two such variables.
If there are several explanatory variables, we can use a GLM that contains several main effects and several interactions between pairs of explanatory variables.
Body fat of AIS athletes
Data were collected from a sample of elite athletes from six sports (Basketball, Rowing, Swimming, Field, Track, and Tennis) who were in training at the Australian Institute of Sport. We use these data to model the percentage body fat of the athletes in terms of two numerical explanatory variables, Height, and Weight, and two categorical explanatory variables, Sex and Sport.
The table above shows the Type 3 sums of squares for the main effects of the four explanatory variables and all of their interactions.
It is not meaningful to consider deleting any main effects from the model when their interactions are present, so we should firstly examine the p-values associated with the interactions between pairs of explanatory variables.
Use the checkboxes to remove interactions from the model that you believe are not significant.
Since this is a large data set, several interactions are highly significant. The relationship between body fat and Height, Weight, Sex and Sport is clearly a complex one!
Note that an analysis of variance table (with sequential Type 1 sums of squares) would not be helpful for analysing this model. Since the data are observational, the explanatory variables are correlated and the analysis of variance table would be highly dependent on the order of adding the main effects and interactions.
Higher-order interactions
We have only considered interactions between pairs of explanatory variables in this section. It is also possible for three or more variables to interact in more complex ways.
In observational data, it is uncommon to consider interactions between more than two explanatory variables at a time, but in experimental data, such interactions are sometimes of great importance. We end this section by simply mentioning that interactions can be more complex.