Groups from a third numerical variable
A linear model for a response, Y, and explanatory variable, X, can be extended to take account of a second categorical explanatory variable, Z, by fitting different regression lines for each z-value.
If the second explanatory variable is numerical, its values can be grouped into classes, as might be done for constructing a histogram. The variable could then be treated in the same way as a categorical variable to model Y.
Body fat of AIS athletes