Sensitivity analysis for assumptions of general mediation analysis

Abstract Mediation analysis is widely used to identify significant mediators and estimate the mediation (direct and indirect) effects in causal pathways between an exposure variable and a response variable. In mediation analysis, the mediation effect refers to the effect transmitted by mediator intervening the relationship between an exposure variable and a response variable. Traditional mediation analysis methods, such as the difference in the coefficient method, the product of the coefficient method, and counterfactual framework method, all require several key assumptions. Thus, the estimation of mediation effects can be biased when one or more assumptions are violated. In addition to the traditional mediation analysis methods, Yu et al. proposed a general mediation analysis method that can use general predictive models to estimate mediation effects of any types of exposure variable(s), mediators and outcome(s). However, whether this method relies on the assumptions for the traditional mediation analysis methods is unknown. In this paper, we perform series of simulation studies to investigate the impact of violation of assumptions on the estimation of mediation effects using Yu et al.’s mediation analysis method. We use the R package mma for all estimations. We find that three assumptions for traditional mediation analysis methods are also essential for Yu et al.’s method. This paper provides a pipeline for using simulations to evaluate the impact of the assumptions for the general mediation analysis.


Introduction
Researchers perform mediation analysis to find important mediators that intervene the relationship between an exposure variable and an outcome, and to estimate the mediation (direct and indirect) effects in the causal pathways. To illustrate the mediation analysis, we denote the exposure variable as X, which has a causal relationship with the response variable denoted as Y, and the third variable is a mediator denoted as M, which is causally predicted by X and is a causal predictor of Y. By definition, the indirect effect of M is defined as the effect of X on Y through M, the direct effect is the effect of X on Y after adjusting for all other variables. The total effect is the summation of effects from X to Y through different paths. Baron and Kenny (1986), Judd and Kenny (1981), and James and Brett (1984) founded the traditional mediation analysis method, where three conditions are required to establish potential mediation effects: 1) the exposure variable is significantly associated with the response variable; 2) the presumed mediator is significantly associated with the exposure variable; and 3) the presumed mediator is also significantly associated with the response variable when the exposure variable and other covariates are adjusted. When all of the three conditions are met, a potential mediation relationship is established. To estimate the mediation effects from X to M to Y, there are two conventional methods within the linear regression framework One method is the difference in the coefficients method, where the indirect effect of M is estimated as the difference of the coefficients of X in the linear regression to predict Y with or without M (Alwin and Hauser 1975). The other method is the product of the coefficients method, where the indirect effect is estimated as the product of the coefficient of X when regressed on M and the coefficient of M when regressed on Y controlling for X (Mackinnon and Dwyer 1993). These methods cannot be used directly when there are no linear structural relationship among variables (Kim and Ferree 1981). In addition, these methods are not easily adaptable to differentiate indirect effects from multiple mediators. Except for the above two methods within linear regression framework, another conventional method to estimate mediation effects is based on the counterfactual framework (Robins and Greenland 1992;Pearl 2001;Have et al. 2007;Albert 2008). Under the counterfactual framework, the mediation effects are measured by the difference in the potential outcomes between two values of the exposure variable. Pearl (2001) defined the causal total effect, natural direct effect, and controlled direct effect under counterfactual framework to estimate the mediation effects. The counterfactual framework method fits best when the exposure variable is binary. However, it is difficult to choose a referral exposure level when the exposure variable is continuous or multicategorical (Vanderweele 2009;Vanderweele and Vansteelandt 2009). To overcome these limits in the conventional mediation methods, Yu, Fan, and Wu (2014) proposed a general multiple mediation analysis method (referred to as the Yu method), which can differentiate the indirect effect of every mediator from the total effect based on any general predictive models. Furthermore, the Yu method can deal with multiple binary, multicategorical and/or continuous exposure variables, mediators, and response variables.
For the above mentioned conventional mediation methods, there are four main mediation assumptions (referred to as the traditional assumptions of mediation analysis) that are required to accurately make inferences on the mediation effects (Vanderweele and Vansteelandt 2009). The estimation of mediation effects using the conventional methods can be biased when any assumption is violated (Judd and Kenny 1981;Pearl 2001;Cole and Hernan 2002;Vanderweele and Vansteelandt 2009). However, whether the all the traditional assumptions are also required for the Yu method is unknown.
In this paper, we investigate the performance of the Yu method by evaluating how the violation of traditional assumptions can influence the inferences on mediation effects. We perform series of simulations using the Yu method and evaluate the impact of violation of traditional assumptions on the estimation of indirect effect and direct effect in terms of the estimation precision, the sensitivity and the specificity of mediators identifications. The rest of the paper is organized as follows. In Sec. 2, we review the Yu method and the traditional assumptions for conventional mediation analysis methods. In Sec. 3, we design simulations to check the sensitivity of each assumption on the estimation of mediation effects and discuss the result. The conclusion and future study are discussed in Sec. 4.

