Effect of transformation on the interaction
Consider a response variable, Y, that satisfies a normal model with two factors X and Z that do not interact in their effect on the mean response.
If a nonlinear function of this response, such as log(Y) or exp(Y), is modelled instead, there is likely to appear to be an interaction.
The appearance of interaction depends on the function of the response that is modelled.
It is therefore important to consider nonlinear transformations of the response as part of the modelling process.
Response variables that are 'quantities' of something are often routinely replaced by their logs before analysis.
Other effects of transforming the response
Note that nonlinear transformations of the response have several different effects on the model:
It is therefore important to look simultaneously for all three problems when deciding on whether a transformation of the response is advisable.
Example with interaction
The diagram below shows a data set for which there is clear evidence of interaction between the effects of the two factors — when X is at its lowest level, changing Z has little effect on the response, but when X is higher, increasing Z has more effect.
Drag the red arrows to add the factors X and Z to the model, then add an interaction. Observe that the interaction is highly significant.
Transformed response
In this example, the interaction can be completely removed by analysing the logarithms of the response. This nonlinear transformation compresses the top of the response scale and expands the lower end of the scale.
Again drag the arrows to add main effects and an interaction to the model. When analysing the log transformation of the response, there is no significant interaction between the effects of X and Z.