#
#
#################################################################################################
#
#
############ Evaluating MEDIATION with Aroian Test and Regression ############
#
# Using the MacKinnon (2008) data from Chapter 3, page 56 (available on the SPSS_SC web page).
DATASET ACTIVATE DataSet1.
# Equation (1): The mediator (M) predicted by the independent variable (X).
REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N
/MISSING LISTWISE
/STATISTICS COEFF OUTS CI(95) BCOV R ANOVA ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT M
/METHOD=ENTER X
/RESIDUALS HISTOGRAM(ZRESID) NORMPROB(ZRESID).
# Equation (2): The dependent variable (Y) predicted by the independent variable (X).
REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N
/MISSING LISTWISE
/STATISTICS COEFF OUTS CI(95) BCOV R ANOVA ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT Y
/METHOD=ENTER X
/RESIDUALS HISTOGRAM(ZRESID) NORMPROB(ZRESID).
# Equation (3): The dependent variable (Y) predicted by the mediator (M) and the independent variable (X).
REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N
/MISSING LISTWISE
/STATISTICS COEFF OUTS CI(95) BCOV R ANOVA ZPP
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT Y
/METHOD=ENTER M X
/RESIDUALS HISTOGRAM(ZRESID) NORMPROB(ZRESID).
# AROIAN Z-TEST (1944/1947) similar to SOBEL (1982). Aroian is slightly more strict (conservative) than Sobel.
# Now take the following four values from the output of regression equation (1) and regression equestion (3). First
# we need a, which is the unstandardized coefficient of the IV (X) when predicting the mediator (M); which can be
# found in the output of regression equation (1). Here, a = 0.339. Next we need Sa, which is the standard error
# of a; also found in the output of regression equation (1). Here, Sa = 0.122. Next we need b, which is the
# unstandardized coefficient for the mediator (M) from the output of regression equation (3). Here, b = 0.451. Next
# we need Sb, which is the standard error of b; also found in the output of regression equation (3). Here, Sb = 0.146.
# Now, we can plug these values into the Aroian equation:
# a * b / sqrt(b^2 * Sa^2 + a^2 * Sb^2 + Sa^2 * Sb^2)
# Pluggin in the values from the output, we get the following:
# (NOTE: All equations below can be pasted directly into R for calculation):
# .339 * .451 / sqrt(.451^2 * .122^2 + .339^2 * .146^2 +.122^2 * .146^2)
# 0.152889 / sqrt(0.005794344)
# 0.152889 / 0.07612059
# 2.00851
# Given that the calculated Z-value (2.00851) is greater than the critical Z-value for a two-tailed test at
# alpha = .05 (1.96); we can say that we have a significantly different from zero mediation effect.
# Going further, we can calculate the confidence interval for our effect. The estimated mediation effect is equal
# to a*b which for the current example is:
# .339 * .451 = .152889
# Then we can get the standard error of the mediation effect with the following equation:
# sqrt(a^2 * Sb^2 + b^2 * Sa^2)
# which for our example is:
# sqrt(.339^2 * .146^2 + .451^2 * .122^2)
# sqrt(.114921 * .021316 + .203401 * .014884)
# sqrt(.002449656 + .003027420)
# sqrt(.005477076)
# .07400727
# So now, using our critical Z-value (+/- 1.96) and the calculated mediation effect (and standard error for it) we
# can construct our upper and lower 95% confidence limits.
# Upper Limit = 0.152889 + 1.96*.07400727
# UL = 0.152889 + 0.1450542
# UL = 0.2979432
# Lower Limit = 0.152889 - 1.96*.07400727
# LL = 0.152889 - 0.1450542
# LL = 0.0078348
#### REFERENCES ####
# Aroian, L. A. (1944/1947). The probability function of the product of two normally distributed variables. Annals of
# Mathematical Statistics, 18, 265-271.
# Clark, M. J. (2004). Moderators and Mediators. RSS Matters, August, 2004.
# (http://www.unt.edu/benchmarks/archives/2004/august04/rss.htm).
# MacKinnon, D. P. (2008). Introduction to Statistical Mediation Analysis. New York: Lawrence Erlbaum Associates.
# Sobel, M. E. (1982). Asymptotic intervals for indirect effects in structural equations models. In S. Leinhart (Ed.),
# Sociological methodology 1982 (pp.290-312). San Francisco: Jossey-Bass.