Continuing with the gas consumption example. Of interest is the relationship between outside temperature and gas consumption. We saw in Figure LABEL:gas_scatter2gas_scatter3 that the size of this relationship depends on whether or not the house has cavity wall insulation and we wrote this model formally as
where
The coefficient is the size of the main effect of outside temperature on gas consumption
The coefficient is the size of the interaction between the effect of outside temperature and whether or not insulation is installed.
To test whether or not there is an interaction, i.e. whether or not installing insulation has a significant effect on the relationship between outside temperature and gas consumption, we can test
vs.
We have previously fitted this model in R,
We will use the output from this model to speed up our testing procedure,
Find the standard error for
Reading from the second column in the Coefficients table, this is 0.04455.
Calculate the test statistic
The value of this test statistic also appears in the output above (where?) What is the critical value?
Compare to .
What do we conclude?
Since 3.22 2.021 there is evidence at the 5% level to reject , i.e. there was a significant change in the relationship between outside temperature and gas consumption following insulation.