Traditional assumptions for conventional mediation analysis
The purpose of mediation analysis is to estimate the effects from the exposure variable to the outcome through different paths. The estimation of mediation effects may be biased if unmeasured confounders exist in the mediation models. Assumptions for mediation analysis do not allow the existence of any types of unmeasured confounders. Some studies reported the estimation performance of conventional mediation analysis when there are unmeasured confounders. Judd and Kenny (1981) estimated and compared the mediation effects using two models: model A with absent confounder and model B with all confounders. They found that ignoring some confounders between the mediator and outcome led to substantial bias in estimating mediation effects using the product of the coefficient method. The needs of controlling all confounders in the relationship between the mediator and the outcome was emphasized in various studies (Pearl 2001;Cole and Hernan 2002;Huang et al. 2004;Vanderweele and Vansteelandt 2009). Cole and Hernan showed that two assumptions are required to estimate the direct effect accurately: no unmeasured confounders for (1) the relationship between the exposure variable and the outcome and (2) the relationship between the mediator and the outcome (Cole and Hernan 2002). These two assumptions were also proposed by VanderWeele and Vansteelandt (2009) when they discussed the estimation of the controlled direct effects and natural direct effects using conventional mediation analysis under counterfactual framework (Vanderweele and Vansteelandt 2009). In addition to assumptions 1) and 2), the identification of natural direct and indirect effects requires two more assumptions: 3) no unmeasured confounder between the exposure variable and the mediator; 4) the exposure variable must not cause any known confounder between the mediator and the outcome (Vanderweele and Vansteelandt 2009). Taken together, there are four key mediation assumptions required for conventional mediation analysis: 1) No unmeasured confounder between the exposure variable X and the response variable Y; 2) No unmeasured confounder between the exposure variable X and the mediator M; 3) No unmeasured confounder between the mediator M and the response variable Y; and 4) Any mediator M j is not causally prior to M Àj , where M Àj denote the vector of mediators M without M j . These four assumptions are referred to as the traditional assumptions in this paper.

The Yu method
The general multiple mediation analysis method proposed by Yu, Fan, and Wu (2014) is based on a general concept of mediation effects. To illustrate the method here, let Z be a vector of independent explanatory variables that are directly related to Y, but not to X and denote Y(X, Z) as the average value of the outcome if the subject is exposed to X and Z. By the definition of the Yu method, the total effect of X on Y at X¼x Ã is defined as the changing rate in EðYðX, ZÞÞ when X changes: TE jZ ðx Ã Þ ¼ lim u!u Ã E½Yðx Ã þuÞÀYðx Ã ÞjZ u , and the average total effect is defined as ATE jZ ¼ E x Ã ½TE jZ ðx Ã Þ, where u Ã is the smallest unit of X, such that x þ u Ã 2 domainðxÞ for all x 2 domainðxÞ (Yu, Fan, and Wu 2014). The Yu method defines the direct effect of X at x Ã as M¼m, ZÞ u and the average direct effect as E x Ã ½DE nZ ðx Ã Þ: The indirect effect of X on Y through M is the difference between the total effect and the direct effect, and the average indirect effect through M is the difference between the average total effect and the average direct effect. These definitions in the Yu method are easily extended to multiple mediators. For the Yu method, the traditional assumptions 1) and 3) are required to estimate the total effect. To estimate the direct effect, an additional assumption, the traditional assumption 2), is needed. Compared with the conventional definition of mediation effects, where the average mediation effects are defined as the average change in the potential outcome when the exposure variable is at different levels (Mackinnon and Dwyer 1993;Vanderweele and Vansteelandt 2009;Vansteelandt and Daniel 2017), the definition of the average mediation effects in the Yu method (Yu, Fan, and Wu 2014) is based on the rate of change. The definition of the Yu method has many benefits, one of which is that the average mediation effects are scale invariant to the unit of X. Therefore, the traditional assumption 4) is not required for the Yu method (Yu, Fan, and Wu 2014). To facilitate the multiple mediation analysis with general predictive models, Yu and Li created an R package mma (Yu and Li 2017). In this paper, we utilize this package to evaluate the accuracies of estimating the mediation effects using the Yu method under the conditions that each of the traditional assumptions is violated.

