## Monday, December 18, 2017

### Statistics Sunday: Mediation versus Moderation

I had a wonderful but very busy weekend, performing Händel's Messiah twice. Unfortunately, this means I didn't have a chance to sit down and write my Statistics Sunday post until, well, Monday. But hey, the holidays are coming soon, many of my university friends are wrapping up their semesters, and a lot of my coworkers are off this week because their kids are home. So it's kind of virtual Sunday, right?

Today, I wanted to write about two misunderstood concepts: mediation and moderation. Both deal with relationships among 3 (or more) variables, but they tell you very different things and are tested in different ways.

I've blogged before about mediation. Mediation can be thought of as another term for "caused by" or "explained by." You have mediation when the relationship between your independent and dependent variables is caused by or explained by their relationships with a third variable. Specifically, it means your independent variable causes the mediator, which in turn causes the dependent variable. It's like a chain reaction. (Note that you also need to have specific methods to get at this notion of cause, so I'm using these terms more loosely than I should be. But when introducing the concept of mediation, I find it easiest to frame it in terms of cause.)

There are two big ways to measure mediation. One is through 3 linear regressions: 1) effect of independent variable on dependent variable, 2) effect of independent variable on mediator, and 3) effect of both independent variable and mediator on dependent variable. If you observe the following:

1. Independent variable has a significant effect on the dependent variable (equation 1)
2. Independent variable has a significant effect on the mediator (equation 2)
3. Independent variable no longer has a significant effect on the dependent variable, but the mediator has a significant effect on the dependent variable (equation 3)

you have evidence of mediation. Fortunately, you don't have to just eyeball your regression results. You would use the results of these regressions to conduct a Sobel test: check out this great website and online calculator to help with understanding and testing mediation.

The other way to test mediation is structural equation modeling. This would work for simple mediations, like the one described above, but is probably more useful when testing complex mediation - for instance, when you have multiple mediators in your chain reaction.

Moderation, on the other hand, is another term for "depends on." That is, the precise impact your independent variable has on your dependent variables depends on where you fall on the moderator. When I used to teach research methods, I'd often have students discuss what effect they think a certain independent variable would have on a dependent variable.

One example I used was divorce: what impact do they think divorce would have on a child's well-being? (I have to thank a past student for suggesting this topic, since they thought it was something most people have encountered: either directly because their parents are divorced, or indirectly because friends' parents might be divorced.) Partway through discussion, I would ask them what they think that impact depends on; what might change that impact? They always have lots of ideas. It might depend on age - it could have a stronger impact on younger children but less of an impact on high school or college-aged children. It might depend on whether the child has siblings - they thought it would be harder on an only child. As the list grew, I would explain to them that these are moderators. And we would say it as, for example, the effect of divorce on a child's well-being depends on their age.

Moderation is tested with interactions, which you can conduct with a factorial ANOVA or multiple regression, where you would create interaction terms. I usually use the latter method, because it gives you the same results as an ANOVA when all of your variables are discrete, and also can be used with continuous variables, while ANOVA cannot. If you're using the latter, I highly recommend this book by Aiken and West - kind of the bible on interactions in multiple regression.

So, as you can (hopefully) see, moderation and mediation reflect different kinds of relationships. (And if this explanation is unclear or you still have questions, please share them in the comments!) And because these are different kinds of relationships, there are situations where you could test both. Yes, crazy as it sounds, there are such things as moderated mediation and mediated moderation. A post for another day!

1. The description of mediation analysis you provided is based on the classic Baron and Kenny 1986 paper. As it happens, that paper is outdated. Its methodology has been criticized due to various pitfalls and misconceptions. As one source highlighting my point see

A. F. Hayes (2009). Beyond Baron and Kenny: Statistical Mediation Analysis in the New Millennium. Communication Monographs, 76, 408-420.

Dr. Hayes has a lot to offer on the topic (papers, books, SPSS and SAS scripts).

You should definitely check it.

2. What would you say, Anonymous, is the biggest issue in not using Hayes' macro? (although, we all agree that the Sobel test is not a good idea, but another alternative is simply the joint significance of a and b in mediation terminology)

3. Thanks, both, for your comments! This was the method I learned in grad school, but I recognize I may be behind the times. I did have the chance to use a mediation macro when assisting a former colleague with her dissertation analyses; she had been told by a member of her committee to use this technique and was having some difficulty figuring it out. It was probably Hayes's macro, but I admit that I don't remember for certain. As I recall, when I went to the website to find readme/documentation for the macro, I was referred to a page to buy a textbook. I was rather disappointed about this, and ended up doing a lot of Googling to figure out how to conduct the analyses my colleague needed.