Interaction between two continuous variables
From PsychWiki - A Collaborative Psychology Wiki
Statistical programs, like SPSS, do not always have "point-and-click" commands for every possible statistical test. This page is a description of how to test the interaction between two continuous variables. Below, an explanation of interactions is presented, then the three steps to conduct the interaction is described, and examples are given to help in understanding the steps involved.
What is an interaction?
- Interactions are when the effect of two, or more, variables is not simply additive. This page describes the interaction between two variables. It is possible to examine the interactions of three or more variables but this is beyond the scope of this page.
- Example of interaction - One possible interaction is the effect of energy bars and energy drinks on time to run the 1500 meters. The quantity of energy bars and energy drinks represent two variables. The dependent variable is the time taken to run 1500 meters.
- Example 1 - An interaction occurs if running speed improves by more than just the additive effect of having either an energy bar or an energey drink. For example, imagine eating a certain amount of energy bars increases running speed by 5 seconds, and drinking energy drinks increases running speed by 3 seconds. An interaction occurs if the joint effect of energy bars and energy drinks increases running speed by more than 8 seconds, such as liquid in the drink amplifying the ability to digest the energy in the bar leading to faster times.
- Example 2 - Another example of an interaction effect would be if running time worsened by the joint effect of energy bars and energy drinks -- perhaps the person feels bloated from eating and drinking and so are unable to run quickly.
- Example 3 - A third and final example of an interaction is that alone neither variable may have an effect on running speed, such as imagining that an energy bar by itself, or an energy drink by itself, is unable to increase running speed. But, there might be an interaction effect that influences running speed when you eat the bar and drink the drink, such as the energy bar having a chemical that unleashes the power of the energy drink to increase running speed.
- For those more technically minded, here is the algebra. An interaction effect reflects the effect of the interaction controlling for the two predictors themselves.
- In the following examples:
- energy bar = X1,
- energy drink = X2
- the interaction = X1*X2,
- Y = running speed
- Here is the formula for: Running speed = intercept + b1energu drink + b2energy bar + b3(bar * drink) + ei
- Yi = b0 + b1X1i + b2X2i + b3(X1i X2i) + ei
- This formula can be rewritten as
- Yi = (b0 + b2X2i) + (b1+ b3X2i) X1i + ei
- where (b1+ b3X2i) represents the effect of X1 on Y at specific levels of X2
- and b3 indicates how much the slope of X1 changes as X2 goes up or down one unit.
- It is then possible to factor out X2
- In the following examples:
==Plotting the interaction==