본문 바로가기
공부하기/경영학과 군사학

SPSS and SAS procedures for estimating indirecteffects in simple mediation models

by 리치캣 2023. 2. 6.
반응형

Behavior Research Methods, Instruments, & Computers 2004, 36 (4), 717-731 Psychologists often conduct research to establish whether and to what extent one variable affects another. However, the discovery that two variables are related to each other is only one small part of the aim of psychology. Deeper understanding is gained when we comprehend the process that produces the effect. For example, it might be useful to know whether a management training program leads to an increase in employee satisfaction by affecting employee attitudes toward management or by changing behavioral habits. In this example, attitudes and habits are potential mediators of the relationship between the management training program and employee satisfaction. A variable may be called a mediator “to the extent that it accounts for the relation between the predictor and the criterion” (Baron & Kenny, 1986, p. 1176).1 Panel A of Figure 1 represents the effect of some proposed cause (X ) on some outcome (Y ). Panel B of Figure 1 represents the simplest form of mediation—the type that occurs when one variable (M) mediates the effect of X on Y. We term this model simple mediation. More complex mediation models are possible, but we limit our discussion here to simple mediation because it is by far the most commonly employed type of mediation model. The simple relationship between X and Y is often referred to as the total effect of X on Y (see Figure 1, panel A); we denote the total effect c to distinguish it from c¢, the direct effect of X on Y after controlling for M (see Figure 1, panel B). The formal heuristic analysis often used to detect simple mediation effects is straightforward and follows directly from the definition of a mediator provided by Baron and Kenny (1986). Variable M is considered a mediator if (1) X significantly predicts Y (i.e., c  0 in Figure 1), (2) X significantly predicts M (i.e., a  0 in Figure 1), and (3) M significantly predicts Y controlling for X (i.e., b  0 in Figure 1). Baron and Kenny discuss several analyses that should be performed and the results assessed with respect to the criteria just described. These criteria are assessed by estimating the following equations: where i is an intercept coefficient. When the effect of X on Y decreases to zero with the inclusion of M, perfect mediation is said to have occurred (James & Brett, 1984, call this situation complete mediation). When the effect of X on Y decreases by a nontrivial amount, but not to zero, partial mediation is said to have occurred.2 In addition to satisfying these requirements, two further assumptions must be met in order to claim that mediation has occurred, according to Baron and Kenny; namely, there should be no measurement error in M, and Y should not cause M. The ˆ ( ) ˆ ( ) ˆ ( ) Y i cX M i aX Y i c X bM = + = + = + ¢ + 1 2 3 1 2 3 717 Copyright 2004 Psychonomic Society, Inc. We thank Nancy Briggs, Donna Coffman, Jinyan Fan, and Robert MacCallum for helpful comments. Correspondence regarding this article should be addressed to K. J. Preacher, Department of Psychology, CB #3270 Davie Hall, University of North Carolina, Chapel Hill, NC 27599-3270 (e-mail: preacher@unc.edu). SPSS and SAS procedures for estimating indirect effects in simple mediation models KRISTOPHER J. PREACHER University of North Carolina, Chapel Hill, North Carolina and ANDREW F. HAYES Ohio State University, Columbus, Ohio Researchers often conduct mediation analysis in order to indirectly assess the effect of a proposed cause on some outcome through a proposed mediator. The utility of mediation analysis stems from its ability to go beyond the merely descriptive to a more functional understanding of the relationships among variables. A necessary component of mediation is a statistically and practically significant indirect effect. Although mediation hypotheses are frequently explored in psychological research, formal significance tests of indirect effects are rarely conducted. After a brief overview of mediation, we argue the importance of directly testing the significance of indirect effects and provide SPSS and SAS macros that facilitate estimation of the indirect effect with a normal theory approach and a bootstrap approach to obtaining confidence intervals, as well as the traditional approach advocated by Baron and Kenny (1986). We hope that this discussion and the macros will enhance the frequency of formal mediation tests in the psychology literature. Electronic copies of these macros may be downloaded from the Psychonomic Society’s Web archive at www.psychonomic.org/archive/. (1) 718 PREACHER AND HAYES first of these assumptions is routinely violated, but that is not the focus of our discussion here. At the end of this article, we shall emphasize that, ultimately, the validity of one’s conclusions about mediation is determined by the design of the study as much as by statistical criteria. Mediation hypotheses are frequently tested in both basic and applied psychological research, and mediation analyses are most often guided by the procedures outlined by Baron and Kenny (1986). For example, in an informal content analysis of the 2000, 2001, and 2002 issues of the Journal of Applied Psychology, we found that 22% of the articles reported an analysis focused on mediation, and the overwhelming majority of them were based on the Baron and Kenny procedure. We believe this to be fairly representative of the major journals in psychology, not only with respect to the frequency of mediation hypotheses but also to the use of the Baron and Kenny criteria for assessing mediation. Indeed, their paper is one of the most frequently cited in the modern psychological literature, with nearly 5,300 citations as of September 2004, according to the Science Citation Index. There are more statistically rigorous methods by which mediation hypotheses may be assessed. Baron and Kenny (1986) describe a procedure developed by Sobel (1982; hereafter referred to as the Sobel test) that provides a more direct test of an indirect effect. In the case of simple mediation, the Sobel test is conducted by comparing the strength of the indirect effect of X on Y to the point null hypothesis that it equals zero. The indirect effect of X on Y in this situation is defined as the product of the XÆM path (a) and the MÆY path (b), or ab. In most situations,3 ab  (c  c¢), where c is the simple (i.e., total) effect of X on Y, not controlling for M, and c¢ is the XÆY path coefficient after the addition of M to the model (see Figure 1). Standard errors of a and b are represented, respectively, by sa and sb. The standard error of the indirect effect (sab) is given by Aroian (1944), Mood, Graybill, and Boes (1974), and Sobel (1982) as (4) In order to conduct the test, ab is divided by sab to yield a critical ratio that is traditionally compared with the critical value from the standard normal distribution appropriate for a given alpha level. One of the assumptions necessary for the Sobel test is that the sample size is large, so the rough critical value for the two-tailed version of the test, assuming that the sampling distribution of ab is normal and that a  .05, is 1.96. As sample size becomes smaller, the Sobel test becomes less conservative. One variation of the Sobel test subtracts the last term of the standard error (s2 a s2 b in Equation 4) rather than adds it (Goodman, 1960). Another version omits s2 a s2 b altogether because it is likely to be trivial (Baron & Kenny, 1986; Goodman, 1960; MacKinnon & Dwyer, 1993; MacKinnon, Warsi, & Dwyer, 1995; Sobel, 1982). Sobel (1982) describes a general procedure whereby more complicated indirect effects may be tested. The utility and performance of the Sobel test has been discussed and demonstrated frequently (Hoyle & Kenny, 1999; MacKinnon, 1994; MacKinnon & Dwyer, 1993; MacKinnon et al., 2001; MacKinnon, et al., 1995; Stone & Sobel, 1990). MacKinnon, Lockwood, Hoffman, West, and Sheets (2002), in their comparison of 14 methods of assessing mediation effects, settle on the Sobel test (and its variants) as superior in terms of power and intuitive appeal. But, as we discuss below, there is reason to be suspicious of the use of the normal distribution for coms bs as ss ab a b a b = + + 22 22 22. Figure 1. Panel A: Illustration of a direct effect. X affects Y. Panel B: Illustration of a mediation design. X affects Y indirectly through M. TESTING INDIRECT EFFECTS 719 puting the p value for the Sobel test because the sampling distribution of ab may not be normal. Curiously, the Sobel test is discussed, with requisite formulas, by Baron and Kenny (1986), but it is rarely used in practice (cf. MacKinnon et al., 2002). We cannot say for sure why the significance of the indirect effect is rarely tested formally, but at least two possibilities suggest themselves. First, the statistical significance of the difference between the total effect (c) and the direct effect (c¢) of X on Y is not formally stated by Baron and Kenny as a requirement for mediation. Instead, Baron and Kenny simply state that perfect mediation has occurred if c¢ becomes nonsignificant after controlling for M, so researchers have focused on that requirement. Second, whereas most popular programs used for regression (such as SPSS and SAS) will conduct all the tests required to establish mediation according to the Baron and Kenny criteria, few of the commonly used programs conduct a test of the null hypothesis that the indirect effect (c  c¢) is 0 (or, equivalently, that ab  0). Although these programs provide all the information needed for the researcher to conduct the Sobel test manually, some extra hand computation is required, and researchers simply may not see the point in bothering with those computations given that the significance of the indirect effect is not listed by Baron and Kenny as one of the criteria for establishing mediation. Before we proceed, it is important to clarify a potentially confusing point. Although the terms mediated effects and indirect effects are sometimes used interchangeably, an important distinction should be drawn between them in general (Holmbeck, 1997). A mediated effect is usually thought of as the special case of indirect effects when there is only one intervening variable. However, a conclusion that a mediation effect is present implies that the total effect XÆY was present initially. There is no such assumption in the assessment of indirect effects. It is quite possible to find that an indirect effect is significant even when there is no evidence for a significant total effect. Whether or not the effect also represents mediation should be judged through examination of the total effect. For contrasting views on the requirement that XÆY be significant, see Collins, Graham, and Flaherty (1998), MacKinnon (2000), and Shrout and Bolger (2002). In the remainder of this article, we provide arguments favoring estimation of the indirect effect of X on Y through M and end with a description of an SPSS macro that will formally test the significance of the indirect effect both parametrically and nonparametrically, while simultaneously providing the output relevant to assessing mediation with the Baron and Kenny criteria, all in a few lines of output. An equivalent SAS version of the macro is also provided. We hope that access to these macros will make it more likely that researchers will include a formal test of the indirect effect as part of simple mediation analyses. The Need for a Formal Test Given that Baron and Kenny (1986) provide a conceptually appealing recipe to follow in order to determine the presence or absence of a mediation effect, one may well ask why it is necessary to perform a formal significance test of the indirect effect if the Baron and Kenny criteria have been met. Two broad benefits of formal testing may be suggested. First, there are shortcomings inherent in the Baron and Kenny method. For example, Holmbeck (2002) points out that it is possible to observe a change from a significant XÆY path to a nonsignificant XÆY path upon the addition of a mediator to the model with a very small change in the absolute size of the coefficient. This pattern of results may lead a researcher to erroneously conclude that a mediation effect is present (Type I error). Conversely, it is possible to observe a large change in the XÆY path upon the addition of a mediator to the model without observing an appreciable drop in statistical significance (Type II error). The latter situation is especially likely to occur when large samples are employed because those are the conditions under which even small regression weights may remain statistically significant. Finally, it is possible for a Type I error about mediation to occur if either a or b appears to be statistically different from zero when one of them is in fact zero in the population. A Type I error in the test of either a or b (or both) could lead to an incorrect conclusion about mediation. Second, testing the hypothesis of no difference between the total effect (c) and the direct effect (c¢) more directly addresses the mediation hypothesis than does the series of regression analyses recommended by Baron and Kenny (1986). In the case of simple mediation, the indirect effect of X on Y through M is measured as the product of the XÆM and MÆY paths (ab), which is equivalent to (c  c¢) in most situations. Therefore, a significance test associated with ab should address mediation more directly than a series of separate significance tests not directly involving ab. In addition, it has been found that the method described by Baron and Kenny (1986) suffers from low statistical power in most situations (MacKinnon et al., 2002). Intuition suggests that this may be the result of the requirement that both the a and b coefficients be statistically significant, according to the Baron and Kenny criteria. Especially in small samples, it is possible that either the a or the b coefficient (or both) may be nonsignificant only because of low statistical power. If either of these parameters fails to meet the Baron and Kenny criteria even though they are in fact nonzero in the population, the investigator cannot claim mediation by the Baron and Kenny criteria, and thus a Type II error results. In contrast, testing the null hypothesis that (c c¢)  0 requires one fewer hypothesis test, and thus a Type II error in the testing of mediation would be less likely. Indeed, joint significance tests involving the product of coefficients such as the Sobel test have been found to have greater statistical power than that of other formal methods of assessing mediation, including the Baron and Kenny approach (MacKinnon et al., 2002). Thus, a more powerful strategy for testing mediation may be to require only (1) that there exists an effect to be mediated (i.e., c  0) and (2) that the indirect effect be statistically significant in the direction predicted by the mediation hypothesis. 720 PREACHER AND HAYES Estimating the Size and Significance of the Indirect Effect Appendixes A and B contain macros for SPSS and SAS that provide a test of the indirect effect using the Sobel test (the version that uses the standard error in Equation 4) as well as a version that relies on a nonparametric bootstrapping procedure. The macros also provide all the output that one needs in order to assess mediation using the Baron and Kenny (1986) criteria. SPSS and SAS are very widely used throughout the social sciences, and in psychology in particular, and we hope that these macros will increase the likelihood that researchers will conduct a formal test of the significance of the indirect effect in simple mediation models. A macro is a program that will run when a shortcut command is given to execute it. Rather than running the entire program for each analysis, the program simply needs to be “activated” by running it once or requesting that it be executed first in a batch using the INCLUDE command (see the SPSS or SAS manuals for guidance on the use of the INCLUDE command). The user needs to run the macro only once when SPSS or SAS is first executed; the macro will remain active until the user quits the program. The use of the macros is documented in the appendixes, and electronic copies of the macros themselves can be obtained at http://www.comm.ohio-state.edu/ahayes/sobel.htm. Suppose an investigator is interested in the effects of a new cognitive therapy on life satisfaction after retirement. Residents of a retirement home diagnosed as clinically depressed are randomly assigned to receive 10 sessions of a new cognitive therapy (X  1) or 10 sessions of an alternative therapeutic method (X  0). After Session 8, the positivity of the attributions the residents make for a recent failure experience is assessed (M). Finally, at the end of Session 10, the residents are given a measure of life satisfaction (Y ). The question is whether the cognitive therapy’s effect on life satisfaction is mediated by the positivity of their causal attributions of negative experiences. Output of the SPSS version of the macro is displayed in the top half of Figure 2 using hypothetical data.4 In accordance with the instructions in Appendix A, this output was generated with the following command: sobel ysatis / xtherapy / mattrib / boot5000. The macros provide unstandardized coefficients for regression Equations 1–3 given above and discussed by Baron and Kenny (1986) as required to test mediation. The rows of output are interpreted as follows: b(YX ) is the total effect of the independent variable X on the dependent variable Y (c in Figure 1). This effect is statistically different from zero in this example; residents who received the cognitive therapy felt more satisfied with life after 10 sessions than did those who did not receive the therapy. The next row of the output, b(MX ), is the effect of the independent variable on the proposed mediator M (a in Figure 1), also statistically different from zero; residents who received the cognitive therapy made more positive attributions for a recent failure experience. The third row of the output, b(YM.X), is the effect of the mediator on the dependent variable, controlling for the independent variable (b in Figure 1). Residents who made more positive attributions for a prior failure tended to be more satisfied with life, even after controlling for whether or not they received the therapy. Finally, b(YX.M ) is the direct effect of the independent variable on the dependent variable, controlling for the mediator (c¢ in Figure 1). This effect is not statistically different from zero, indicating no relationship between method of therapy and life satisfaction after controlling for the positivity of attributions for failure. In this example, all of Baron and Kenny’s criteria for mediation are established, and the evidence is that positivity of attributions completely mediates the effect of cognitive therapy on life satisfaction. The output also contains the estimate of the indirect effect of X on Y through M. In this example, the indirect effect is 0.3306, which is both ab in Figure 1, or b(MX)  b(YM.X) from the output, as well as c  c¢ in Figure 1, or b(YX)  b(YX.M ) from the output. A formal twotailed test of the significance of this indirect effect follows, based on the assumption that the ratio of the indirect effect to its standard error is normal. From Equation 4, the standard error is estimated as shown in the equation at the bottom of this page. The macro also produces a 95% confidence interval5 for the size of the indirect effect, again on the assumption that the sampling distribution of the effect is normal. Whereas the procedure outlined by Baron and Kenny involves combining the results of several hypothesis tests, the Sobel test directly addresses the primary question of interest—whether or not the total effect of X on Y is significantly reduced upon the addition of a mediator to the model. The Sobel test contradicts the Baron and Kenny (1986) strategy and suggests no mediation (z  1.67, p  .05). However, there is reason to be suspicious of the results of the Sobel test in this case. As alluded to earlier, the twotailed p value [under “Sig(two)” in the output] is based on the assumption that the distribution of ab (or c  c¢) follows a normal distribution under the null hypothesis. But this assumption has been seriously questioned. Not only is the distribution not necessarily normal, often it is not even symmetrical, especially in small samples (Bollen & Stine, 1990). Because the distribution of products is usually positively skewed, the symmetric confidence interval based on the assumption of normality will typically yield underpowered tests of mediation. As a consequence of these problems, MacKinnon et al. (2002) argue against the use of the normal distribution for assessing significance s ab = (. )(. ) (. )(. ) (. )(. ) . . 0 4039 0 2990 0 8186 0 1808 0 2990 0 1808 0 1985 + + = 22 22 22 TESTING INDIRECT EFFECTS 721 and instead suggest either comparing the obtained product with a table of critical values established through simulation research, or using an alternative approach that also requires a table of critical values in order to assess significance. Unfortunately, those tables and the research on which they are based are not published in a source conveniently available to many (Meeker, Cornwell, & Aroian, 1981). An alternative approach is to bootstrap the sampling distribution of ab and derive a confidence interval with the empirically derived bootstrapped sampling distribution. Bootstrapping is a nonparametric approach to effect-size Figure 2. SPSS macro output and a graphical depiction of the bootstrapped sampling distribution of the indirect effect. 722 PREACHER AND HAYES estimation and hypothesis testing that makes no assumptions about the shape of the distributions of the variables or the sampling distribution of the statistic (see, e.g., Efron & Tibshirani, 1993; Mooney & Duval, 1993). This approach has been suggested by others as a way of circumventing the power problem introduced by asymmetries and other forms of nonnormality in the sampling distribution of ab (Bollen & Stine, 1990; Lockwood & MacKinnon, 1998; Shrout & Bolger, 2002). It also produces a test that is not based on large-sample theory, meaning it can be applied to small samples with more confidence. The macros provide a bootstrap estimate of the indirect effect ab, an estimated standard error, and both 95% and 99% confidence intervals for population value of ab. The bootstrapping is accomplished by taking a large number of samples of size n (where n is the original sample size) from the data, sampling with replacement, and computing the indirect effect, ab, in each sample. Assume for the sake of illustration that 1,000 bootstrap samples have been requested. The point estimate of ab is simply the mean ab computed over the 1,000 samples, and the estimated standard error is the standard deviation of the 1,000 ab estimates. To derive the 95% confidence interval, the elements of the vector of 1,000 estimates of ab are sorted from low to high. The lower limit of the confidence interval is defined as the 25th score in this sorted distribution, and the upper limit is defined as the 976th score in the distribution. Using the same logic, the upper and lower bounds of a 99% confidence interval correspond to the 5th and 996th scores in the sorted distribution of 1,000 estimates, respectively. As can be seen in the output, the bootstrapped estimate of the indirect effect is similar to the point estimate computed from the conventional regression analysis of the raw data, and the true indirect effect is estimated to lie between 0.0334 and 0.7008 with 95% confidence. Because zero is not in the 95% confidence interval, we can conclude that the indirect effect is indeed significantly different from zero at p  .05 (two tailed). Observe the slight asymmetry in the confidence interval, evidenced by the fact that the upper and lower bounds of the confidence interval are not equidistant from the point estimate. Through a modification of the macro as described in Appendix A, the bootstrap estimates of ab can be output as a new data file, and the distribution of the estimates then depicted graphically, as in the lower half of Figure 2. The asymmetry of the sampling distribution of the indirect effect is evident visually, and a formal test that skew  0 can be rejected in this case. Bollen and Stine (1990) and Shrout and Bolger (2002) provide other examples with real and simulated data sets illustrating that the sampling distribution of the indirect effect is not always symmetrical or normal. A second example illustrates the distinction between mediation and indirect effects, and how different analytical strategies can produce different results. Suppose patients with Alzheimer’s disease are randomly assigned to receive a drug (X  1) or placebo (X  0) that purportedly can increase a patient’s long-term memory (Y ) through its effect on the rate of neural regeneration (M ). Figure 3 displays the output from the SPSS macro. As can be seen, neural regeneration could not possibly be a mediator of the drug’s effect by the Baron and Kenny (1986) criteria, because the drug has no initial direct effect on memory. However, there is evidence that the drug does have an indirect effect on memory, with the effect occurring through neural regeneration. The positive, albeit nonsignificant, relationship between receipt of the drug and memory (c  0.27) is smaller after controlling for rate of neural regeneration (c¢  0.02). The bootstrap output shows that the indirect effect is different from zero with 95% confidence, but the Sobel test (which incorrectly assumes normality of ab) does not. The lower half of Figure 3 clearly shows that the assumption of normality of the sampling distribution is unwarranted. Indeed, a formal statistical test of the normality of the sampling distribution estimated with the bootstrap leads to a rejection of that assumption. DISCUSSION Our discussion and the macros presented here apply only to the case of the simple mediation model, depicted in Figure 1, panel B. Many extensions to the simple mediation model are, of course, possible, as noted earlier. MacKinnon, Krull, and Lockwood (2000) have demonstrated that mediation, suppression, and confounding effects are mathematically equivalent, although they are assessed by looking for different patterns of relationships among variables. Given this equivalence, the method and macros described here for the determination of mediation effects may also be useful in the context of determining the presence and strength of suppression or confounding effects. In addition, it has been recommended that structural equation modeling (SEM) be considered for assessing mediation because it offers a reasonable way to control for measurement error as well as some interesting alternative ways to explore the mediation effect (Baron & Kenny, 1986; Holmbeck, 1997; Hoyle & Kenny, 1999; Judd & Kenny, 1981; Kline, 1998). Models involving latent variables with multiple measured indicators inherently correct for measurement error by estimating common and unique variance separately. This, in turn, increases the likelihood that indirect effects, if present, will be discovered. More complicated mediation models, such as those with several mediators linked serially or operating in parallel (or both), can be explored in the context of SEM with any combination of latent or measured variables. The normal theory approach developed by Sobel (1982) has been incorporated in popular SEM software applications such as LISREL (Jöreskog & Sörbom, 1996) and EQS (Bentler, 1997), and it is discussed in the context of SEM by Bollen (1987) and Brown (1997). A bootstrapping approach to assessing indirect effects is implemented in the current version of AMOS (Arbuckle & Wothke, 1999). In addition, Shrout and Bolger (2002) provide syntax that enables EQS to conduct tests of indirect effects with TESTING INDIRECT EFFECTS 723 bootstrapping. The macros described in this article bring this method of analysis to users of SPSS and SAS with a simple command, but researchers should be aware that options exist for exploring mediation in more complex models. Finally, it is important to emphasize that finding a statistically significant indirect effect supportive of mediation does not prove the pattern of causation shown in panel B of Figure 1. For example, a model similar to that in panel B, but with the a path reversed in direction, may be theoretically equally reasonable to specify. The two models could be distinguished only on the basis of the causal priority of X and M. This causal priority may be established in a number of ways, such as (1) manipulatFigure 3. SPSS macro output showing an indirect effect without satisfying the Baron and Kenny criteria for mediation. 724 PREACHER AND HAYES ing X and measuring M, (2) measuring X before M, allowing enough time for X to exert an effect on M, or (3) arguing on the basis of theory or prior research that X is always causally prior to M. As in almost any scientific undertaking, the results of a statistical analysis can only disprove or lend support to a hypothesis, never prove it. REFERENCES American Psychological Association (2001). Publication manual of the American Psychological Association (5th Ed.). Washington, DC: Author. Arbuckle, J. L., & Wothke, W. (1999). AMOS 4.0 user’s guide. Chicago: SPSS. Aroian, L. A. (1944). The probability function of the product of two normally distributed variables. Annals of Mathematical Statistics, 18, 265-271. Baron, R. M., & Kenny, D. A. (1986). The moderator–mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality & Social Psychology, 51, 1173-1182. Bentler, P. M. (1997). EQS for Windows(Version 5.6) [Computer software]. Encino, CA: Multivariate Software. Bollen, K. A. (1987). Total, direct, and indirect effects in structural equation models. In C. C. Clogg (Ed.), Sociological methodology 1987 (pp. 37-69). Washington, DC: American Sociological Association. Bollen, K. A., & Stine, R. (1990). Direct and indirect effects: Classical and bootstrap estimates of variability. Sociological Methodology, 20, 115-140. Brown, R. L. (1997). Assessing specific mediational effects in complex theoretical models. Structural Equation Modeling, 4, 142-156. Collins, L. M., Graham, J. W., & Flaherty, B. P. (1998). An alternative framework for defining mediation. Multivariate Behavioral Research, 33, 295-312. Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Boca Raton, FL: Chapman & Hall. Goodman, L. A. (1960). On the exact variance of products. Journal of the American Statistical Association, 55, 708-713. Holmbeck, G. N. (1997). Toward terminological, conceptual, and statistical clarity in the study of mediators and moderators: Examples from the child-clinical and pediatric psychology literatures. Journal of Consulting & Clinical Psychology, 65, 599-610. Holmbeck, G. N. (2002). Post-hoc probing of significant moderational and mediational effects in studies of pediatric populations. Journal of Pediatric Psychology, 27, 87-96. Hoyle, R. H., & Kenny, D. A. (1999). Sample size, reliability, and tests of statistical mediation. In R. Hoyle (Ed.), Statistical strategies for small sample research (pp. 195-222). Thousand Oaks, CA: Sage. James, L. R., & Brett, J. M. (1984). Mediators, moderators, and tests for mediation. Journal of Applied Psychology, 69, 307-321. Jöreskog, K. G., & Sörbom, D. (1996). LISREL 8 user’s reference guide. Uppsala, Sweden: Scientific Software International. Judd, C. M., & Kenny, D. A. (1981). Process analysis: Estimating mediation in treatment evaluations. Evaluation Review, 5, 602-619. Kline, R. B. (1998). Principles and practice of structural equation modeling. New York: Guilford. Lockwood, C. M., & MacKinnon, D. P. (1998). Bootstrapping the standard error of the mediated effect. Proceedings of the 23rd annual meeting of SAS Users Group International (pp. 997-1002). Cary, NC: SAS Institute. MacKinnon, D. P. (1994). Analysis of mediating variables in prevention and intervention research. In A. Cazares and L. A. Beatty, Scientific methods for prevention intervention research (NIDA Research Monograph 139. DHHS Pub. No. 94-3631, pp. 127-153). Washington, DC: U.S. Government Printing Office. MacKinnon, D. P. (2000). Contrasts in multiple mediator models. In J. S. Rose, L. Chassin, C. C. Presson, & S. J. Sherman (Eds.), Multivariate applications in substance use research (pp. 141-160). Mahwah, NJ: Erlbaum. MacKinnon, D. P., & Dwyer, J. H. (1993). Estimating mediated effects in prevention studies. Evaluation Review, 17, 144-158. MacKinnon, D. P., Goldberg, L., Clarke, G. N., Elliot, D. L., Cheong, J., Lapin, A., Moe, E., & Krull, J. L. (2001). Mediating mechanisms in a program to reduce intentions to use anabolic steroids and improve exercise self-efficacy and dietary behavior. Prevention Science, 2, 15-28. MacKinnon, D. P., Krull, J. L., & Lockwood, C. M. (2000). Equivalence of the mediation, confounding and suppression effect. Prevention Science, 1, 173-181. 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, 7, 83-104. MacKinnon, D. P., Warsi, G., & Dwyer, J. H. (1995). A simulation study of mediated effect measures. Multivariate Behavioral Research, 30, 41-62. Meeker, W. Q., Cornwell, L. W., & Aroian, L. A. (1981). Selected tables in mathematical statistics: Vol. VII. The product of two normally distributed random variables. Providence, RI: American Mathematical Society. Mood, A., Graybill, F. A., & Boes, D. C. (1974). Introduction to the theory of statistics. New York: McGraw-Hill. Mooney, C. Z., & Duval, R. D. (1993). Bootstrapping: A nonparametric approach to statistical inference. Newbury Park, CA: Sage. Rozeboom, W. W. (1956). Mediation variables in scientific theory. Psychological Review, 63, 249-264. Shrout, P. E., & Bolger, N. (2002). Mediation in experimental and nonexperimental studies: New procedures and recommendations. Psychological Methods, 7, 422-445. Sobel, M. E. (1982). Asymptotic confidence intervals for indirect effects in structural equation models. In S. Leinhart (Ed.), Sociological methodology 1982 (pp. 290-312). San Francisco: Jossey-Bass. Stone, C. A., & Sobel, M. E. (1990). The robustness of estimates of total indirect effects in covariance structure models estimated by maximum likelihood. Psychometrika, 55, 337-352. Wilkinson, L., & APA Task Force on Statistical Inference (1999). Statistical methods in psychology journals: Guidelines and explanations. American Psychologist, 54, 594-604. NOTES 1. Rozeboom (1956) coined the term mediation to describe a particular pattern of linear prediction among measured variables, but Judd and Kenny (1981) and Baron and Kenny (1986) are mainly responsible for popularizing mediation models in psychology. 2. We regard the determination of complete versus partial mediation as relying on the pattern of observed coefficients in Figure 1, panel B. Another way to test a complete mediation model is to estimate the model XÆMÆY as a structural equation model, constraining the XÆY path to zero. If the c2 statistic is significant, then constraining the XÆY path to zero is regarded as unreasonable given the data, ruling out the possibility of complete mediation by Baron and Kenny’s criteria. 3. It is straightforward to show how ab  (c  c¢). MacKinnon, Warsi, and Dwyer (1995) provide the following simple proof: Therefore, ab  (c c¢), and a test of the significance of the former is equivalent to a test of the latter. The only assumptions necessary for this c Y X X c X b XM X c b X M X c c ab = = ¢ + = ¢ + È Î Í ˘ ˚ ˙ = ¢ + Cov ( , Var Var Cov Var Cov Var ) ( ) () (, ) ( ) (, ) ( ) . TESTING INDIRECT EFFECTS 725 equality to hold are that there are no missing data and the model is a saturated simple mediation model, such as can be specified in linear regression, path analysis, and structural equation modeling. If there are missing data, or if parameters are estimated in a multilevel modeling context (for example), this equality no longer holds, although ab is likely to be quite close to (c c¢). 4. The data set used in this example is available at http://www. comm.ohio-state.edu/ahayes/sobel.htm. 5. In line with recommendations of the APA Task Force on Statistical Inference (Wilkinson & the APA Task Force, 1999) and recommendations in the latest APA Publication Manual (American Psychological Association, 2001), we strongly encourage the use of confidence intervals in the investigation of mediation hypotheses and reporting of results. ARCHIVED MATERIALS The following materials and links may be accessed through the Psychonomic Society’s Norms, Stimuli, and Data archive, http://www.psychonomic.org/archive/. To access these files and links, search the archive using the journal (Behavior Research Methods, Instruments, & Computers), the first author’s name (Preacher), and the publication year (2004). File: Preacher-BRMIC-2004.zip Description: The compressed archive file contains three files: sobel_spss.txt, containing the SPSS macro developed by Preacher and Hayes (2004). Instructions for using this macro can be found in the file sobel_instr.txt. sobel_sas.txt, containing the SAS macro developed by Preacher and Hayes (2004). Instructions for using this macro can be found in the file sobel_instr.txt. sobel_instr.txt, containing instructions for using both the SPSS and SAS versions of the macro developed by Preacher and Hayes (2004). Link: http://www.comm.ohio-state.edu/ahayes/sobel.htm. Description: The authors’ Web site, with macros and instructions. Authors’ e-mail addresses: preacher@unc.edu; hayes.338@osu.edu. Authors’ Web sites: http://www.unc.edu/~preacher/; http://www. comm.ohio-state.edu/ahayes/. APPENDIX A Instructions for Use of SPSS Macro To activate the macro, execute the command set at the end of this appendix by typing it verbatim into an SPSS syntax file or downloading an electronic copy from http://www.comm.ohio-state.edu/ahayes/sobel.htm. Once the command set is executed, a new SPSS syntax command, sobel, will be available for use. This command is available until SPSS is closed. To run the mediation analysis on a data set, execute the following command in SPSS: SOBEL y=yvar/x=xvar/m=mvar/boot=z. —where yvar is the name of the dependent variable in your data file, xvar is the name of the independent variable, mvar is the name of the proposed mediating variable, and z specifies the number of bootstrap resamples desired, in increments of 1,000 up to a maximum of 1,000,000. For example, if z is set to 3,000, the bootstrap estimates will be based on 3,000 resamples. If z is set to 0 (or any number less than 1,000), the bootstrapping module is deactivated. All four of these arguments must be provided. Any cases that are system missing on any of the three variables will be deleted from the mediation analysis (i.e., listwise deletion), but they will remain in the active SPSS data file. If the user desires any kind of imputation of missing values, imputation must be completed prior to running the sobel command. The SPSS matrix language does not recognize user-defined missing values, so any cases with user-defined missing values will be treated as valid data. There are no error-checking procedures in the macro, so the output should be examined carefully to ensure there are no errors printed. The most likely causes of errors include entering the command (or the original macro) incorrectly, using a variable that is actually a constant in the data file, or requesting a bootstrapped estimate when the original sample is very small. The latter error stems from the fact that bootstrap resampling is done with replacement, and it is possible for a variable resulting from a bootstrap sample to end up being a constant even though none of the variables are actually constants. The minimum sample size will depend on a number of factors, but in testing, the macro usually worked as long as n was at least 25 or so. Depending upon processor speed and the size of the sample, it may appear that SPSS has locked up or crashed once the SOBEL command is executed. Be patient. Because bootstrapping is based on random sampling from the data set, each run of the program will generate slightly different estimates of the indirect effect and its standard error, and the upper and lower bounds of confidence intervals will vary from run to run. The larger the number of bootstrap samples taken, the less variable these estimates will be over consecutive runs of the program. However, it is possible to replicate a set of bootstrap resamples by setting the random number seed prior to executing the SOBEL command. This is accomplished by preceding the SOBEL command with the command SET SEED seedval where seedval is a number between 1 and 2,000,000. If the same seed and number of bootstrap samples are requested over multiple runs on the same data, the output from those runs will be identical. 726 PREACHER AND HAYES APPENDIX A (Continued) It is possible to save the bootstrapped estimates of the indirect effect as an SPSS data file for later examination. To do this, the following command should be added just before the END MATRIX command at the end of the macro SAVE RES/OUTFILE  filename, where filename is any valid SPSS file name, including its storage path or file handle. Each command in the macro should be typed on a single line, even it if appears on multiple lines in the code below. Hit the return key when typing in the macro only after a command-terminating period (“.”). DEFINE SOBEL (y = !charend('/')/x = !charend('/')/m = !charend('/')/boot = !charend('/')). SET MXLOOPS = 10000001. MATRIX. /* READ ACTIVE SPSS DATA FILE */. get dd/variables = !y !x !m/MISSING = OMIT. compute n = nrow(dd). /* DEFINE NUMBER OF BOOTSTRAP SAMPLES */. do if (!boot > 999). compute btn = trunc(!boot/1000)*1000. compute btnp = btn+1. else. compute btn = 1000. compute btnp = btn+1. end if. compute res=make(btnp,1,0). compute dat=dd. /* START OF THE LOOP FOR BOOTSTRAPPING */. loop #j = 1 to btnp. do if (#j = 2 and !boot < 1000). BREAK. end if. /* DO THE RESAMPLING OF THE DATA */. do if (#j > 1). loop #m = 1 to n. compute v=trunc(uniform(1,1)*n)+1. compute dat(#m,1:3)=dd(v,1:3). end loop. end if. /* SET UP THE DATA COLUMNS FOR PROCESSING */. compute y = dat(:,1). compute x = dat(:,2). compute z = dat(:,3). compute xz = dat(:,2:3). /* CALCULATE REGRESSION STATISTICS NEEDED TO COMPUTE c-c' */ /* c-c' is held as variable 'ind' */. compute con = make(n,1,1). compute xo = {con,x}. compute bzx = inv(t(xo)*xo)*t(xo)*z. compute bzx = bzx(2,1). compute xzo = {con,xz}. compute byzx2 = inv(t(xzo)*xzo)*t(xzo)*y. compute byzx = byzx2(3,1). compute byxz = byzx2(2,1). compute ind = bzx*byzx. compute res(#j,1) = ind. TESTING INDIRECT EFFECTS 727 /* GENERATE STATISTICS FOR BARON AND KENNY AND NORMAL SOBEL SECTION OF OUTPUT */. do if (#j = 1). compute sd = sqrt(((n*cssq(dat))-(csum(dat)&**2))/((n-1)*n)). compute num = (n*sscp(dat)-(transpos(csum(dat))*(csum(dat)))). compute den = sqrt(transpos((n*cssq(dat))- (csum(dat)&**2))*((n*cssq(dat))- (csum(dat)&**2))). compute r = num&/den. compute sdbzx = (sd(1,3)/sd(1,2))*sqrt((1-(r(3,2)*r(3,2)))/(n-2)). compute ryi = r(2:3,1). compute rii = r(2:3,2:3). compute bi=inv(rii)*ryi. compute rsq = t(ryi)*bi. compute sec=sqrt((1-rsq)/(n-3))*sqrt(1/(1-(r(3,2)*r(3,2)))). compute sdyzx = (sd(1,1)/sd(1,3))*sec. compute sdyxz = (sd(1,1)/sd(1,2))*sec. compute seind = sqrt(((byzx*byzx)*(sdbzx*sdbzx))+((bzx*bzx)*(sdyzx*sdyzx))+ ((sdbzx*sdbzx)*(sdyzx*sdyzx))). compute byx = r(2,1)*sd(1,1)/sd(1,2). compute sebyx = (sd(1,1)/sd(1,2))*sqrt((1-(r(2,1)*r(2,1)))/(n-2)). compute se = {sebyx; sdbzx; sdyzx; sdyxz}. compute bb = {byx; bzx; byzx; byxz}. compute tt = bb&/se. compute p =2*(1-tcdf(abs(tt),n-2)). compute p(3,1)=2*(1-tcdf(abs(tt(3,1)),n-3)). compute p(4,1)=2*(1-tcdf(abs(tt(4,1)),n-3)). compute tst = ind/seind. compute bw = {bb,se,tt,p}. compute p2=2*(1-cdfnorm(abs(tst))). compute LL95 = ind-1.96*seind. compute UL95=ind+1.96*seind. compute op={ind, seind, LL95,UL95, tst, p2}. end if. end loop. /* END OF BOOTSTRAPPING LOOP */. /* COMPUTE MEAN AND STANDARD DEV OF INDIRECT EFFECT ACROSS BOOTSTRAP SAMPLES */. compute res = res(2:btnp,1). compute mnbt = csum(res)/btn. compute se = (sqrt(((btn*cssq(res))-(csum(res)&**2))/((btn-1)*btn))). /* SORT THE BOOTSTRAP ESTIMATES */. do if (!boot > 999). compute res = {-999;res}. loop #i = 2 to btnp. compute ix = res(#i,1). loop #k= #i to 2 by -1. compute k = #k. do if (res(#k-1,1) > ix). compute res(#k,1)=res(#k-1,1). else if (res(#k-1,1) <= ix). BREAK. end if. end loop. compute res(k,1)=ix. end loop. compute res = res(2:btnp,1). end if. APPENDIX A (Continued) 728 PREACHER AND HAYES /* GENERATE BOOTSTRAP CONFIDENCE INTERVAL FOR INDIRECT EFFECT */. compute lower99 = res(.005*btn,1). compute lower95 = res(.025*btn,1). compute upper95 = res(1+.975*btn,1). compute upper99 = res(1+.995*btn,1). compute bt = {mnbt, se, lower95, upper95, lower99, upper99}. /* GENERATE OUTPUT */. print bw/title = "DIRECT AND TOTAL EFFECTS"/clabels = "Coeff" "s.e." "t " "Sig(two)"/rlabels = "b(YX)" "b(MX)" "b(YM.X)" "b(YX.M)"/format f9.4. print op/title = "INDIRECT EFFECT AND SIGNIFICANCE USING NORMAL DISTRIBUTION"/rlabels = " Sobel"/clabels = "Value" "s.e." "LL 95 CI" "UL 95 CI" "Z" "Sig(two)"/format f9.4. do if (!boot > 999). print bt/title = "BOOTSTRAP RESULTS FOR INDIRECT EFFECT"/rlabels =" Effect"/clabels "Mean" "s.e." "LL 95 CI" "UL 95 CI" "LL 99 CI" "UL 99 CI"/format f9.4. print n/title = "SAMPLE SIZE"/format F8.0. print btn/title = "NUMBER OF BOOTSTRAP RESAMPLES"/format F8.0. end if. END MATRIX. !END DEFINE. APPENDIX B Instructions for Use of SAS Macro The procedures for using the SAS version of the macro are largely the same as for the SPSS version. The user should first execute the command set at the end of this appendix (available online at http://www.comm.ohiostate.edu/ahayes/sobel.htm). This will activate a command called %sobel, with syntax: %sobel(data=file, ydv, x=iv, mmed, boot=z); where file is the name of an SAS data file containing the data to be analyzed, dv is the name of the dependent variable in the data file, iv is the name of the independent variable, med is the name of the proposed mediating variable, and z specifies the number of bootstrap resamples desired. Except for command format, usage is the same as for the SPSS version of the macro. The macro will exclude all cases from the analysis missing on any of the three variables, where missing is defined as the period character (“.”). There is no error checking in the macro, so examine the log file carefully for errors. It will be obvious if an error occurs because a line marked ERROR will appear in the SAS log file. The same conditions described in Appendix A will produce errors in the SAS version of the macro. To save the bootstrapped estimates of the indirect effect as a SAS data file for later examination, the following commands should be added just before the quiz command at the end of the macro: create filename from res [colname='indirect']; append from res; where filename is any valid SAS file name. As currently listed, the random number generator will be seeded randomly. To set the seed, thus allowing you to replicate a set of bootstrap samples, change the “0” in the line that reads v  int(uniform(0)*n)  1 to any positive integer less than 232  1. %macro sobel(data=,y=,x=,m=,boot=); /* READ ACTIVE SAS DATA FILE */ proc iml; use &data where (&y ^= . & &x ^= . & &m ^= .) ; read all var {&y &x &m}; n=nrow(&y); dd=&y||&x||&m; dat=dd; APPENDIX A (Continued) TESTING INDIRECT EFFECTS 729 /* DEFINE NUMBER OF BOOTSTRAP SAMPLES */ if (&boot > 999) then; do; btn = floor(&boot/1000)*1000; btnp=btn+1; end; /* START OF THE LOOP FOR BOOTSTRAPPING */ if (&boot < 1000) then; do; btn = 1000; btnp = btn+1; end; res=j(btnp,1,0); do mm = 1 to btnp; /* DO THE RESAMPLING OF THE DATA */ if (mm > 1) then if (&boot > 999) then; do; do nn=1 to n; v = int(uniform(0)*n)+1; dat[nn,1:3]=dd[v,1:3]; end; end; con=j(n,1,1); /* SET UP THE DATA COLUMNS FOR PROCESSING */ x=dat[,2]; y=dat[,1]; m=dat[,3]; xt=dat-J(n,1)*dat[:,]; cv=(xt`*xt)/(n-1); sd=sqrt(diag(cv)); r=inv(sd)*cv*inv(sd); /* CALCULATE REGRESSION STATISTICS NEEDED TO COMPUTE c-c' */ /* c-c' is held as variable 'ind' */ xo=con||x; bzx=inv(xo`*xo)*xo`*m; bzx=bzx[2,1]; xzo=con||x||m; byzx2=inv(xzo`*xzo)*xzo`*y; byzx=byzx2[3,1]; byxz=byzx2[2,1]; ind=bzx*byzx; res[mm,1]=ind; /* GENERATE STATISTICS FOR BARON AND KENNY AND NORMAL SOBEL SECTION OF OUTPUT */ if (mm = 1) then; do; sdbzx=(sd[3,3]/sd[2,2])*sqrt((1-(r[3,2]*r[3,2]))/(n-2)); ryi=r[2:3,1]; rii=r[2:3,2:3]; bi=inv(rii)*ryi; rsq=ryi`*bi; sec=sqrt((1-rsq)/(n-3))*sqrt(1/(1-(r[3,2]*r[3,2]))); sdyzx=(sd[1,1]/sd[3,3])*sec; sdyxz=(sd[1,1]/sd[2,2])*sec; seind=sqrt(((byzx*byzx)*(sdbzx*sdbzx))+((bzx*bzx)*(sdyzx*sdyzx))+ ((sdbzx*sdbzx)*(sdyzx*sdyzx))); byx = r[2,1]*sd[1,1]/sd[2,2]; APPENDIX B (Continued) 730 PREACHER AND HAYES sebyx=(sd[1,1]/sd[2,2])*sqrt((1-(r[2,1]*r[2,1]))/(n-2)); se = sebyx//sdbzx//sdyzx//sdyxz; bb= byx//bzx//byzx//byxz; tt = bb/se; df=j(4,1,n-2); df[3,1]=n-3; df[4,1]=n-3; p=2*(1-probt(abs(tt),df)); bw=bb||se||tt||p; tst=ind/seind; pv=2*(1-probnorm(abs(tst))); LL95 = ind-1.96*seind; UL95=ind+1.96*seind; op=ind||seind||LL95||UL95||tst||pv; end; end; /* END OF BOOTSTRAPPING LOOP */ /* COMPUTE MEAN AND STANDARD DEV OF INDIRECT EFFECT ACROSS BOOTSTRAP SAMPLES */ res=res[2:btnp,1]; mnbt = sum(res)/btn; res=-999//res; /* SORT THE BOOTSTRAP ESTIMATES */ do i=2 to btnp; ix=res[i,1]; do k =i to 2 by -1; m=k; if res[k-1,1] > ix then; do; res[k,1]=res[k-1,1]; end; else; if res[k-1,1] <= ix then; do; goto stpit; end; end; stpit: res[m,1]=ix; end; res=res[2:btnp,1]; btpt=sum(abs(res) >= abs(op[1,1]))/btn; if op[1,1] <=0 then; do; btpo=sum(res <= op[1,1])/btn; end; else; if op[1,1] >= 0 then; do; btpo=sum(res >= op[1,1])/btn; end; /* GENERATE BOOTSTRAP CONFIDENCE INTERVAL FOR INDIRECT EFFECT */ lower99 = res[.005*btn,1]; lower95 = res[.025*btn,1]; upper95 = res[1+.975*btn,1]; upper99 = res[1+.995*btn,1]; xt=res-J(btn,1)*res[:,]; APPENDIX B (Continued) TESTING INDIRECT EFFECTS 731 cv=(xt`*xt)/(btn-1); se=sqrt(diag(cv)); bt=mnbt||se||lower95||upper95||lower99||upper99; /* GENERATE OUTPUT */ rn={"b(YX)" "b(MX)" "b(YM.X)" "b(YX.M)"}; cn={"Coeff" "s.e." "t" "Sig(Two)"}; print "DIRECT AND TOTAL EFFECTS"; print bw [rowname = rn colname = cn format = 9.4]; rn={"Sobel"}; cn={"Value" "s.e." "LL 95 CI" "UL 95 CI" "z" "Sig(Two)"}; print "ESTIMATE AND TEST OF INDIRECT EFFECT"; print op [rowname = rn colname = cn format= 9.4]; if (&boot > 999) then; do; print "BOOTSTRAP RESULTS FOR INDIRECT EFFECT"; rn={"Effect"}; cn={"Mean" "s.e." "LL 95 CI" "UL 95 CI" "LL 99 CI" "UL 99 CI"}; print bt [rowname = rn colname = cn format = 9.4]; print "NUMBER OF BOOTSTRAP RESAMPLES" btn; end; print "SAMPLE SIZE" n; quit; %mend sobel; (Manuscript received February 18, 2003; revision accepted for publication May 9, 2004.) APPENDIX B (Continued) 

preacher and hayes 2004.pdf
0.23MB

https://smartstore.naver.com/smallme/products/5605946432

 

컬러링 스몰미빌딩 (20개 도시 세트) 미술교육. 창의력 발달. 해외여행. 창의력교육. 색칠공부, :

[스몰미 와 아트리트] 나만의 작은 나. 스몰미, 색다른 자기표현. smallME.

smartstore.naver.com

 

반응형

댓글