Simulation and results
In this section, we explain each of the traditional assumptions in detail and then use simulations to study the indirect effect and direct effect estimates by the Yu method when each of the traditional assumptions is violated. We compare the accuracy and efficiency of the estimates of mediation effects in terms of the bias, sensitivity and specificity. To check the performance of estimation, we calculate the biases of estimates and the specificity or sensitivity of identifying the significant mediation effects. Each simulation is repeated 100 times. The bias of an estimate is defined as the estimated value minus the true value of the effect. The bias reported is the average bias from the 100 simulations. A good estimate has an average bias close to 0. Sensitivity is defined as the probability of identifying the significant effect when the true effect is not 0. Specificity is the probability of finding an effect to be insignificant when the true effect is 0. A good estimate has both high sensitivity and specificity. In our analysis, a mediation effect is identified as significant if the 95% confidence interval of the estimated effect does not include 0. Based on the results, we summarize the impact of the violation of each traditional assumption on the estimation of mediation effects. All mediation analysis is performed using the R package mma.
3.1 Assumption 1: no unmeasured confounder between the X -Y relationship Figure 1 shows the relationship among four variables X, M, C and Y, where X is the exposure variable and Y is the outcome. A line with an arrow indicates a causal relationship between the two connected variables and a line without an arrow means that the two connected variables are related but no one is established as a causal variable to the other. M is a mediator and C is a confounder for the X -Y relationship. By traditional assumption 1), all confounders for the exposure-outcome relationship should be included in mediation analysis. Otherwise, the estimation of mediation effects can be biased.

Data generation
If C is not included in the analysis, we check how it influences the estimations of direct and indirect effects. A single-level dataset is generated by the following linear regression equations: Figure 1. When the confounder C of X -Y relationship is not observed.
In the equations, i ¼ 1, :::, 50, e 1i and e 2i are independent variables from standard normal distribution. a 1 and a 2 are the intercepts for (Albert 2008) and (Baron and Kenny 1986), taking the values 0.2 and 0.1 respectively. The correlation coefficient between X and C is q, taking at a value from the set (À0.9, À0.5, À0.1, 0, 0.1, 0.5, 0.9). c 0 is the direct effect of X in this case and its value is chosen from the set (0, 0.518, 1.402, 2.150). c y is set from (0, 0.259, 0.701, 1.705), corresponding to no, small, medium and large effect sizes. The indirect effect of M should be a Â b, where a is set at 0.773 and b is 0.701. We are interested to see how the different values of q and the different effect sizes of parameters can influence the estimation results.
3.1.2. Bias, sensitivity, and specificity analysis Figure 2 shows the bias of the estimated direct effect. We find that no matter what the true direct effect c 0 is, the biases of the estimated direct effect are closely proportional to q Â c y : It means that the indirect effect of the the missing confounder C was included in the direct effect.
The sensitivity and specificity of identifying direct effect is shown in Figure 3. The upper left panel shows the specificity of identifying direct effect given the true direct effect c 0 ¼ 0: We find that the specificity decreases when q moves away from 0 and decreases when c y is away from 0. This is due to the fact that the bias of the estimated direct effect is q Â c y : Other panels of Figure  3 show the sensitivity of identifying the significant direct effect since the true direct effects are all   positive. Since the estimated direct effect is centered at c 0 þ q Â c y , the sensitivity is high when c 0 þ q Â c y is away from 0 but not when c 0 is away from 0.
Using the linear models, the bias of the estimated indirect effect through M is shown in Figure 4. We find that no matter what the true direct effect c 0 is, the biases of estimates are all close to 0, not changing with q or c y .
All indirect effects are at the same level: a Â b ¼ 0:5419 6 ¼ 0: Figure 5 shows the sensitivity of identifying the important mediator M when parameters change. In general, we find that the sensitivity does not change much as q changes, but is a little lower when c y is very high. This is due to that the variance of estimating b becomes higher when an important confounder is missing in the model. When c y is higher, C contributes more significantly in predicting Y.
In summary, when the traditional assumption 1) is violated, using the Yu method to make inference on mediation effect results in a biased estimation for the direct effect, but violating the assumption has little influence on the estimation of indirect effect.  3.2 Assumption 2: no unmeasured confounder between the X -M relationship Figure 6 shows the relationship among four variables X, M, C and Y, where X is the exposure variable and Y is the outcome. M is a mediator and C is a confounder for the X -M relationship. By traditional assumption 2), all confounders for the exposure-mediator relationship should be included in analysis. Otherwise, the estimation of mediation effects can be biased.

