Monday, March 13, 2006

Interpreting Interactions

Daniel Bauer and Patrick Curran have written a paper called Probing interactions in fixed and multilevel regression: Inferential and graphical techniques in the journal Multivariate Behavioral Research which describes a method for probing interactions between continuous variables.

I'll illustrate this in SPSS, using the data file which is used to illustrate interactions in the book Applying regression and correlation. You can get it here (in SPSS format). The dataset comprises the number of books (on statistics) that students read, the number of lectures that they attended, and the final grade they got. To spoil the ending, both number of books they read and number of lectures they attended were positive predictors of final grade. However, in addition, there is an interaction between books and grade.

To discover this, we standardise the two predictor variables and multiply them together to create the interaction variable. We then regress grade onto the standardised books, attendance and the interaction variables.

The results are shown in the following table:

Variable

B

Std. Error


p

Lower 95% CI

Upper 95% CI

Zscore(books)

5.951

2.403


.018

1.076

10.825

Zscore(attend)

5.702

2.404


.023

.827

10.578

Interaction

4.503

2.140


.042

.162

8.844


It's pretty clear that books has an effect, and attendance has an effect. We can interpret these in terms of standard deviations - we predict that a person who reads 1 SD more books will (controlling for attendance and the interaction term) achieve a grade that is 5.95 points higher. We predict that a person who attends 1 SD more lectures will achieve a grade that is 5.70 points higher.

And we predict something from the interaction term, but we aren't exactly sure what yet.

One way to see what we do predict from the interaction term is to 'pick a point'. Choose arbitrary values for attendance (say) plug them into the equation and see what happens.

Let's do that first. Because we don't like stuff to be hard, we will pick a low, medium and high number of attendances. The easiest way to do this is to use z-scores -1, 0 and 1, respectively.

Then, our equation looks like this:

Pred Grade = books * 5.95 + attendance * 5.70 + interaction * 4.50

We can expand this - because we know that the interaction is equal to books * attendance

Pred Grade = books * 5.95 + attendance * 5.70 + books * attendance * 4.50

Now we just stick -1, 0 or 1 into attendance, for a low medium and high attender.

Low (-1)
Pred Grade = books * 5.95 + -1* 5.70 + books * -1 * 4.50

Notice a couple of times we multiply a value by -1. Multiply those out.

Pred Grade = books * 5.95 + -5.70 + books * -4.50

Now notice that we have boos * 5.95 + books * -4.50 - that makes books * (5.95 - 4.50) which makes books * 1.45

Pred Grade = books * 1.45 + -5.70

And, as we aren't interested in the constant, we can lose anything that's not multiplied by books.
Pred Grade = books * 1.45

Same again for medium (this one's easier, because we just multiple by zero a lot).
Pred Grade = books * 5.95 + 0* 5.70 + books * 0 * 4.50
Pred Grade = books * 5.95

Same again for high:
Pred Grade = books * 5.95 + 1* 5.70 + books * 1 * 4.50
Pred Grade = books * 10.45

So, if you don't attend many lectures, reading another SD of books is going to help you a bit, but only a bit - your predicted grade only goes up by 1.45. If you are a moderate attender, you increase your predicted grade by 5.95 for the same number of books, and if you are a high attender, your predicted grade increases by 10.45 for the same number of books. (Notice that we are always saying predicted grade - we don't know that this is the cause).

This is all well and good, but we might want stuff like p-values on these, or standard errors, or confidence intervals. We might say that for the low attender the relationship isn't even statistically significant - reading more books doesn't help (because the low attenders might read the wrong books). This is where Bauer and Curran's paper comes in.

I'm not going to go into the nitty gritty. I'm just going to show what you can do with it. I'm going to use some calculators that you can find here. (But in the future, it looks like they might be here, and I'll probably forget to change this.)

The most exciting piece of output is this graph (and the tools on the web let you draw it; click on the graphs for bigger, clearer images).


