I want to do a mediation analysis, with the following variables:

X: Independent variable: Categorical (2 levels)
M: Mediator: Categorical (5 levels)
Y: Dependent variable: Continuous

my model:

enter image description here

Following MacKinnon, Lockwood, Hoffman, West, & Sheets (2002), I need to perform 2 analysis:

  1. Regression analysis with X as independent and Y as dependent variable.
  2. Regression analysis with X and Y as independent variables and M as dependent variable.

A full mediation would mean:

  • The Regression weight X -> Y in the first analysis is significant

  • The Regression weight Y -> M in the second analysis is significant

  • The Regression weight X -> M in the second analysis is not significant

I have 3 questions:

  1. Is the above a (so not the) right thing to perform mediation analysis?
  2. Is my second analysis a multinomial logistic regression?
  3. Is my first analysis a GLM univariate?

For my analysis, I can only use SPSS 19 (without SEM).

Reference: MacKinnon, D.P., Lockwood, C.M., Hoffman, J.M., West, S,.G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. Psychological Methods. 3, 309 - 327.

  • $\begingroup$ Are these longitudinal data? It's an elusive point, but many biostatisticians (like me) would hazard against using cross-sectional data to test for mediation. $\endgroup$
    – AdamO
    Commented Mar 25, 2016 at 21:09
  • 1
    $\begingroup$ Is there a reason for this: "For my analysis, I can only use SPSS 19". Why can't you use (say) R, which is free? $\endgroup$ Commented Jul 29, 2016 at 14:27

3 Answers 3


I 80% agree with your explanation. Based on Baron and Kenny (1986), your explanation is consistent with what scholars usually do. X is not supposed to be significant when you include M in the formula. Good. However, you can still say that M partially mediates the link between X and Y if the coefficient of X on Y gets smaller when you include M.

For the second question, I think what you are trying to do can resolve the problem, but I would simply employ regression with dummy variables.

For the last question, I would say the same. Why don't you just use simple regression with dummy variables?

Your X has only two levels. So you can simply code 0 and 1. Just in case you haven't gone through dummy coding:) hope it helps!



In the Baron and Kenney framework, a variable $M$ is called a mediator if comparing the two analyses:

$E[Y|X] = \beta_0 + \beta_1 X$

$E[Y|X, W] = \beta^*_0 + \beta^*_1 X + \beta_2^*W$

has $\beta_1 \ne \beta_1^*$. Both of these models are simply estimable from a linear regression using categorical effects for binary $X$ (one coefficient) and polytomous $W$ (five levels, four coefficients). You can obtain confidence intervals for the $\beta_1 - \beta_1^*$ by bootstrapping (you must estimate both models from the same bootstrapped dataset, however).

Baron and Kenney had also found that, when $W$ is continuously valued, the equivalent test of mediation is obtained by fitting a third model:

$E[W | X] = \gamma_0 + \gamma_1$

and multiplying the $\gamma_1 \beta_1$ gave a hypothesis test equivalent to $\beta_1 - \beta_1^*$, that is: $\gamma_1 \beta_1 = 0 \implies \beta_1 = \beta^*_1$. So the tests of hypothesis are identical.

Of course, with $W$ categorical, you would need a log linear model, and a sort of complicated ANOVA of product effects. It is a conservative approach whereas the approximation is anticonservative (increases type I error). When faced with the problem, I favor a conservative approach.

In either case, using the bootstrap to obtain an empirical error estimator would be highly preferential. There are variance approximations, but these are highly dependent upon the normality assumption. Unlike the t-test, I bet the approximations are not robust.

A last note, the Baron and Kenny test of mediation has been criticized. I appreciate the article from Pearl which encourages the earnest statistician to expand their conceptual model to a large panel of causal factors, not just a few, including confounding variables and precision variables, to be sure the "mediator" is not a proxy for other possible confounders.


I'm not an expert in mediation, but I'm reviewing the subject and I've found this:

(23) “My advisor tells me I should use the Baron and Kenny strategy for assessing mediation. But my reading of the literature tells me this isn’t recommended these days. What should I do?”

You have counted on your advisor for guidance and support. Now return the favor. All but the most stubborn of advisors are open to new ideas, and many are too busy or just don’t care enough to stay informed on recent developments. Give him or her a copy of the relevant literature or a copy of my book and make your case. Try my Beyond Baron and Kenny paper for a start (Communication Monographs, 2009, vol 76, p. 408-420). [PDF]


This means that you're not using the most up-to-date procedure. Good news is that you can find in that page apparently easy-to-work-with SPSS macros to try the new approach. The bad news is that they cannot be used with categorical mediators. I haven't found any option to do that in SPSS. I still do not now if it can be done in R or Stata.

Best regards


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.