Data generation
If C is not included in the analysis, we check how it influences the estimations of direct and indirect effects. A single-level mediation dataset is generated by the following linear regression equations: The choices of e 1i , e 2i , a 1 , a 2 , q, b are the same as that in Sec. 3.1.1. In addition, c 0 is chosen to be 1.402. c m is selected from (0, 0.259, 0.701, 1.705), and a is chosen from the set (0, 0.286, 0.773, 1.185), corresponding to no, small, medium and large effect sizes. We check and compare the estimation of mediation effects using different effect sizes of parameters.

Bias, sensitivity, and specificity analysis
Using the linear models, the bias of the estimated direct effect is shown in Figure 7. We find that the bias of the direct effect estimates are very close to 0 and does not change with parameters.
Next we check the sensitivity of identifying significant direct effects. Since c 0 6 ¼ 0, the direct effect is different from 0. We find that the sensitivities of identifying the significant direct effects are all close to 1. The graph for sensitivity is provided in the Supplemental materials.
Using the linear models with the Yu method, the bias of the estimated indirect effect through M is shown in Figure 8. We find that the bias does not change with a, but increases with jqj and c m . The biases of estimates are actually close to q Â c m Â b: The true indirect effect for this case is a Â b. The upper left panel of Figure 9 shows the specificity of identifying the unimportant mediator M when it is not significant (a ¼ 0). Other panels show the sensitivity of identifying the important mediator M. Since the estimated indirect effect is centered at ðq Â c m þ aÞ Â b, rather than a Â b the sensitivity moves closer to 1 when the estimated value moves away from 0.
In summary, when the traditional assumption 2) is violated, using the Yu method to make inference on mediation effect results in a biased estimation for the indirect effect, where the effect from the confounder is all included in the estimated indirect effect through C. Figure 10 shows the relationship among four variables X, M, C and Y. M is a mediator and C is a confounder for the M -Y relationship. By traditional assumption 3), all confounders for the mediator-outcome relationship should be included in analysis.

Data generation
If C is not included in the analysis, we check how it influences the estimations of direct and indirect effects. A single-level dataset is generated by the following linear regression equations: The choices of e 1i , e 2i , a 1 , a 2 , q, a, c y are the same as that in Sec. 3.1.1. Further, c 0 is chosen to be 0.701, and b is chosen from the set (0, 0.518, 1.402, 2.150), corresponding to no, small, medium and large effect sizes.

Bias, sensitivity, and specificity analysis
Using the linear models with the Yu method, the bias of the estimated direct effect is shown in Figure 11. We find that the bias increases with the c y but decreases with q. This means that ignoring a confounder of the M -Y relationship influences the estimation of the direct effect and the bias is proportional to q Â c y : Next we check the sensitivity of identifying significant direct effects. The sensitivity and specificity of identifying direct effect is shown in Figure 12. Since c 0 ¼ 0:701 6 ¼ 0, the direct effect is different from 0. We find that the sensitivities are getting to1 when c 0 þ q Â c y moves away from 0.
Using the linear models with the Yu method, the bias of the estimated indirect effect through M is shown in Figure 13. We find that the bias does not change with b, but increases with the c y  and q. The biases for the indirect effect are approximately equal to the biases for the direct effect in magnitude but are of opposite sign. This is due to that the total effect estimates are unbiased. Therefore the bias of indirect effect and direct effect offset each other.
The true indirect effect is a Â b. The upper left panel of Figure 14 shows the specificity of identifying the unimportant mediator M when M is not significant (b ¼ 0). Since the bias of the indirect effect estimate is proportional to Àq Â c y , the specificity is close to 1 when q ¼ 0 or c y ¼ 0, but decreases when c y or q moves away from 0. When b 6 ¼ 0, since a ¼ 0:701 6 ¼ 0, the indirect effect of M is not 0. The other three panels of Figure 14 shows the sensitivity of identifying the significant M. We find that the sensitivity increases when the estimated indirect effect, a Â ðb þ q Â c y Þ moves away from 0.
In summary, when the traditional assumption 3) is violated, using the Yu method to make inference on mediation effect results in a biased estimation for both the indirect effect and direct effect, but not on the total effect. Figure 15 shows the relationship among four variables X, M 1 , M 2 and Y. In the figure, M 1 and M 2 are mediators and M 2 is causally prior to M 1 .

