In this article, we introduce the rwrmed package, which performs mediation analysis using the methods proposed by Wodtke and Zhou (2020, Epidemiology 31: 369–375). Specifically, rwrmed estimates interventional direct and indirect effects in the presence of treatment-induced confounding by fitting models for 1) the conditional mean of the mediator given the treatment and a set of baseline confounders and 2) the conditional mean of the outcome given the treatment, mediator, baseline confounders, and a set of treatment-induced confounders that have been residualized with respect to the observed past. Interventional direct and indirect effects are simple functions of the parameters in these models when they are correctly specified and when there are no unobserved variables that confound the treatment-outcome, treatment-mediator, or mediator-outcome relationships. When no treatment-induced confounders are specified, rwrmed produces natural direct and indirect effect estimates.
When evaluating the effectiveness of an intervention, many analysts focus exclusively on estimating the overall association between a treatment and an outcome. A common criticism of this narrow focus is that it precludes the discovery of causal mechanisms by which the intervention is hypothesized to affect the outcome. Mediation analysis, by contrast, aims to identify intermediate variables that transmit the effect of treatment on the outcome (Linden and Karlson 2013; VanderWeele 2015). To this end, analyses of causal mediation typically focus on decomposing an overall effect of treatment into an indirect component operating through a mediator of interest and a direct component operating through alternative pathways.
In this article, we introduce the rwrmed package, which performs mediation analysis using the methods proposed by Wodtke and Zhou (2020) for decomposing treatment effects in the presence of treatment-induced confounding. Specifically, rwrmed decomposes an overall effect into interventional direct and indirect effects (defined in section 2) using a “regression-with-residuals” approach. With this approach, interventional effects are estimated by fitting models for 1) the conditional mean of the mediator given the treatment and a set of baseline confounders and 2) the conditional mean of the outcome given the treatment, mediator, baseline confounders, and a set of treatment-induced confounders that have been residualized with respect to the observed past. Regressionwith-residuals estimates are consistent and asymptotically normal when these models are correctly specified and when there are no unobserved variables that confound the treatment-outcome, treatment-mediator, or mediator-outcome relationships (Wodtke and Zhou 2020; Zhou and Wodtke 2019).
2 Method and formulas
Evaluating causal mediation is typically accomplished by decomposing the average total effect (ATE) of a treatment on an outcome into the sum of so-called natural direct effect (NDE) and natural indirect effect (NIE) (VanderWeele 2015). The NDE is the expected difference in the outcome if each unit in the target population were exposed, rather than unexposed, to treatment and then were exposed to the level of the mediator he or she would have naturally experienced had he or she not received treatment. The NIE is the expected difference in the outcome if each unit were exposed to treatment and then were exposed to the level of the mediator he or she experience under this treatment rather than the level of the mediator he or she would have experienced had he or she not received treatment. Taken together, NDE and NIE neatly separate the total effect into components operating through the mediator of interest versus alternative pathways. They can be estimated in Stata using paramed (Emsley and Liu 2013) or gsem followed by nlcom, among several other options.
However, a key limitation of mediation analyses focused on NDE and NIE is that these estimands are not identified in the presence of treatment-induced confounders—at least not without invoking strong parametric assumptions (VanderWeele 2015; VanderWeele, Vansteelandt, and Robins 2014). Treatment-induced confounders are posttreatment variables that affect both the mediator and outcome and that are also affected by treatment. They are empirically common in analyses of causal mediation wherever the effects of treatment operate through multiple intermediate variables that may influence one another. Thus, in many applications a focus on NDE and NIE is not warranted, and alternative estimands that must be learned from the data using alternative methods are needed.
In this section, we introduce a set of interventional direct and indirect effects that can be identified in the presence of treatment-induced confounders. We then explain how they can be estimated using the method of regression with residuals. We conclude by discussing several situations where natural and interventional effects are equivalent.
2.1 Interventional direct and indirect effects
Let Y denote an outcome variable, A the treatment, M a mediator of interest, C a set of pretreatment covariates, and L a set of posttreatment covariates.
In figure 1, we summarize the causal relationships between these variables using a directed acyclic graph (Pearl 2009), where arrows between nodes represent direct causal effects of arbitrary functional form. This graph shows that M mediates the effect of A on Y, as indicated by the A → M → Y and A →L→ M → Y paths. It also shows that A affects Y through mechanisms that do not involve the mediator of interest, M, as indicated by the A → Y and A →L→ Y paths. Finally, it shows, via the Y ←L→ M and A →L paths, that L confounds the effect of M on Y and is also affected by A. The covariates in L are therefore treatment-induced confounders of the mediator-outcome relationship. The rwrmed package is designed for analyzing whether and to what extent an overall effect of a treatment, A, on an outcome, Y, is mediated via a focal intermediate variable, M, when the data are generated by a process resembling this graph, where there are treatment-induced confounders, such as L. To this end, it focuses on interventional direct and indirect effects.
A directed acyclic graph summarizing causal relationships between the baseline covariates (C), treatment (A), posttreatment covariates (L), mediator (M), and outcome (Y )
Interventional direct and indirect effects are defined using potential-outcomes notation (VanderWeele 2015; VanderWeele, Vansteelandt, and Robins 2014). Specifically, let Ya and Ma denote the potential values of the outcome and mediator, respectively, that would have been observed under exposure to treatment a. Similarly, let Yam denote the potential value of the outcome under exposure to treatment a and the level of the mediator given by m. Finally, let Ma|c denote a value of the mediator randomly selected from its population distribution under exposure to treatment a conditional on the pretreatment covariates C = c.
With this notation, a randomized intervention analogue to the ATE of treatment on the outcome can be defined as follows:
This effect represents the expected difference in the outcome if units were exposed to treatment a* rather than a and to a value of the mediator randomly selected from its distribution under each of these alternative treatments among the subpopulation defined by C = c. It is similar to a conventional total effect, except that it is defined in terms of both a contrast between different treatments and a randomized intervention on the population distribution of the mediator.
The rATE(c) can be additively decomposed into interventional direct and indirect effects as follows:
The first expression in this decomposition, , is a randomized intervention analogue of the NIE. This effect represents the expected difference in the outcome if units with covariates C = c were exposed to treatment a* and then were exposed to a level of the mediator randomly selected from its distribution under treatment a* rather than a. It captures an effect of A on Y that is mediated through M by fixing treatment at a* and then comparing outcomes with the mediator randomly selected from its distribution under different levels of treatment.
The second expression in this decomposition, , is a randomized intervention analogue of the NDE. This effect represents the expected difference in the outcome if units with covariates C = c were exposed to treatment a* rather than a and then were exposed to a level of the mediator randomly selected from its distribution under treatment a. It captures an effect of A on Y that is not mediated through M by fixing the distribution from which the mediator is assigned and then comparing outcomes under different treatments.
The rNDE(c) can also be expressed as a function of the controlled direct effect (CDE), which is another interventional estimand that is frequently targeted in analyses of causal mediation (VanderWeele 2015). Specifically, the rNDE(c) can be further decomposed as follows:
The, captures the expected difference in the outcome if units with covariates C = c were exposed to treatment a* rather than a after fixing the level of mediator at the same value m for all. The rNDE(c) differs from CDE(c, m) conceptually in that the former involves an intervention to fix the population distribution of the mediator, whereas the latter involves an intervention to fix the mediator at the same specific value for each unit. The rNDE(c) differs from the CDE(c, m) computationally depending on the magnitude of a treatment-mediator interaction effect, , occurring in the absence of mediation. If there is no treatment-mediator interaction, the rNDE(c) is equal to the CDE(c, m).
All the interventional effects defined previously can be identified from the observed data under the following conditional independence assumptions, which involve restrictions on the joint distribution of the potential outcomes and then the observed treatment and mediator:
⊥ denotes statistical independence (VanderWeele, Vansteelandt, and Robins 2014). Informally, assumption 1 requires that there must not be any unobserved confounding of the treatment-outcome relationship, conditional on the pretreatment covariates. Assumption 2 requires that there must not be any unobserved confounding of the treatment-mediator relationship, conditional on the pretreatment covariates. And assumption 3 requires that there must not be any unobserved confounding of the mediatoroutcome relationship, conditional on treatment and then both the pretreatment and posttreatment covariates. These assumptions are satisfied in figure 1, for example, because there are no unobserved variables that jointly affect A and Y, M and Y, or A and M.
2.2 Regression with residuals
Although interventional direct and indirect effects can be identified when there is no unobserved confounding of the treatment-outcome, treatment-mediator, and mediatoroutcome relationships, estimating them from the observed data poses special challenges even when these conditions are met. The central challenge arises from the need to adjust for posttreatment covariates L. Failing to adjust for these covariates may lead to bias from uncontrolled confounding of the mediator-outcome relationship. At the same time, adjusting for them naïvely using conventional methods of covariate control may also lead to bias. In particular, naïvely adjusting for L may lead to bias from overcontrol of mediating pathways because any posttreatment covariate may also transmit the effects of A on Y . It may also lead to bias from endogenous selection because naïvely adjusting for posttreatment covariates can induce a spurious association between treatment and the outcome (Elwert and Winship 2014).
Regression with residuals avoids these biases by adjusting for posttreatment covariates only after they have been residualized with respect to the observed past. Adjusting for these residualized covariates appropriately controls for mediator-outcome confounding while circumventing the problems of overcontrol and endogenous selection because the residuals are purged of their association with treatment by design. Specifically, regression with residuals estimates of interventional direct and indirect effects comes from the following set of models for L, M, and Y :
g(·) and h(·) are smooth and invertible link functions, C⊥ = C− E(C) is a vector of mean-centered pretreatment covariates, and is a vector of residual terms for the posttreatment covariates. The models for L and M are nearly identical to conventional generalized linear models, except that the pretreatment covariates C have been centered on their marginal means. Similarly, the model for Y is nearly identical to a conventional linear regression, except that the posttreatment covariates L have additionally been centered on their conditional means given C and A.
Under assumptions 1, 2, and 3 and provided that all the models outlined previously are correctly specified, the randomized intervention analogues of NDE and NIE are equal to the following parametric expressions:
And the rATE(c) is equal to their sum. Under assumptions 1 and 3 and provided that the models for L and Y are correctly specified, the CDE is equal to
Although the models outlined previously omit treatment-covariate and mediator-covariate interactions such that the CDE(c, m) is not in fact a function of c, these terms can be easily incorporated to allow for different patterns of effect moderation. By default, rwrmed evaluates all interventional effects at the sample means of the pretreatment covariates.
rwrmed computes regression-with-residuals estimates of these quantities as follows. First, the models for L are fit using regress for continuous variables and logit for binary variables (for multicategorical variables, indicator [dummy] variables are created and then passed on to logit) followed by the generation of residual terms. Second, the models for M and Y are fit simultaneously with gsem using the residual terms from the first step where appropriate. Third, the coefficients from these models are used to construct estimates for the interventional effects of interest with the expressions outlined previously. Linear, logistic, or Poisson models with their canonical link functions may be used for the mediator as appropriate depending on its level of measurement. A linear model is required for Y, and thus regression with residuals is best suited for applications with metric outcomes. Nevertheless, it may still be used with binary or ordinal outcomes if a linear model provides a defensible approximation to the true but unknown conditional expectation function (Kohler, Karlson, and Holm 2011; Wodtke and Almirall 2017). In this situation, effect estimates would be based on a linear probability or ordinal mean model for Y, with all their attendant limitations (Agresti 2013).
The outcome model described above includes a treatment-mediator interaction. This interaction may be constrained to equal zero, in which case the rNDE(c) is equal to the CDE(c). Moreover, when there is no treatment-mediator interaction, NDE and NIE are equal to their interventional analogues. Natural direct and indirect effects are also equal to their interventional analogues when there are not any treatment-induced confounders. Thus, rwrmed computes and reports NDE and NIE if the treatment-mediator interaction is suppressed or no posttreatment covariates are supplied. Otherwise, it provides their interventional analogues.
Valid standard errors for regression-with-residuals estimates can be computed using the nonparametric bootstrap (Almirall, Have, and Murphy 2010; Wodtke and Almirall 2017). Analytic standard errors can also be approximated via the delta method using the combined variance–covariance matrix of the parameter estimates from models for M and Y . These standard errors are approximations because they do not account for the fact the residual terms used to fit the outcome model are themselves estimated and thus subject to their own sampling variability. Nevertheless, rwrmed provides them because they are computationally expedient, and in simulation studies they appear to provide a reasonable approximation to the true standard deviations of the effect estimates under repeated sampling across several different scenarios. Strictly valid inferences, however, can be obtained only via bootstrapping at present.
3 The rwrmed package
This section describes the syntax of the rwrmed package and various options available.
lvars are posttreatment covariates. pweights are allowed; see [U] 11.1.6 weight.
3.2 Options
avar(varname) specifies the treatment (exposure) variable. avar() is required.
mvar(varname) specifies the mediator variable. mvar() is required.
a(#) sets the reference level of treatment. a() is required.
astar(#) sets the alternative level of treatment. Together, astar() and a() define the treatment contrast of interest. astar() is required.
m(#) sets the level of the mediator at which the CDE is evaluated. If there is no treatment-mediator interaction, then the CDE is the same at all levels of the mediator, and thus an arbitrary value can be chosen. m() is required.
mreg(string) specifies the form of regression model to be fit for the mediator variable. Options include regress, logit, and poisson. The default is mreg(regress).
cvar(varlist) specifies the pretreatment covariates to be included in the analysis.
cat(varlist) specifies which of the cvar() and lvars should be handled as categorical variables. For categorical variables with more than two levels, rwrmed generates dummy variables for each level and then residualizes them individually. A warning message will be issued if the logit model produces perfect predictions, resulting in dropped observations. The program will terminate if the logit model cannot converge. In both of these cases (dropped observations or model nonconvergence), the user should consider either collapsing the multicategorical variable into fewer categories or specifying it as a continuous variable by not adding it to cat() if appropriate.
nointeraction specifies that a treatment-mediator interaction should not be included in the outcome model. When not specified, rwrmed will generate a treatmentmediator interaction term.
cxa specifies that all two-way interactions between treatment and the baseline covariates be included in the mediator and outcome models.
cxm specifies that all two-way interactions between the mediator and the baseline covariates be included in the outcome model.
lxm specifies that all two-way interactions between the mediator and the posttreatment covariates be included in the outcome model.
noisily displays the gsem output tables; this option is not available with bootstrap.
bootstrap [(bootstrap_options)] specifies that bootstrap replications be used to estimate the variance–covariance matrix. All bootstrap options are available. Specifying bootstrap without options uses the default bootstrap settings.
model_options allows the user to specify any option available for gsem.
vce(robust) and vce(clusterclustvar); see [R] vce_option.
4 Examples
In this section, we use rwrmed to decompose the effect of negative media framing on support for immigration into direct and indirect components using data from Brader, Valentino, and Suhay (2008). These researchers conducted a survey experiment on a nationally representative sample of white non-Hispanic adults. For this experiment, respondents were asked to read a mock news report on immigration where both the ethnicity of the featured immigrant and the tone of the story were randomly manipulated. Specifically, respondents were presented with a story that featured either a white European immigrant or a Latino immigrant and that focused on either the benefits or the costs of immigration. After reading the story, respondents were asked to report their beliefs about the harms of immigration, their emotional reactions toward the prospect of increased immigration, and their support for further immigration to the United States. With these data, Brader, Valentino, and Suhay (2008) found that stories featuring a Latino immigrant and a frame emphasizing the costs of immigration had a large negative effect on support for immigration. We extend this analysis by using rwrmed to examine whether this effect may be mediated by respondents’ emotional reactions to the news story, adjusting for their beliefs about the harms of immigration.
The outcome, depvar, is a measure of support for immigration on a five-point scale, with response categories ranging from the statement that immigration should be “decreased a lot” to the statement that it should be “increased a lot”. The treatment, avar(), denotes receipt of a news story featuring both a Latino immigrant and a negative frame emphasizing the costs of immigration. The mediator, mvar(), is the level of anxiety expressed by the respondent about the prospect of increased immigration on a 10-point scale. The vector of baseline confounders, cvar(), includes measures of gender, age, education, and income. Finally, a potentially important posttreatment confounder, included as an lvars, is respondents’ beliefs about the harms of immigration on a seven-point scale, which was constructed from questions asking respondents about the likelihood that immigration will negatively impact the “finances” and “way of life” of American communities.
4.1 A conventional analysis of mediation
To begin, we implement rwrmed without including any posttreatment covariates, in which case the command will produce estimates of the NDE, NIE, and ATE. In the following syntax, we specify the outcome (immigr), the mediator (emo), the binary treatment (tone_eth), four pretreatment covariates (of which two are categorical), an interaction between treatment and mediator (indicated by not specifying the nointeraction option), and the bootstrap method for variance estimation with 10,000 repetitions and a seed(1234) to allow for replication of results:
As shown in the output, we estimate that negative media framing has a sizable total effect on support for immigration. Specifically, receipt of a news story featuring a Latino immigrant and emphasizing the costs of immigration is estimated to lower support for immigration by 0.42 points on average (95% confidence interval (CI): [−0.66, −0.18]). The NDE and NIE are estimated to be −0.24 (95% CI: [−0.49, 0.02]) and −0.18 (95% CI: [−0.32, −0.04]), respectively. This suggests that about 44% (NIE/ATE ≈ 0.44) of the overall effect is mediated by a negative emotional reaction to immigration. All the estimates reported here, however, are based on the assumption of no treatment-induced confounding, which may not be appropriate in this analysis. This is because beliefs about the harms of immigration likely affect both emotional reactions and levels of support for immigration, and they may also be affected by treatment.
4.2 Adjusting for posttreatment confounding
In the following syntax, we specify the outcome (immigr), the mediator (emo), the binary treatment (tone_eth), four pretreatment covariates (of which two are categorical), one posttreatment covariate, an interaction between treatment and mediator (indicated by not specifying the nointeraction option), and the bootstrap method for estimation with 10,000 repetitions and a seed(1234) to allow for replication of results:
As shown in the output, the regression-with-residuals estimates for the overall effect of exposure to a news story featuring a Latino immigrant and emphasizing the costs of immigration is similar to the total effect estimate from section 4.1, which was based on conventional models that did not adjust for posttreatment confounding. Specifically, the estimate of the rATE indicates that the overall effect of treatment is to reduce support for immigration by about 0.42 points, on average (95% CI: [−0.66, −0.18]). The rNDE and rNIE estimates are very different, however. The rNDE estimate is −0.36 (95% CI: [−0.62, −0.10]), and the rNIE estimate is −0.06 (95% CI: [−0.18, 0.05]). This suggests that, after properly adjusting for posttreatment confounding by beliefs about the costs of immigration, only about 15% (rNIE/rATE ≈ 0.15) of the overall effect is mediated by a negative emotional reaction to immigration.
4.3 Adding covariate interactions
In the following syntax, we extend the model from section 4.2 by adding two-way interactions between the treatment indicator and all pretreatment covariates, the mediator and all pretreatment covariates, and the mediator and all posttreatment covariates using the cxa, cxm, and lxm options, respectively.
As shown in the output, the interventional effect estimates are similar to those from the model in section 4.2, with the indirect effect now accounting for about 22% of the overall effect (rNIE/rATE ≈ 0.22). That the estimates are stable when comparing a parsimonious model with one that accommodates several different types of effect moderation gives us more confidence that the results are not distorted by model misspecification.
4.4 Analyzing a dichotomized mediator
In this example, we present a parallel analysis of the immigration data in which the mvar() is coded as a binary variable for illustrative purposes. Specifically, mvar() is coded 1 if a respondent’s anxiety about increased immigration is in the top quintile of the sample distribution, indicating he or she is among the 20% most anxious, and 0 otherwise. All other variables are defined as in the prior examples.
The output indicates that the rATE estimate is almost identical to those reported previously. Nevertheless, it also shows that, with a dichotomized mediator, nearly the entire effect appears to operate through a direct pathway, while the indirect effect operating through respondent anxiety is negligible. The difference between the results in this example and those reported in sections 4.2 and 4.3 may reflect the problems that arise when dichotomizing a continuous variable (Royston, Altman, and Sauerbrei 2006). Nevertheless, they are generally consistent with those based on the mediator when measured in its original metric.
5 Discussion
In this article, we introduced the rwrmed package to perform mediation analysis using regression with residuals, a method for decomposing an overall effect of treatment into direct and indirect components when treatment-induced confounding is present. Because regression with residuals involves only a minor adaption of conventional methods, its computations should be familiar to most applied researchers. We therefore expect that it will find wide application in analyses of causal mediation.
The method’s simplicity, however, is premised on a set of strong modeling assumptions. In particular, regression with residuals requires a correct linear model for the outcome and then correct generalized linear models for the mediator and each of the posttreatment confounders. If any of these models are incorrectly specified, then regression-with-residuals estimates of direct and indirect effects may be biased. Regression with residuals is also premised on a set of strong identification assumptions. These assumptions require that all relevant confounders of the treatment-outcome, treatmentmediator, and mediator-outcome relationships have been observed and appropriately controlled. In observational studies where treatment has not been randomly assigned, all of these assumptions must be carefully scrutinized. If any are violated, then regressionwith-residuals estimates of direct and indirect effects will be biased. Moreover, even in experimental studies where treatment has been randomly assigned—like that considered in our empirical illustrations—it is still important to consider the possibility that the assumption of no mediator-outcome confounding may be violated. Thus, analysts should always consider implementing a formal sensitivity analysis, as outlined in Wodtke and Zhou (2020), to assess the degree to which their causal inferences are sensitive to different patterns of bias due to unobserved confounding.
Supplemental Material
Supplemental Material, sj-zip-1-stj-10.1177_1536867X211045511 - A regression-with-residuals method for analyzing causal mediation: The rwrmed package
Supplemental Material, sj-zip-1-stj-10.1177_1536867X211045511 for A regression-with-residuals method for analyzing causal mediation: The rwrmed package by Ariel Linden, Chuck Huber and Geoffrey T. Wodtke in The Stata Journal
Footnotes
6 Acknowledgments
We thank Enrique Pinzon of StataCorp for his helpful suggestion to use margins with the vce(unconditional) option for estimating analytic standard errors. We also thank Xiang Zhou for reviewing a draft of the manuscript. Finally, we thank the anonymous reviewer and chief editor for their thoughtful reviews and recommendations for improving the article.
7 Programs and supplemental materials
To install a snapshot of the corresponding software files as they existed at the time of publication of this article, type
References
1.
AgrestiA.2013. Categorical Data Analysis. 3rd ed. Hoboken, NJ: Wiley.
BraderT.ValentinoN. A.SuhayE.2008. What triggers public opposition to immigration? Anxiety, group cues, and immigration threat. American Journal of Political Science52: 959–978. https://doi.org/10.1111/j.1540-5907.2008.00353.x.
DanielR. M.De StavolaB. L.CousensS. N.2011. gformula: Estimating causal effects in the presence of time-varying confounding or mediation using the g-computation formula. Stata Journal11: 479–517. https://doi.org/10.1177/1536867X1201100401.
6.
DippelC.FerraraA.HeblichS.2020. Causal mediation analysis in instrumentalvariables regressions. Stata Journal20: 613–626. https://doi.org/10.1177/1536867X20953572.
EmsleyR.LiuH.2013. paramed: Stata module to perform causal mediation analysis using parametric regression models. Statistical Software Components S457581, Department of Economics, Boston College. https://ideas.repec.org/c/boc/bocode/s457581.html.
9.
FalcaroM.PicklesA.2010. riskplot: A graphical aid to investigate the effect of multiple categorical risk factors. Stata Journal10: 61–68. https://doi.org/10.1177/1536867X1001000107.
LindenA.2020. cta: Stata module for conducting classification tree analysis. Statistical Software Components S458729, Department of Economics, Boston College. https://ideas.repec.org/c/boc/bocode/s458729.html.
13.
LindenA.KarlsonK. B.2013. Using mediation analysis to identify causal mechanisms in disease management interventions. Health Services and Outcomes Research Methodology13: 86–108. https://doi.org/10.1007/s10742-013-0106-5.
14.
LindenA.YarnoldP. R.2018. Identifying causal mechanisms in health care interventions using classification tree analysis. Journal of Evaluation in Clinical Practice24: 353–361. https://doi.org/10.1111/jep.12848.
15.
PearlJ.2009. Causality: Models, Reasoning, and Inference. 2nd ed. New York: Cambridge University Press.
16.
RoystonP.AltmanD. G.SauerbreiW.2006. Dichotomizing continuous predictors in multiple regression: A bad idea. Statistics in Medicine25: 127–141. https://doi.org/10.1002/sim.2331.
VanderWeeleT. J.2015. Explanation in Causal Inference: Methods for Mediation and Interaction. New York: Oxford University Press.
24.
VanderWeeleT. J.VansteelandtS.RobinsJ. M.2014. Effect decomposition in the presence of an exposure-induced mediator-outcome confounder. Epidemiology25: 300–306. https://doi.org/10.1097/EDE.0000000000000034.
25.
WodtkeG. T.AlmirallD.2017. Estimating moderated causal effects with timevarying treatments and time-varying moderators: Structural nested mean models and regression with residuals. Sociological Methodology47: 212–245. https://doi.org/10.1177/0081175017701180.
26.
WodtkeG. T.ZhouX.2020. Effect decomposition in the presence of treatmentinduced confounding: A regression-with-residuals approach. Epidemiology31: 369–375. https://doi.org/10.1097/EDE.0000000000001168.
27.
ZhouX.WodtkeG. T.2019. A regression-with-residuals method for estimating controlled direct effects. Political Analysis27: 360–369. https://doi.org/10.1017/pan.2018.53.
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.