The graph shows, on the x-axis, the (z-score of) the number of lectures attended by the student. On the y-axis is the simple slope of the (z-score of) books read. We evaluated that slope at -1, 0 and +1. We could do that by looking at those positions on the x-axis, tracking up to the black like, and reading off the values on the y-axis. The values appear to be where we said they would be - I've drawn in the lines on the next chart - remember our earlier calculations showed that they should be at 1.45, 5.95 and 10.45.


However the more exciting thing is the red lines. These show the confidence intervals around the slope. We said that if lecture attendance was low, we might expect that the effect of reading more books was not statistically significant. This does appear to be the case - the confidence intervals of the slope include 0 when the number of lectures attended is low.
Finally, the vertical dotted line shows the (z) value of lectures at which the p-value of the slope becomes statistically significant. This line appears at -0.21. In other words, if the z-score of the number of books read is below -0.21, we do not have evidence that reading more books will help improve the person's predicted grade.

9 Comments:

At 9:49 PM , Blogger bill said...

I absolutely do not understand this, but at one time, lo, these many years ago, when I was studying quant methods, and linear regressions were conceptually obvious to me, I would have. And for that fond memory of competence, I thank you.

 
At 10:06 PM , Blogger Jeremy Miles said...

This is fairly conceptually difficult. If you already know (or knew once) about interpreting multiplicative interaction terms, this should make it a bit easier.

If you didn't, it probably won't make any sense at all.

 
At 7:39 AM , Blogger Vladimir said...

Thanks for the post, but, unfortunately, graphs like this
http://www-users.york.ac.uk/%7Ejnvm1/pics/pic1.gif
won't open. Could you fix it, please?

 
At 1:58 PM , Blogger Adai said...

Hi, this article is very interesting. It would be even more useful if the link to the pictures was working. Thank you.

 
At 6:30 AM , Blogger davo said...

I am trying to find an easy step by step resource which shows me how to interpret interactions in regression from start to finish in spss, a resource that reads for the statistical simpleton that I am - and I'm damned if I can find one

 
At 6:30 AM , Blogger davo said...

I am trying to interpret interactions in multiple regression for a dissertation and I can't for the life of me find a resource that will show me how to do this without a lot of drama in spss... any suggestions?

 
At 2:31 PM , Blogger J said...

Hi Davo, You can do this in SPSS, without a massive amount of drama, but there is some. The easiest way is to use the Aiken and West 'pick a pont' approach, and create pseudo-cases.

Send me an email, and I'll send you a handout that I use (in my Essex Summer School course on regression) that explains it.

 
At 4:59 AM , Blogger blazodan said...

Don't give up, folks. I kept looking at this site and finally figured it out. Maybe my answer to my hw will help you understand it better"


Fractionalization index: 0-5, higher numbers = more fractionalization


Minority index: 0-1, 0=minority government, 1=majority government
Duration of government = a + b1*fract + b2*minority + b3*(fract*minority)
=
24.749 + -2.223*fract + -12.497*minority + 3.451 (fract*minority)



Estimated duration of government in months for fract=0:
Minority: 24.749 + -2.223*0 + -12.497*0 + 3.451(0*0) = 24.749
Majority: 24.749 + -2.223*0 + -12.497*1 + 3.451(0*1) = 12.252



Estimated duration of government in months for fract=3:
Minority: 24.749 + -2.223*3 + -12.497*0 + 3.451(3*0) = 18.080
Majority: 24.749 + -2.223*3 + -12.497*1 + 3.451(3*1) = 15.936


Estimated duration of government in months for fract=5:

Minority: 24.749 + -2.223*5 + -12.497*0 + 3.451(5*0) = 13.634
Majority: 24.749 + -2.223*5 + -12.497*1 + 3.451(5*1) = 18.392

These results show that the hypothesis: “that minority governments tend to last longer when there is a lot of fractionalization” is not supported by the data. In fact, the opposite relationship is revealed by the data. More fractionalization tends to offer majority governments longer durations of government while offering minority governments shorter durations.

 
At 5:44 PM , Blogger Andrew F. Hayes said...

If you are a SPSS or SAS user, you will find the procedure available at http://www.comm.ohio-state.edu/ahayes/macros.htm somewhat easier to use. Click the MODPROBE link.

 

Post a Comment

<< Home