Data generation
If M 2 is causally prior to M 1 , we check how it influences the estimations of direct and indirect effects using the Yu method. A single-level dataset is generated by the following linear regression equations: Figure 17. The bias of the indirect effect through M 1 when Assumption 4 is violated.
The choices of e 1i , e 2i are the same as that in Sec. 3.1.1. To check the influence of traditional assumption 4, c 0 is chosen to be 1.25. b 2 ranges from (0, 0.259, 0.701, 1.705) and a 2 from (0. 0.286, 0.773, 1.185), corresponding to no, small, medium and large effect sizes. c m is chosen from (À0.9,À0.5,À0.1, 0, 0.1, 0.5, 0.9). a 1 is set at 0.773 and b 1 at 0.701. The true indirect effect from M 2 is a 2 Â b 2 , and the effect from M 1 is a 1 Â b 1 þ a 2 Â c m Â b 1 : 3.4.2. Bias, sensitivity, and specificity analysis Using the linear models with the Yu method, the bias of the estimated direct effect is shown in Figure 16. We find that no matter what the true direct effect c 0 is, the biases of the estimated direct effect are close to 0. There is no significant bias in estimating the direct effect.
Next we check the sensitivity of identifying significant direct effects. Since c 0 ¼ 1.25, the sensitivity is very close to 1 and does not change with a 2 , b 2 or c m . The figures dellineating the sensitivity and specificity are in Supplemental materials.
Using the linear models, the bias of the estimated indirect effect through M 1 is shown in Figure 17. We find that the bias is close to 0 for all parameters. Figure 19 shows the bias of the estimated indirect effect through M 2 , which is also close to 0 for all parameters.
The indirect effect of M 1 is a 1 Â b 1 þ a 2 Â c m Â b 1 : Figure 18 shows the sensitivity/1-specificity of identifying M 1 as an important mediator. The sensitivity/1-specificity is closer to 1 when the   true indirect effect moves away from 0. Figure 20 gives the sensitivities and specificity of identifying the important mediator M 2 when parameters change. The upper left panel of Figure 20 is the specificity of identifying M 2 when a 2 ¼ 0, we find that the specificity is very close to 1. The other three panels are the sensitivities of identifying M 2 as an important mediator when b 2 6 ¼ 0 and are 1-specificity when b 2 ¼ 0. The sensitivity/1-specificity increases with a 2 or b 2 but does not change much with c m except that the sensitivity is a little lower at both ends of c m . This is because the variances of the indirect effects are a little higher.
In summary, when the traditional assumption 4) is violated, using the Yu method to make inference on mediation effect does not systematically influence the accuracy of the direct effect and indirect effect estimates.

Conclusion and future study
In this paper, we review traditional mediation analysis methods and assumptions. In addition, we evaluate the general mediation analysis by Yu et al. to check how the violation of each traditional assumption can influence the estimation of mediation effects. The simulation result shows that some of the estimations of mediation effects are biased when traditional assumptions 1), 2) and 3) are violated using the Yu method. However, all estimations of mediation effects are not biased when the traditional assumption 4) is violated using the Yu method. The definition of the average mediation effects by Yu et al. are based on the rate of change, and the average mediation effects are scale invariant to the unit of X. The estimations of mediation effects are through manipulatively breaking the relationship between the exposure and mediator(s). Thus, the traditional assumption 4) is not required for the Yu method. To accurately make inferences on mediation effects, it is important to identify all potential confounders and include them into the mediation analysis. As a future study, we will use the Yu method for both linear and nonlinear models with binary and continuous exposure variables with multiple mediators to check the impact of violation of traditional assumptions on the estimation of mediation effects in terms of estimation of bias and sensitivity and specificity of identifying important mediators.

Funding
This study was partially funded by the NIMHD award number 1R15MD012387 and by the Louisiana State University Health Sciences Center Pilot Fund. Portions of this research were conducted with high performance computational resources provided by the Louisiana Optical Network Infrastructure. Authors appreciate the constructive comments from reviewers.