Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2026 Jul 15.
Published in final edited form as: Ann Stat. 2025 Feb 13;53(1):400–425. doi: 10.1214/24-aos2475

MULTIVARIATE DYNAMIC MEDIATION ANALYSIS UNDER A REINFORCEMENT LEARNING FRAMEWORK

Lan Luo 1,a, Chengchun Shi 2, Jitao Wang 3, Zhenke Wu 3, Lexin Li 4
PMCID: PMC13366421  NIHMSID: NIHMS2186888  PMID: 42453116

Abstract

Mediation analysis is an important analytic tool commonly used in a broad range of scientific applications. In this article, we study the problem of mediation analysis when there are multivariate and conditionally dependent mediators, and when the variables are observed over multiple time points. The problem is challenging, because the effect of a mediator involves not only the path from the treatment to this mediator itself at the current time point, but also all possible paths pointed to this mediator from its upstream mediators, as well as the carryover effects from all previous time points. We propose a novel multivariate dynamic mediation analysis approach. Drawing inspiration from the Markov decision process model that is frequently employed in reinforcement learning, we introduce a Markov mediation process paired with a system of time-varying linear structural equation models to formulate the problem. We then formally define the individual mediation effect, built upon the idea of simultaneous interventions and intervention calculus. We next derive the closed-form expression, propose an iterative estimation procedure under the Markov mediation process model and develop a bootstrap method to infer the individual mediation effect. We study both the asymptotic property and the empirical performance of the proposed methodology, and further illustrate its usefulness with a mobile health application.

Key words and phrases. Longitudinal data, Markov process, mediation analysis, mobile health, reinforcement learning

MSC2020 subject classifications: 62L10

1. Introduction.

Mediation analysis is an important analytic tool, which seeks to explain the mechanism or pathway that underlies an observed relationship between a treatment and an outcome variable, through the inclusion of an intermediary variable known as a mediator. It decomposes the effect of the treatment on the outcome into a direct effect and an indirect effect, the latter of which indicates whether the mediator is on a pathway from the treatment to the outcome (Baron and Kenny (1986)). Mediation analysis is widely employed in a range of scientific applications, including psychology (MacKinnon (2008), Rucker et al. (2011)), genomics (Huang and Pan (2016), Bi et al. (2017)), economics (Celli (2022)), social science (Kaufman and Kaufman (2001)), neuroscience (Zhao and Luo (2022)), among many others. See VanderWeele (2016) for a comprehensive review and the references therein.

Mediation analysis has seen considerable progress in recent years. There are two lines of research of particular interest, mediation analysis with multivariate mediators and mediation analysis with time-varying variables. The first line targets the scenario where there are multiple mediators, and one central goal is to evaluate and quantify the contribution of the treatment on the outcome attributed to each individual mediator. There are three main categories of solutions. One category explicitly imposes that the multivariate mediators are conditionally independent given the treatment, which substantially simplifies the analysis (Boca et al. (2014), Huang and Pan (2016), Zhang et al. (2016), Guo et al. (2023), Shuai et al. (2023), Yuan and Qu (2024)). Another category does not impose such a condition, but instead marginalizes each individual mediator, which in effect neglects any potential interaction and dependency among the mediators (Sampson et al. (2018), Djordjilović, Hemerik and Thoresen (2022), Zhao, Li and Initiative (2022), Zhao and Luo (2022)). The last category does allow correlated mediators, characterizes their dependency through some unknown directed acyclic graph (DAG), then carries out mediation analysis based on the estimated DAG (Maathuis, Kalisch and Bühlmann (2009), Chakrabortty, Nandy and Li (2018), Cai, Song and Lu (2021), Shi and Li (2022), Wei et al. (2024)). The second line targets the scenario where the treatment, mediator and outcome are observed over multiple time points or stages. There have been some pioneering works along this line (Selig and Preacher (2009), Preacher (2015), VanderWeele and Tchetgen Tchetgen (2017), Lin et al. (2017), Huang and Yuan (2017), Zheng and van der Laan (2017), Zhao et al. (2018), Hejazi et al. (2023), Cai et al. (2022), Díaz, Williams and Rudolph (2023), Ge et al. (2023)). Nevertheless, they all focus on the case where there is only a single mediator, and most only consider the case where the number of time points, or the time horizon is finite.

In this article, we study the problem of mediation analysis when there are multivariate and conditionally dependent mediators, and when the variables are observed over multiple time points. Our motivation is a mobile health application from the Intern Health Study (IHS, NeCamp et al. (2020)). It is a 26-week prospective longitudinal randomized trial targeting first-year training physicians in the United States (NeCamp et al. (2020)). A key objective of this study is to investigate the effectiveness of in-the-moment mobile prompts in improving an intern’s mood score while minimizing user burden and expense. The prompts, delivered through a customized mobile app, consist of practical tips and life insights, such as reminders to have a break, take a walk or prioritize sleep that aim at promoting healthy behaviors among interns. These prompts not only affect an intern’s mood, but also influence other physiological measurements, including physical activity, sleep duration and heart rate variability, which are closely associated with an individual’s mental state. We can naturally formulate this problem in the framework of mediation analysis, where the treatment is the binary variable that encodes receiving a prompt or not, regardless of the prompt type, the mediators consist of measurements of physical activities, sleep duration and heart rate variability, and the outcome is the mood score. Given the presence of multiple mediators and the longitudinal nature of the data, it calls for a mediation analysis approach that tackles both multivariate mediators and multiple time points.

However, the problem is challenging, for several reasons. First, multivariate and conditionally correlated mediators introduce considerable complexity. Unlike the single mediator or conditionally independent mediator case, the indirect effect of each individual mediator involves not only the path from the treatment to this mediator itself, but also all possible paths pointed to this mediator from its upstream mediators. The total number of potential paths that go through any mediator is superexponential in the number of mediators. It is thus crucial to carefully disentangle the individual mediation effect when the multivariate mediators are interrelated with unknown dependency. Second, time-varying variables introduce another layer of complexity, as there are carryover effects along time. Unlike the single time-point case, the mediator at a given time point could affect both the current and future outcomes, and thus it is crucial to learn both the immediate effect and the delayed effect. Infinite time horizon further complicates the analysis when the mediator effect accumulates over infinite time.

To address those challenges, we propose a novel multivariate dynamic mediation analysis approach. Our proposal consists of four key components. First, drawing inspiration from the Markov decision process (MDP, Puterman (1994)) model that is frequently employed in reinforcement learning (RL, Sutton and Barto (2018)) to handle the carryover effects over time, we introduce a Markov mediation process (MMP) framework to formulate the dynamic mediation analysis problem. We then introduce a system of time-varying linear structural equation models (SEMs) to specifically characterize the relations among the treatment, mediator and outcome variables. Second, within the framework of MMP, we formally define the individual mediation effect, which is built upon the idea of simultaneous interventions and intervention calculus (Pearl (2000)). This individual mediation effect can be further decomposed into a sum of the immediate effect and the delayed effect, the latter of which quantifies the carryover effects of the past treatments and mediators. Third, under the proposed MMP and the linear SEMs, we derive the closed-form expression for the individual mediation effect; see Theorems 1 and 2. These theorems form the basis of our proposed procedure, allow us to express the individual mediation effect using a set of within-stage and cross-stage intermediate quantities that can be estimated through some recursive formulations and consist of the main contributions of our proposal. We next propose to estimate those within-stage quantities through linear regressions with backdoor covariate adjustment, and estimate those cross-stage quantities through the transition equations under SEMs. Finally, we study the asymptotic property of our proposed estimator of the individual mediation effect, develop a bootstrap method to construct its confidence interval (CI) and conduct extensive numerical studies to demonstrate the effectiveness of our method. In summary, our approach allows us to separately evaluate the contribution of each individual mediator, where multiple mediators are interrelated with unknown dependency and are observed over multiple time points.

The rest of the article is organized as follows. We present the Markov mediation process, the structural equation models, and the definition of the individual mediation effect in Section 2. We derive the intermediate quantities, the recursive formulation of the individual mediation effect, and the estimation algorithms in Section 3. We establish the asymptotic properties in Section 3.5. We carry out the simulations in Section 4, and revisit the IHS example in Section 5. We relegate all technical proofs to the Supplementary Material (Luo et al. (2025)).

2. Model and definition.

In this section, we first present our model setup, then formally define the mediation effect of interest in the multivariate dynamic mediation analysis setting.

2.1. Markov mediation process and structural equation models.

We first introduce a Markov mediation process framework to formulate the problem we target; see Figure 1(b) for a graphical illustration. Consider the treatment-mediator-outcome triplets At,Mt,Rt:t=1,,T} over time, where T denotes the number of time points or stages. At each time point or stage t, a random treatment AtR is administered, which subsequently affects a d-dimensional vector of potential mediators MtRd, and an outcome variable RtR. We assume they satisfy the Markov assumption, in that

Rt,MtRs,Ms,As+1s<t-1Rt-1,Mt-1,Atforanyt1, (1)

where denotes statistical independence. We remark the Markov condition like (1) is widely imposed in sequential data problems (Sutton and Barto (2018)). Suppose the observed data consists of n independent and identically distributed (i.i.d.) realizations of the triplets At,Mt,Rt:t=1,,T. We allow the data to be either densely or sparsely observed. Moreover, for simplicity, we assume that all subjects have the same T. Nevertheless, our proposed method can be adapted to accommodate the setting when T varies among subjects, and when the time lags between two time points differ. See Section 6.4 for more details.

Fig. 1.

Fig. 1.

(a) Diagram of Markov decision process (MDP), where treatments depend on current states only, and (St,At,Rt) represents the state-treatment-reward triplet; (b) Diagram of the proposed Markov mediation process (MMP), where current mediators depend on previous mediator-reward pairs, and (At,Mt,Rt) represents the treatment-mediator-outcome triplet.

In addition to the Markov condition, we further assume that the random treatment assignment is independent of the prior information, in that

AtAs,Ms,Rsforanys<t. (2)

Condition (2) holds in the sequentially randomized trials naturally, including our IHS example, which is the main setting we target in this article. Meanwhile, our framework can also be extended to the setting that involves certain static baseline confounders that may influence the treatment selection, thus accommodating the data from observational studies. Specifically, letting X denote the baseline confounders, Condition (2) can be relaxed to AtAs,Ms,RsX, for any s<t. The individual mediation effect that we define later can be similarly derived by incorporating X into the model. For presentation simplicity, however, we choose not to include those confounders in this article.

We next introduce a system of time-varying structural equation models,

Mt-μt=WtMt-μt+ϵwt, (3)

where μtEMtAt,Mt-1,Rt-1 is the condition mean function, WtRd×d is the weight matrix, such that Wtij0 if and only if mediator Mti is a parent of Mtj, that is, Mti is in the parent set, MtiPaMtjMti:Wtij0,i{1,,d}{j} and ϵwt=ϵw1t,,ϵwdtRd is a vector of mean zero random errors. In model (3), the weight matrix Wt models the interactions among the mediators Mt at each time point, and the conditional mean μt characterizes the dynamic dependence over time.

We then consider the linear models for μt and Rt, in that

μt=α1t+δ1tAt+𝚪1tMt-1+ζ1tRt-1,Rt=α2t+δ2tAt+γ2tMt-1+ζ2tRt-1+κtMt+ϵrt, (4)

for some α1t,δ1t,ζ1tRd,𝚪1tRd×d, and for γ2t,κtRd,α2t,δ2t,ζ2tR and some mean zero errors ϵrtt independent over time, respectively. In model (4), 𝚪1t characterizes the effect of Mt-1 on Mt. All random variables in (4) are assumed to have finite second moments. Let 𝚯1tα1t,δ1t,𝚪1t,ζ1tRd×(d+3) collect all the parameters for μt, and 𝚯2tα2t,δ2t,γ2t,ζ2t,κtR(2d+3)×1 collect all the parameters for Rt.

We make a few remarks. First, we draw a connection between the proposed MMP and MDP commonly studied in RL—a powerful machine learning technique for optimal sequential decision making (Murphy (2003), Mnih et al. (2015), Silver et al. (2017), Qin, Zhu and Ye (2021), Zhang, Chen and Yang (2023)). Both capture the carryover effects over time. MDP achieves this by introducing a sequence of time-varying feature variables, referred to as the states. It then models the carryover effects through state transitions, allowing past treatments to affect future outcomes through their impact on future states; see Figure 1(a) for an illustration. This approach has gained substantial attention for policy evaluation, serving to model both immediate and long-term effects of a target policy (Luckett et al. (2020), Hao et al. (2021), Liao, Klasnja and Murphy (2021), Kallus and Uehara (2022), Hu and Wager (2022), Liao et al. (2022), Ramprasad et al. (2023), Shi et al. (2022), Liu et al. (2023), Wang, Qi and Wong (2023)). In a similar vein, our MMP operates by modeling the indirect influence of a preceding mediator via the transitions of mediator-outcome pairs. In essence, a past mediator influences future outcomes by exerting its effects on both the prior outcome and the subsequent mediator; see Figure 1(b) for an illustration. Second, the relation in (3) should be understood as a data generating mechanism, rather than as a mere association. It corresponds to a directed acyclic graph (DAG). Third, to keep the presentation simple, we do not include any time-varying confounders, which may be incorporated into our solution in a relatively straightforward fashion. We do not consider any unobserved confounders either, because we consider random treatment assignments. We leave the case with unobserved confounders as future research. Finally, we consider linear type models in both (3) and (4). The analysis of mediation has been dominated by linear regression paradigms and such linearity assumption is commonly adopted in existing work; see, for example, Nandy, Maathuis and Richardson (2017), Chakrabortty, Nandy and Li (2018), Shi and Li (2022). It is possible to extend to nonlinear type models, under which the definition of individual mediation effect we give later still holds, but is more difficult to evaluate.

In this article, we consider two different settings: the finite-horizon and the infinitehorizon, borrowing the concepts from the RL literature (Sutton and Barto (2018)). For the finite-horizon setting, the number of time points T is fixed and finite. It usually corresponds to the traditional longitudinal studies, where subjects receive a finite number of treatments over a predetermined time period. For the infinite-horizon setting, T approaches infinity theoretically. It often applies to the applications involving continuous monitoring systems such as wearable devices, where the data is densely collected at high frequencies, for example, every second or minute. For the finite-horizon setting, we allow the process At,Mt,Rt to be nonstationary. However, for the infinite-horizon setting, we require the process to be stationary over time, that is, the parameters Wt,𝚯1t and 𝚯2t are constant over time. Without stationarity, we need to extrapolate to infer system dynamics beyond the observed time.

In summary, we believe that our model framework provides a reasonable starting point for multivariate dynamic mediation analysis. The methodology under our setting is already complex enough, and deserves a careful investigation.

2.2. Total, direct and indirect effects.

Before we formally define the individual mediation effect, which is the main target of interest in this article, we first introduce the notions of total effect, natural direct effect and natural indirect effect in the finite-horizon setting. This is to facilitate the understanding of our target, and also to establish the connection with the classical mediation analysis literature.

For the total effect, consider a hypothetical intervention applied to the system, where we set all treatments to some value a uniformly over the entire population. This can be realized through Pearl’s do-operator, doAt=a, which generates an interventional distribution by removing the edges leading into As:st in the corresponding DAG (Pearl (2000)). We denote the post-interventional expectation of Rt by ERtdoAs=a,st. We then define the total effect over T time points as

TE=t=1TaERtdoAs=a,st. (5)

We make two remarks. First, each summand ERtdoAs=a,st/a on the right-hand side of (5) measures the total effect of treatment Asst on Rt at time t. Second, when the treatment takes a discrete value, the derivative in those terms can be substituted by the difference operator. For instance, if the treatment is binary, we obtain that

TE=t=1TERtdoAs=1,st-ERtdoAs=0,st.

Next, we decompose the total effect into the sum of the natural direct effect and the natural indirect effect. Specifically, at each time point t=1,,T, we define the direct effect to be the portion of the total effect of a sequence of treatment variables As:st on the outcome Rt that does not go through Ms:st. To measure such an effect, we consider the joint intervention on (As,Ms) through doAs=a,Ms=ms, and denote the post-interventional expectation of Rt by ERtdoAs=a,Ms=ms,st. We then define the natural direct effect over T time points as

DE=t=1Tm1,,mTaERtdoAs=a,Ms=ms,st×fm1,,mTdoAt=a,1tTdm1dmT,

where f denotes the interventional probability density function of (M1,,MT) under the assumption that all treatments are set to a, and the term ERtdoAs=a,Ms=ms,st)]/a corresponds to the interventional effect of Asst on Rt when setting the interventional values of Msst to constants.

We then define the natural indirect effect as the difference between TE and DE, that is, IE=TE-DE, which quantifies the portion of the effect of the treatment sequence on the outcome that goes through the mediator sequence.

We remark that the definitions of TE, DE and IE do not require linear structural equation models like (4). However, imposing such models greatly simplify the analysis. More specifically, in a general Markov mediation process, both ERtdoAs=a,st/a and ERtdoAs=a,Ms=ms,st/a can depend on a,m1,,mt in a very complex manner, as also mentioned in Chakrabortty, Nandy and Li (2018). However, (4) simplifies these expressions to be functions of the regression coefficients that are independent of specific values of ms or a; see Section 3 for more details. As a result, DE is equivalent to

t=1TaERtdoAs=a,Ms=m,st, (6)

for any m, where (6) is the controlled direct effect, computed by setting all values of mediators to m. Correspondingly, by (5) and (6), the natural indirect effect becomes

t=1TaERtdoAs=a,st-aERtdoAs=a,Ms=m,st. (7)

In other words, the linear structural equation model avoids the need to estimate the interventional probability density function f, thus substantially simplifying the forms of DE, IE and their subsequent estimation and inference procedures.

2.3. Individual mediation effect.

We now formally define the individual mediation effect, the main target in our dynamic mediation analysis. We begin with the finite-horizon setting.

Definition 1 (Individual mediation effect in finite-horizon). In a finite-horizon setting, the individual mediation effect of the jth mediator over T time points is defined as

ηj(T)t=1TaERtdoAs=a,st-t=1TaERtdoAs=a,Msj=m,st.

When the treatment is binary, ηj(T) can be defined as

ηj(T)=a=01(-1)a+1t=1TERtdoAs=a,st-t=1TERtdoAs=a,Msj=m,st. (8)

We again make a few remarks. First, our definition of the individual mediation effect is related to the definition of IE in (7), and is defined as the difference between the total effect and the interventional effect ERtdoAs=a,Msj=m,st/a over time. However, the key difference is that, whereas IE measures the mediation effect of all mediators, ηj(T) focuses on quantifying the portion of the effect that specifically passes through the individual j th mediator. As such, we only intervene the j th mediator as opposed to all mediators in the intervention, and we refer to it as an individual mediation effect.

Second, our definition is consistent with the existing literature. Specifically, when there is only one mediator M and a single time point, our definition aligns with the classical definition of Baron and Kenny (1986), E[Rdo(A=a)]/a-E[Rdo(A=a,M=m)]/a, where the first term is the regression coefficient by regressing R on A, and the second term is the partial regression coefficient by further including M in the regression. This difference measuring the reduction in the total effect due to controlling for M is widely used to quantify the effect mediated through M; see also Pearl (2012). When there is a single time point, our definition is consistent with the one proposed by Chakrabortty, Nandy and Li (2018). When there is a single mediator, (8) is similar to the definitions proposed by VanderWeele and Tchetgen Tchetgen (2017) and Ge et al. (2023) under a potential outcome framework.

Third, under the linear structural equation model (4), ηj(T) is a constant function with respect to m and a. It can depend on (a,m) in a more general Markov mediation process, for example, when either the transition model from a given time point to the next or the DAG structural equation model at a given time point is nonlinear. In addition, we observe that, under (4), the second post-interventional expectation term, ERtdoAs=a,Msj=m,st)], may be analyzed by the path method (Wright (1921)). That is, it can be calculated by summing up the effects along all directed paths from Asst to Rt that do not pass through Msjst. However, this approach can be computationally expensive, since the number of paths grows exponentially fast as the number of time points T increases.

Finally, ηj(T) in Definition 1 measures the cumulative effect mediated through the j th mediator Mj across all T stages. Alternatively, one may be interested in the incremental effect,

Δj(t)aERtdoAs=a,st-aERtdoAs=a,Msj=m,st,

which measures the individual mediation effect attributed to Mj at time t. By definition, we see that this incremental effect is related to the cumulative effect, in that ηj(T)=t=1TΔj(t).

To better understand our definition of the individual mediation effect, we further decompose Δj(t) into the sum of the immediate individual mediation effect (IIME) and the delayed individual mediation effect (DIME), as defined next.

Definition 2 (Immediate and delayed individual mediation effects in finite-horizon). Define the immediate individual mediation effect (IIME) and the delayed individual mediation effect (DIME) as

IIMEj(t)aERtdoAt=a-aERtdoAt=a,Mtj=m,DIMEj(t)Δj(t)-IIMEj(t).

At a given time point t,IIMEj(t) can be interpreted as the change in the total effect of At on Rt when Mtj is knocked out, whereas DIMEj(t) captures the individual mediation effect of the j th mediator that is carried over from all previous stages s<t up to time t.

We next turn to the infinite-horizon setting. In this setting, the individual mediation effect is defined as the average effect over time, so to prevent it from being unbounded.

Definition 3 (Individual mediation effect in infinite-horizon). In an infinite-horizon setting, the individual mediation effect of the j th mediator is defined as ηj()limTηj(T)/T, provided that the limit exists.

We comment that all above definitions are natural and agree with the intuitions. We next discuss how to evaluate and estimate the individual mediation effect given the data.

3. Evaluation of individual mediation effect.

In this section, we propose approaches to estimate and infer the individual mediation effects given in Definitions 1 and 3. The problem, however, is very challenging, as we have to deal with both the multiple mediators with unknown correlation structure, as well as the carryover effects from the upstream treatments and mediators. Our proposed solution involves deriving a closed-form expression for the individual mediation effect, as detailed in Theorems 1 and 2. This expression is dependent on several intermediate quantities that are computable through a set of recursive relations. Leveraging these theoretical findings, we develop an efficient recursive computation algorithm to estimate these intermediate quantities, which subsequently facilitate both the estimation and inference of the individual mediation effect.

3.1. An illustrative example.

To illustrate our theory, we first consider a simple example as shown in Figure 2, in which there are only d=2 mediators and T=2 time stages. We then extend our observations to more general cases with d mediators and T stages.

Fig. 2.

Fig. 2.

An illustrative example with two mediators and two time stages. The left panel shows the DAG in the first stage, and the right panel the first two stages. The dashed lines highlight the paths that go through the intervened mediator, that is, the second mediator.

Suppose we focus on the individual mediation effect for the second mediator, that is, j=2. We begin with the first stage t=1, as shown in Figure 2, left panel. By Definition 1,

η2(1)=aER1doA1=a-aER1doA1=a,M12=mθA1R1-θA1R1M12, (9)

where we use θA1R1 to denote the total effect from A1 to R1, and use θA1R1M12 to denote the total effect from A1 to R1 when the second mediator is intervened in the first stage.

We compute θA1R1 by summing up the effects along all directed paths from A1 to R1, namely A1R1,A1M11R1,A1M12R1 and A1M11M12R1. Meanwhile, we compute θA1R1M12 by eliminating all paths that go from A1 to R1 through M12. This corresponds to subtracting the effects along A1M12R1 and A1M11M12R1, which leads to

θA1R1M12=θA1R1-θA1M12θM12R1, (10)

where we use θA1M12 and θM12R1 to denote the effect from A1 to M12, and from M12 to R1, respectively. The relation in (10) has an intuitive interpretation: to evaluate the total effect from A1 to R1 when M12 is intervened, we subtract from θA1R1 the effects along the paths that go through M12. Plugging (10) into (9), we obtain that η2(1)=θA1M12θM12R1, which coincides with the classical product type representation of the individual mediation effect in a single-stage analysis (Nandy, Maathuis and Richardson (2017)).

We next move to the second stage t=2, as in Figure 2, right panel. By Definition 1,

η2(2)=η2(1)+aER2doA1=A2=a-aER2doA1=A2=a,M12=M22=mη2(1)+θA1,A2R2-θA1,A2R2M12,M22, (11)

where we use θA1,A2R2 to denote the cumulative total effect of (A1,A2) on R2, and use θA1,A2R2M12,M22 to denote the cumulative total effect of A1,A2 on R2 when the second mediator is intervened in both the first and second stages.

Because the treatments are randomly assigned and their parent sets are empty, we have

θA1,A2R2=θA1R2+θA2R2,θA1,A2R2M12,M22=θA1R2M12,M22+θA2R2M22, (12)

where we use θA1R2 and θA2R2 to denote the total effects from A1 to R2, and from A2 to R2, respectively, use θA2R2M22 to denote the effect from A2 to R2 when the second mediator is intervened in the second stage, and use θA1R2M12,M22 to denote the effect from A1 to R2 when the second mediator is intervened in both stages.

We compute θA1R2 and θA2R2 similarly as that for θA1R1. We compute θA2R2M22 similarly as in (10), that is, θA2R2M22=θA2R2-θA2M22θM22R2. Also, similar to (10), we have

θA1R2M12,M22=θA1R2M22-θA1M12θM12R2M22, (13)

where we use θA1R2M22 and θM12R2M22 to denote the effects from A1 to R2, and from M12 to R2, when the second mediator is intervened in the second stage. Intuitively, θM12R2M22 can be interpreted as the carryover effect of the second mediator on the outcome from the first stage to the second stage when it is intervened. We again compute θA1R2M22 similar to (10), that is, θA1R2M22=θA1R2-θA1M22θM22R2. In addition, we compute θM12R2M22 by eliminating all paths that go from M12 to R2 through M22, which leads to

θM12R2M22=θM12R2-θM12M22θM22R2, (14)

where we use θM12R2,θM12M22 and θM22R2 to denote the effects from M12 to R2, from M12 to M22 and from M22 to R2, respectively.

Based on the derivations so far, we see that to evaluate the individual mediation effect, it is crucial to calculate those intermediate quantities, such as θA1R1,θA1M22,θM12M22,θM22R2, among others. Next, we briefly discuss how to evaluate those intermediate quantities after imposing the linear structural equation models (3) and (4). We also discuss some recursive relation that facilitates both the computational and statistical efficiencies.

First, we note that, under (3) and (4), we can estimate those intermediate quantities through linear regressions. For instance, we can estimate θA1R1 as the coefficient of A1 by linearly regressing R1 onto A1. Meanwhile, we can estimate θM22R2 as the coefficient of M22 by linearly regressing R2 onto M22, however, with some additional covariate adjustment. This is because, unless the two mediators (M21,M22) are conditionally independent given (M11,M12,R1,A2), we need to adjust for a set of covariates that satisfy Pearl’s backdoor criterion (Pearl (2000)). In other words, we should block the effects flowing from (A2,M11,M12,M21,R1) to M22. Therefore, we need to adjust for the covariate set PaM22M11M12R1A2 in this regression.

Second, we note that the set of intermediate quantities involve both within-stage quantities such as θA1R1,θM22R2, as well as cross-stage quantities such as θA1M22,θM12M22. There is some useful recursive relation between the within-stage and cross-stage quantities under the linear structural equation models (3) and (4). For instance,

θA1M2=𝚪12θA1M1+ζ12θA1R1, (15)

where θA1M2=θA1M21,θA1M22, and θA1M1=θA1M11,θA1M12. This suggests that the cross-stage carryover effect from A1 to M2=M21,M22 is a combination of its within-stage effect on M1=M11,M12 and on R1, respectively, whereas the coefficients 𝚪12,ζ12 can be viewed as the weights for such a cross-stage transition. In our estimation algorithm, we first estimate the within-stage quantities via linear regressions, then update the cross-stage quantities following (15). As we show later, the relation such as (15) not only expedites the computation, but also improves the estimation efficiency by leveraging more information from the conditional model (4).

In summary, this simple example reveals a number of important relations. First, we see that those intermediate quantities form the building blocks for our evaluation of the individual mediation effect. Second, (10), (13) and (14) suggest some useful recursive representations that in effect reduce the number of mediators in the superscript that are intervened upon. Third, under models (3) and (4), we can estimate those intermediate quantities through linear regressions, with possibly backdoor adjustment. Finally, we can further improve both the computational and statistical efficiencies through another set of recursive relations between the within-stage and cross-stage quantities. All these observations are crucial for our derivation of the expression for the individual mediation effect.

3.2. Intermediate quantities.

We now formally define the set of all intermediate quantities that are needed for the evaluation of the individual mediation effect. We then discuss how to estimate those quantities.

For any 1stT, and j=1,,d, define

θAsRtaERtdoAs=aR,θMsjMtmEMtdoMsj=mRd,θAsMtaEMtdoAs=aRd,θMsjRtmERtdoMsj=mR. (16)

These intermediate quantities in (16) can be obtained through linear regressions, either directly, or by some backdoor covariate adjustment. In particular, θAsRt can be obtained as the coefficient of As by linearly regressing Rt onto As with an intercept, and we write this coefficient as βAs,Rt. Similarly, θAsMt can be obtained as the coefficient of As by linearly regressing Mt onto As, denoted as βAs,Mt. Meanwhile, θMsjRt can be obtained as the coefficient of Msj by linearly regressing Rt onto Msj, along with the adjusted covariate set, PaMsjMs-1Rs-1As. Similarly, θMsjMt can be obtained as the coefficient of Msj by linearly regressing Mt onto Msj, along with the adjusted covariate set, PaMsjMs-1Rs-1As. Putting together, we have

θAsRt=βAs,Rt,θMsjMt=βMsj,MtPaMsjMs-1Rs-1As,θAsMt=βAs,Mt,θMsjRt=βMsj,RtPaMsjMs-1Rs-1As. (17)

Moreover, similar to (15), we obtain the following recursive relations between the within-stage quantities and the cross-stage quantities. That is, under models (3) and (4),

θAsRt=ζ2tθAsRt-1+κtθAsMt+γ2tθAsMt-1,θAsMt=𝚪1tθAsMt-1+ζ1tθAsRt-1,θMsjRt=ζ2tθMsjRt-1+κtθMsjMt+γ2tθMsjMt-1,θMsjMt=𝚪1tθMsjMt-1+ζ1tθMsjRt-1. (18)

In our implementation, we first estimate the within-stage quantities, θAtRt,θMtjRt,θAtMt,θMtjMt, using (17), then estimate the cross-stage quantities, θAsRt,θMsjRt,θAsRt,θMsjMt, for s=1,,t-1, using (18). This helps to improve both the estimation efficiency and the computation efficiency.

3.3. Individual mediation effect in a finite-horizon setting.

We next derive the expression of the individual mediation effect through the intermediate quantities in (16) under the finite-horizon setting.

We first sketch the key ideas of the derivation here, and relegate more details to the Supplementary Material. By Definition 1, the individual mediation effect of the j th mediator across t stages, j=1,,d,t=1,,T, can be expressed as

ηj(t)=ηj(t-1)+θA1,,AtRt-θA1,,AtRtM1j,,Mtj. (19)

Because all the treatments (A1,,At) are randomly assigned, and thus are independent of each other and all other covariates, similar to (12), we have

θA1,,AtRt=θA1Rt+θA2Rt++θAtRt,θA1,,AtRtM1j,,Mtj=θA1RtM1j,,Mtj+θA2RtM2j,,Mtj++θAtRtMtj. (20)

Then, similar to (10), (13) and (14), we obtain the following recursive relations that help reduce the number of mediators being intervened upon. That is, for any s=1,,t-1,

θAsRtMsj,,Mtj=θAsRtMs+1j,,MtjθAsMsjθMsjRtMsj,,Mtj==θAsRti=stθAsMijθMijRtMij,,Mtj; (21)
θMsjRtMsj,,Mtj=θMsjRtM(s+2)j,,Mtj-θMsjM(s+1)jθM(s+1)jRtM(s+1)j,,Mtj==θMsjRt-i=s+1tθMsjMijθMijRtMij,,Mtj. (22)

Combining (19), (20), (21) and (22), we obtain the following theorem with respect to the identification of individual mediation effect in finite-horizon settings. We relegate a more detailed derivation to the Supplementary Material.

Theorem 1 (Individual mediation effect for finite-horizon). Suppose Att1 are randomly assigned treatments and satisfy (2), and Mt,Rtt1 follow (3) and (4). Then

ηj(t)=ηj(t-1)+s=1ti=stθAsMijθMijRtMij,,Mtj,t=1,,T, (23)

where θMsjRtMsj,,Mtj is computed following (22), and we set ηj(0)=0.

As for estimation, based on Theorem 1, we estimate the individual mediation effect in a recursive manner. That is, for stage t-1, we first estimate the weight matrix Wt in (3), and the parameters 𝚯1t,𝚯2t in (4) for stage t. Estimation of Wt is needed for determining the parent set of each mediator, which in turn is used for backdoor covariate adjustment. There are multiple algorithms available to estimate Wt, including those developed in single time-point settings (Zheng et al. (2018), Yuan et al. (2019), Bello, Aragam and Ravikumar (2022)), and those developed in time-varying settings (Hyvärinen et al. (2010), Malinsky and Spirtes (2018), Pamfil et al. (2020)). We employ the DAGMA algorithm recently proposed by Bello, Aragam and Ravikumar (2022) for its simplicity and effectiveness. Recall that, in the finite-horizon setting, we allow the DAG to be nonstationary over time. We thus estimate the time-specific DAGs using DAGMA, with data pooled over multiple subjects but restricted to that time point only. We then estimate the within-stage quantities θAtRt,θMtjRt,θAtMt,θMtjMt using (17), and estimate the cross-stage quantities, θAsRt,θMsjRt,θAsMt,θMsjMt, for s=1,,t-1, using (18). Finally, we plug-in these estimators into (23) to estimate the individual mediation effect.

As for inference, based on Theorem 3 in Section 3.5, our plug-in estimator is asymptotically normal. This motivates us to employ the nonparametric bootstrap approach (Efron (1979)) to conduct statistical inference. Specifically, we first sample n trajectories from the observed data with replacement. We next refit the weight matrix Wt and reestimate the within-stage and cross-stage quantities using the bootstrap samples. During the refitting, there are two options. One is to use the bootstrap samples to refit the coefficients of the nonzero entries in the weight matrix only, without reestimating the structure of Wt. The other is to refit both the structure of Wt and its nonzero entries. When the structure learning algorithm is consistent, the two solutions are asymptotically equivalent. For finite samples, the former is computationally more efficient, while the latter is expected to be more accurate. In our implementation, we adopt the first option due to its simplicity, and our numerical experiments suggest that it works well empirically. We next construct the plug-in estimators using these refitted parameters. Finally, we use the empirical lower and upper α/2 quantiles of the plug-in estimators to construct the confidence interval under a given significance level α.

Algorithm 1 summarizes our estimation and inference procedure.

3.4. Individual mediation effect in an infinite-horizon setting.

We next derive the expression of the individual mediation effect under the infinite-horizon setting. Unlike the finite-horizon setting, we now require the Markov mediation process At,Mt,Rtt1 to be stationary. This is to ensure the existence of the limit in Definition 3. Correspondingly, the parameters W,𝚯1,𝚯2 in (3) and (4) remain the same across different time stages, which leads to the following relations. For any 1stT, and j=1,,d,

θAsRt=θAs+1Rt+1==θAs+TtRT,θMsjMt=θMs+1jMt+1==θMs+TtjMT,θAsMt=θAs+1Mt+1==θAs+TtMT,θMsjRt=θMs+1jRt+1==θMs+TtjRT.

Based on this observation, we obtain a simplified representation for ηj(T) as

ηj(T)=θM1jR1t=1T(T-t+1)θA1Mtj+t=1T-1θM1jRt+1M1j,,M(t+1)js=1T-t(T-t-s+1)θA1Msj.

By dividing the right-hand side by T and taking the limit T, we obtain the following theorem for identifying the individual mediation effect in infinite-horizon settings. We relegate a more detailed derivation to the Supplementary Material.

Algorithm 1.

Estimation and inference for the finite-horizon setting

Input: Observed data Ait,Mit,Rit:i=1,,n,t=1,,T, the number of bootstrap samples B, and the significance level α.
Output: Individual mediation effect η^j(t), for t=1,,T,j=1,,d and their CIs.
1: Estimate within-stage quantities θ^A1R1,θ^M1jR1,θ^A1M1,θ^M1jM1 and compute η^j(1)=θ^A1M1jθ^M1jR1.
2: for t=2,,T do
3:  Estimate parameters W^t,𝚯^1t,𝚯^2t in models (3) and (4).
4:  Estimate within-stage quantities θ^AtRt,θ^MtjRt,θ^AtMt,θ^MtjMt,
5: for s=1,,t-1 do
6:   Estimate cross-stage quantities (θ^AsRt,θ^MsjRt,θ^AsMt,θ^MsjMt) using (18).
7: end for
8:  Compute η^j(t) using (23).
9: end for
10: for b=1,,B do
11:  Sample n trajectories from the observed data with replacement.
12:  Repeat Lines 1 to 9 to compute η^j(t,b) using the bootstrap samples.
13: end for
14: for t=1,,T do
15:  Construct the CI η^j(t,L),η^j(t,U) for ηj(t), where η^j(t,L) and η^j(t,U) are the empirical lower and upper α/2 quantiles of η^j(t,b)b=1B, respectively.
16: end for

Theorem 2 (Individual mediation effect for infinite-horizon). Suppose Att1 are randomly assigned treatments and satisfy (2), Mt,Rtt1 follow (3) and (4), the Markov process At,Mt,Rtt1 is stationary, and the parameters W,𝚯1,𝚯2 in (3) and (4) are time-invariant. Then

ηj()limTηj(T)T=θM1jR1B1j+1+B2j-1B5j-θM1jR1B4j, (24)

where B1j,B2j,B4j are the j th element of B1,B2,B4, respectively,

B1=1-ζ2I-Γ1-ζ1κ+γ2-11-ζ2δ1+δ2ζ1Rd,(B2B3j)=I-B6-B7-1B7θM1jM1θM1jR1Rd+1,(B4B5j)=I-B6-B7-1B7θM1jM1θM1jR1B1jRd+1,B6=0d×d0dκ0R(d+1)×(d+1)andB7=Γ1ζ1γ2ζ2R(d+1)×(d+1). (25)

As for estimation, based on Theorem 2, we pool the data across all T stages to estimate the model parameters W,𝚯1,𝚯2. Recall that, in the infinite-horizon setting, we require the DAG to be stationary over time. We thus apply DAGMA to the data pooled across all time points to learn this time-invariant DAG. This is different from the finite-horizon setting where the model parameters can differ from one stage to another, while in the infinite-horizon setting, they remain the same. We then estimate the quantities B1 to B7 in (25) by plugging in the estimates of the corresponding model parameters, and we estimate the individual mediation effect using (24). As for inference, we adopt a similar nonparametric bootstrap procedure as in the finite-horizon setting. Algorithm 2 summarizes our estimation and inference procedure.

3.5. Asymptotic theory.

We establish the asymptotic properties of our estimator of the individual mediation effect. We first present a set of regularity conditions.

Assumption 1 (Invertibility). Let Xt1,At,Mt-1,Rt-1,MtR2d+3. There exists some constant C>0, such that λminEXtXtC for any t, where λmin() denotes the minimum eigenvalue of a given matrix.

Algorithm 2.

Estimation for the infinite-horizon setting

Input: Observed data Ait,Mit,Rit:i=1,,n,t=1,,T, the number of bootstrap samples B, and the significance level α.
Output: Estimated individual mediation effect η^j(), for j=1,,d.
1: Pool data across all t stages, t=1,,T.
2: Estimate parameters W^,𝚯^1,𝚯^2 using the pooled data.
3: Estimate θM1jM1 and θM1jR1 using the pooled data.
4: Compute B1 to B7 using (25).
5: Compute η^j() using (24).
6: for b=1,,B do
7:  Sample n trajectories from the observed data with replacement.
8:  Repeat Lines 1 to 5 to compute ηˆj(,b) using the bootstrap samples.
9: end for
10: Construct the CI η^j(,L),η^j(,U) for ηj(), where η^j(,L) and η^j(,U) are the empirical lower and upper α/2 quantiles of η^j(,b)b=1B, respectively.

Assumption 2 (Error residuals). (i) The error terms ϵw1t,ϵw2t,,ϵwdt in (3) are jointly normally distributed and independent, for t=1,,T. In addition, their variances are constant, in that Varϵw1t=Varϵw2t==Varϵwdt. (ii) The error terms ϵrt in (4) satisfy that Eϵrt4<, for t=1,,T.

Assumption 3 (Structure learning consistency). The estimated DAG is a consistent estimator of the true underlying DAG; that is, (i) for the finite-horizon setting, for t=1,,T,P𝒢t^𝒢t0 as n, where 𝒢t is the true DAG in stage t; (ii) for the infinite-horizon setting, P(𝒢^𝒢)0 as T, where 𝒢 is the true time-invariant DAG.

Assumption 4 (Stationarity). For the infinite-horizon setting, the process At,Mt,Rtt1 is a strictly stationary β-mixing process.

We give some remarks about these conditions. Assumption 1 guarantees the identifiability of model parameters in (4). Assumption 2(i) is commonly imposed for identifying DAG structures; see, for example, Peters and Bühlmann (2014), Nandy, Maathuis and Richardson (2017), Yuan et al. (2019), Shi and Li (2022). Assumption 2(ii) requires the fourth moments of the errors to be finite, which is mild. Assumption 3 holds for numerous DAG estimation algorithms, including the one by Bello, Aragam and Ravikumar (2022) that we use in our implementation. Assumption 4 is required for the infinite-horizon setting only, and the β-mixing condition is again commonly imposed; see, for example, Bradley (2005). Overall, these regularity conditions are reasonable.

We next establish the asymptotic normality of our individual mediation effect estimator for both the finite-horizon and infinite-horizon settings.

Theorem 3 (Asymptotic distribution for finite-horizon). Suppose Assumptions 2 and 3(i) hold. Then, for t=1,,T,

nη^j(t)-ηj(t)d𝒩0,σtj2asn,

where σtj2 denotes the asymptotic variance of η^j(t). Its form is given in the Supplementary Material, and it can be consistently estimated via the bootstrap method.

Theorem 4 (Asymptotic distribution for infinite-horizon). Suppose Assumptions 2, 3(ii) and 4 hold. Then

nTη^j()-ηj()d𝒩0,σj2asnT,

where σj2 denotes the asymptotic variance of η^j(). Its definition is given in the Supplementary Material, and it can be consistently estimated using the bootstrap method.

We briefly remark that Theorem 3 requires the number of realizations n of (At,Mt,Rt) to diverge to infinity for every t=1,,T, with T being finite. Meanwhile, Theorem 4 requires either n or the number of time points T or both to diverge to infinity.

4. Simulations.

In this section, we investigate the empirical performance of our proposed method through intensive simulations. We also compare with some baseline methods.

4.1. Simulation setup.

We generate n copies of random samples At,Mt,Rtt=1T following models (3) and (4), that is,

Mt=I-W-1ϵwt+α1t+δ1tAt+𝚪1tMt-1+ζ1tRt-1,Rt=α2t+δ2tAt+γ2tMt-1+ζ2tRt-1+κtMt+ϵrt.

We generate the sequence of treatments At~i.i.d.Bernoulli(0.5), t=1,,T, and the error terms ϵwt and ϵrt from a standard normal distribution. Let 𝚯1t=α1t,δ1t,𝚪1t,ζ1tR(d+3)×d and 𝚯2t=α2t,δ2t,ζ2t,γ2t,κtR(2d+3) collect the model parameters, and we generate the entries of 𝚯1t,𝚯2t from a uniform distribution on (−0.5, 0.5). For the finite-horizon setting, we generate different 𝚯1t,𝚯2t for different time points t, whereas for the infinite-horizon setting, we only generate one copy of 𝚯1t,𝚯2t, and keep them fixed across all time points. We fix d=3, and generate the matrix WR3×3 in two steps. We first begin with a zero matrix, then replace every entry (W)ij,i<j, by the product of two random variables Eij(1)×Eij(2), where Eij(1) is a Bernoulli variable with probability 0.9, indicating a random directed edge is added from mediator Mi to Mj, and Eij(2) is the edge weight, which is randomly drawn from a uniform distribution on [-0.9,-0.5][0.5,0.9]. Following this generation process, we obtain W=0-0.800.6100-0.82000. We set the initial values of mediators and outcome all equal to 0.

We recognize that there is no existing solution in the literature for this problem. Instead, we compare with two baseline solutions. One method is termed “independent time points,” which ignores all temporal dependence across different time points. That is, it estimates the individual mediation effect at every single time stage with stage-specific data, without taking into account the dependence to prior stages nor the carryover effects. The other method is termed “independent mediators,” which ignores all dependence among the multivariate mediators, and essentially treats W as a zero matrix. We evaluate all estimation methods using three criteria: the estimation bias, the empirical standard error (SE) and the coverage probability (CP). For inference, we set the number of bootstrapped samples to be 500 and the significance level α to be 0.05. We employ DAGMA with linear models for structural learning, and the corresponding hyperparameters, w_threshold and lambda1, are set to 0.1 and 0.0, respectively.

4.2. Finite-horizon setting.

For the finite-horizon setting, we consider the number of time points T{10,20,30} and the sample size n{100,250,500}. Note that the true individual mediation effect cannot be derived analytically in our setting, and is computed numerically based on 10 million Monte Carlo samples. Table 1 reports the results based on 500 replications. We observe that, when the number of subjects n increases, the estimation bias and standard error both decrease for our proposed method, which agrees with our theory. Moreover, our method achieves the desired coverage probability across all scenarios. The same is not true for the two baseline methods. For instance, for the independent mediators method, the estimation bias of η2(T) and η3(T) does not decrease. This is because Mt1 is in the parent set of Mt2 and Mt3 for all t=1,,T, and ignoring the effects along the paths Mt1Mt2 and Mt1Mt3 lead to a larger bias and invalid coverage probability in estimating η2(T) and η3(T). On the contrary, the estimation bias of η1(T) is much smaller, since the parent set of Mt1 is empty given (Mt-1,Rt,At) in our simulation example.

Table 1.

Simulations for the finite-horizon setting: the bias, the empirical standard error (SE) and the coverage probability (CP) between the estimated and true individual mediator effects with varying number of time points T and number of subjects n

n 100 250 500
Method T Param Bias SE CP Bias SE CP Bias SE CP
Proposed method 10 η1T 0.000 0.594 0.972 0.003 0.351 0.966 0.008 0.249 0.960
η2T −0.016 0.533 0.960 −0.036 0.283 0.970 −0.006 0.209 0.952
η3T 0.007 0.696 0.964 0.023 0.420 0.962 0.011 0.312 0.950
20 η1T −0.046 1.960 0.950 0.008 1.215 0.946 −0.023 0.840 0.950
η2T −0.037 1.134 0.970 −0.018 0.717 0.944 −0.021 0.490 0.948
η3T 0.027 1.236 0.956 0.012 0.721 0.954 −0.003 0.491 0.972
30 η1T 0.044 2.655 0.948 −0.078 1.691 0.938 0.055 1.159 0.940
η2T −0.067 1.610 0.962 −0.002 0.915 0.964 −0.020 0.651 0.954
η3T −0.067 1.838 0.958 −0.055 1.122 0.960 0.051 0.783 0.946
Independent time points 10 η1T −0.577 0.373 0.712 −0.558 0.204 0.370 −0.569 0.131 0.132
η2T 0.199 0.759 0.962 0.171 0.447 0.926 0.175 0.308 0.888
η3T −0.768 1.472 0.896 −0.762 0.861 0.866 −0.716 0.656 0.806
20 η1T 0.823 1.301 0.882 0.844 0.665 0.724 0.852 0.441 0.580
η2T 6.158 4.075 0.636 6.071 2.479 0.286 6.075 1.797 0.066
η3T 0.694 3.095 0.952 0.665 1.804 0.936 0.683 1.315 0.914
30 η1T 1.662 1.491 0.854 1.626 0.831 0.598 1.607 0.530 0.370
η2T −10.111 6.992 0.700 −9.898 4.801 0.410 −9.989 3.207 0.126
η3T −2.352 1.880 0.860 −2.446 1.081 0.374 −2.392 0.715 0.144
Independent mediators 10 η1T 0.000 0.594 0.972 0.003 0.351 0.954 0.008 0.249 0.964
η2T −0.139 0.640 0.944 −0.175 0.342 0.944 −0.142 0.263 0.904
η3T 0.164 0.603 0.942 0.178 0.368 0.938 0.172 0.276 0.892
20 η1T −0.045 1.959 0.948 0.008 1.215 0.950 −0.023 0.840 0.952
η2T −0.159 1.370 0.956 −0.135 0.814 0.950 −0.157 0.576 0.930
η3T −0.764 1.390 0.926 −0.728 0.830 0.882 −0.779 0.602 0.772
30 η1T 0.044 2.656 0.946 −0.078 1.691 0.932 0.055 1.159 0.948
η2T −1.286 2.087 0.922 −1.154 1.114 0.872 −1.227 0.864 0.692
η3T −0.741 2.128 0.934 −0.724 1.279 0.892 −0.632 0.920 0.884

4.3. Infinite-horizon setting.

For the infinite-horizon setting, we consider the number of time points T{100,250,500} and the sample size n{20,50,100}. Again, the true individual mediation effect cannot be derived analytically in our setting, and is computed numerically based on 10 million Monte Carlo samples with 3000 time points. We also drop the first five steps as a warm up to mitigate the potential influence of the initial conditions. Table 2 reports the results based on 500 data replications. We again observe that the estimation bias and standard error both decrease for our method as n increases, and the desired coverage probability is achieved, across all scenarios. On the other hand, the bias increases sharply for the independent time points method, because ignoring the carryover effects becomes exaggerated with a large T. Moreover, the estimation bias of the independent mediators method is much larger than the proposed method for η2() and η3(). Both baseline methods fail to achieve the desired coverage probability in most cases, except for the independent mediators method with η1(). This is due to the specific simulation setting with an empty parent set given the history. In general, these results demonstrate the importance of taking into account both the dependence among multiple time points and among multiple mediators.

Table 2.

Simulations for the infinite-horizon setting: the bias, the empirical standard error (SE) and the coverage probability (CP) between the estimated and true individual mediator effects with varying number of time points T and number of subjects n

n 20 50 100
Method T Param Bias SE CP Bias SE CP Bias SE CP
Proposed method 100 η1 0.002 0.070 0.918 0.002 0.046 0.928 0.001 0.029 0.934
η2 0.003 0.045 0.924 0.001 0.029 0.932 0.001 0.020 0.940
η3 0.003 0.036 0.924 0.002 0.021 0.946 0.000 0.015 0.946
250 η1 −0.001 0.042 0.932 −0.002 0.026 0.946 −0.001 0.019 0.930
η2 −0.003 0.029 0.914 −0.001 0.019 0.938 0.001 0.012 0.958
η3 0.001 0.020 0.938 0.000 0.014 0.938 −0.001 0.010 0.950
500 η1 0.000 0.029 0.944 0.000 0.018 0.956 −0.001 0.014 0.932
η2 0.000 0.020 0.928 −0.001 0.012 0.954 0.000 0.009 0.942
η3 0.000 0.016 0.924 −0.001 0.010 0.932 0.000 0.007 0.928
Independent time points 100 η1 0.371 0.047 0.000 0.370 0.030 0.000 0.371 0.021 0.000
η2 −0.065 0.076 0.818 −0.070 0.049 0.658 −0.071 0.034 0.404
η3 0.132 0.086 0.628 0.133 0.060 0.314 0.132 0.040 0.076
250 η1 0.372 0.027 0.000 0.371 0.018 0.000 0.371 0.013 0.000
η2 −0.075 0.048 0.616 −0.073 0.030 0.300 −0.073 0.020 0.052
η3 0.134 0.055 0.286 0.135 0.034 0.028 0.133 0.024 0.000
500 η1 0.370 0.021 0.000 0.371 0.013 0.000 0.371 0.010 0.000
η2 −0.073 0.035 0.368 −0.074 0.021 0.058 −0.073 0.015 0.002
η3 0.131 0.039 0.074 0.131 0.024 0.000 0.134 0.018 0.000
Independent mediators 100 η1 0.002 0.070 0.918 0.002 0.046 0.934 0.001 0.029 0.936
η2 0.322 0.031 0.000 0.324 0.019 0.000 0.325 0.015 0.000
η3 −0.264 0.038 0.000 −0.266 0.024 0.000 −0.265 0.016 0.000
250 η1 −0.001 0.042 0.934 −0.002 0.026 0.934 −0.001 0.019 0.942
η2 0.324 0.019 0.000 0.324 0.012 0.000 0.325 0.009 0.000
η3 −0.265 0.024 0.000 −0.265 0.014 0.000 −0.265 0.010 0.000
500 η1 0.000 0.029 0.936 0.000 0.018 0.952 −0.001 0.014 0.936
η2 0.324 0.014 0.000 0.325 0.009 0.000 0.324 0.006 0.000
η3 −0.265 0.017 0.000 −0.265 0.011 0.000 −0.265 0.007 0.000

5. Data application.

In this section, we revisit the motivating Intern Health Study (NeCamp et al. (2020)). The IHS is a 26-week sequentially randomized trial with the objective of understanding the biological mechanisms of depression, and the ultimate goal of improving the mental health outcomes of medical interns in the United States. The study developed and deployed a mobile app to deliver prompt notifications, such as reminders to have a break, take a walk or prioritize sleep, which aims to improve the well-being of interns who often work under stressful environments. In each week, each intern was randomized into receiving the notifications or not. Meanwhile, wearable devices (Fitbit) recorded daily measurements of step count (Step), sleep duration (Sleep, minutes), resting heart rate (RHR, beats per minute) and heart rate variability (HRV, milliseconds). Interns also self-reported a daily mood score in the app (Shaffer and Ginsberg (2017)). We formulate the problem in the framework of multivariate dynamic mediation analysis, with the binary status of receiving the notification or not as the treatment, the transformed measurements, that is, the cubic-root of step count, the square-root of sleep duration, RHR and HRV as d=4 potential mediators and the mood score as the outcome. We average all the measurements within each week, resulting in T=26 weeks of data, for n=1196 interns undergoing the sequential randomization.

We apply our method to this data adopting the finite-horizon setting. This is partly because we have a relatively limited number of time points T=26 in this study, and partly because the data is likely to be nonstationary over time (NeCamp et al. (2020), Li et al. (2022), Wang, Shi and Wu (2023)). Our analysis, as shown in Figure 4, also confirms that the individual mediation effect varies over time. Figure 3(a) shows the estimated DAG structure among the four mediators, while Figures 3(b) and (c) show the estimated individual mediation effects over time, along with the associated 95% confidence intervals, that are smoothed with a natural cubic spline and further decomposed as the immediate and delayed effects.

Fig. 4.

Fig. 4.

Analysis of IHS mobile health data: the estimated effects from the treatment to the four individual mediators, decomposed as the immediate (first row) and delayed (second row) effects, respectively.

Fig. 3.

Fig. 3.

Analysis of IHS mobile health data: (a) the estimated DAG among the four mediators, dashed/solid arrows represent negative/positive effects; (b) the estimated immediate individual mediation effects over time; (c) the estimated delayed individual mediation effects over time. The shaded area indicates the 95% confidence interval.

We make a number of observations. First of all, we see from Figure 3(a) that, the four mediators have complex relationships between each other, indicating the importance of accounting for the dependence structure among the mediators. Second, we see from Figure 3(b) and (c) that the magnitude of the delayed effects is generally greater than that of the immediate effects, indicating the importance of accounting for the carryover effects in our understanding of the effects of push notification to intern’s mood. Third, most individual mediation effects are insignificant. This could potentially be attributed to the relatively weak treatment effect, as also noted by NeCamp et al. (2020). Fourth, there is a significantly negative carryover effect from the push notification to mood score mediated by the RHR around week 10. Meanwhile, this carryover effect is predominantly negative across most weeks. To illustrate this effect, Figure 4 further plots the smoothed estimated effects from the treatment to the four individual mediators, decomposed as the immediate and delayed effects, respectively. We see that the push notification leads to an increased RHR after week five, suggesting that the push notification can lead to a lower mood score by increasing the RHR. This agrees with our prior knowledge that an increased RHR usually indicates a more tired and stressful state, thus a worse mood. Finally, the carryover effect from the push notification to sleep duration is mostly negative, and is nearly significant between weeks 15 and 20. As seen in Figure 4, the push notification generally results in reduced sleep hours, aligning with our knowledge that fewer sleep hours lead to poorer mood, too.

6. Conclusion and discussion.

In this section, we discuss the relation between our individual mediation effect and the Granger causality, numerous other mediation effects that may be of potential interest and some additional extensions.

6.1. Connection to Granger causality.

The Granger causality is a concept that leverages the temporal ordering inherent to time series so to draw causal statements restricted to the “past” causing the “future” (Granger (1969)). A variable is said to Granger-cause the other, if including this variable’s past values provides valuable information for forecasting the other variable’s future behavior. The proposed models in (3) and (4) are mathematically similar to those under the Granger causality framework, since Rt may be predicted by its past value Rt-1,Mt and Mt-1 and Mt also depends on its past value Mt-1 and Rt-1.

However, our notion of individual mediation effect differs from the concept of Granger causality, in that a mediator’s individual mediation effect and its ability to Granger-cause the outcome is not equivalent. On the one hand, a mediator can have a zero individual mediation effect, but still Granger-causes the outcome, if it is not influenced by the treatment. Figure 5, Case 1, gives an illustrative example. In this case, we have a single mediator that impacts the outcome at each time point, thereby Granger-causing the outcome. However, since the mediator is unaffected by the treatment, there is no direct causal pathway from the treatment through the mediator to the outcome, resulting in a zero individual mediation effect. On the other hand, a mediator with a nonzero individual mediation effect might not necessarily Granger-cause the outcome, if it does not improve the forecast accuracy of the outcome beyond other mediators. Figure 5, Case 2, gives another example. In this case, the first set of mediators M11 and M21 directly influence the outcome, thus Granger-causing the outcome. The second mediator M12, however, affects the outcome indirectly through its influence on the first mediator M21, resulting in a nonzero individual mediation effect. Despite this, M12 does not Granger-cause the outcome R1 or R2, as its influence is mediated indirectly.

Fig. 5.

Fig. 5.

An illustration of the difference between the individual mediation effect and the Granger causality.

6.2. Sequential mediation effect.

As discussed in Section 2.3, the individual mediation effect ηj(T) measures the cumulative effect mediated through the j th mediator Mj across all the upstream mediators and all T time points. Meanwhile, it may be of separate interest to analyze the portion of the individual mediation effect of Mj that is attributed to its upstream mediator Mk. We denote this effect as ηkj, and call it the sequential mediation effect, as it quantifies the effect that is sequentially transmitted from the treatment, through the kth mediator, to the j th mediator, then to the outcome.

We next formally define the sequential mediation effect. Toward that end, we require the DAG structure to remain stationary over time. That is, if the kth mediator is an ancestor of the j th mediator at any time t, that is, there exists a direct path from Mtk to Mtj, then the same relation holds at all time points. For the finite-horizon setting, we define the sequential mediation effect over T time points as

ηkj(T)=t=1TaERtdoAs=a,st-aERtdoAs=a,Msj=m,st-aERtdoAs=a,Msk=m,st+aERtdoAs=a,Msj=Mkj=m,st,

if the kth mediator is an ancestor of the j th mediator, and set ηkj(T)=0 otherwise. In this definition, the first term corresponds to the total treatment effect, the second and third terms measure the effects that do not go through the j th or the kth mediator, respectively, and the last term quantifies the effect that does not simultaneously pass both the j th and kth mediators. Then, by the principle of inclusion-exclusion, ηkj(T) measures the desired sequential mediation effect. For the infinite-horizon setting, we define ηkj()=limTηkj(T)/T, provided the limit exists.

To further illustrate this definition, we revisit the examples in Figure 2. For the single-stage example in Figure 2, left panel, the mediator M12 is a child of M11 and is affected by M11. Its individual mediation effect that passes through M11 is

η12(1)=aER1doA1=a-aER1doA1=a,M12=m
-aER1doA1=a,M11=m+aER1doA1=a,M11=M12=m
=θA1R1-θA1R1M12-θA1R1M11+θA1R1M11,M12
=θA1M11θM11M12θM12R1.

It is clear to see that the term θA1M11θM11M12θM12R1 corresponds to the effect along the path A1M11M12R1, which coincides with the results from the path analysis. Similarly, for the two-stage example in Figure 2, right panel, we have that

η12(2)=η12(1)+aER2doA1=A2=a-aER2doA1=A2=a,M11=M21=m-aER2doA1=A2=a,M12=M22=m+aER2doA1=A2=a,M11=M21=M12=M22=m=η12(1)+θA1,A2R2-θA1,A2R2M11,M21-θA1,A2R2M12,M22+θA1,A2R2M11,M12,M21,M22=η12(1)+θA1R2-θA1R2M11,M21-θA1R2M12,M22+θA1R2M11,M21,M12,M22+θA2R2-θA2R2M21-θA2R2M22+θA2R2M21,M22,

where the terms in the last two lines of the above equation can be calculated recursively with the formulas in equations (21) and (22), allowing for the estimation and inference of the sequential mediation effect.

Finally, we extend beyond the above illustrative examples to outline the estimation and inference procedure for the sequential mediation effect under a general setting involving d mediators across T time points. As for estimation, we begin by applying an existing structural learning algorithm to the observed data to learn the DAG structure. From the estimated DAG, if the kth mediator is not an ancestor of the j th mediator, we set the estimated sequential effect to zero. Otherwise, we obtain the estimated η^kj through the quantities θA1,,AtRt,θA1,,AtRtM1j,,Mtj, and θA1,,AtRtM1k,M1j,,Mkj,Mtj, which in turn can be recursively updated following the method developed in Section 3. As for inference, we again apply the bootstrap approach in Section 3 to quantify the uncertainty of this plug-in estimator η^kj.

6.3. Direct, indirect and conditional effects.

We discuss the direct effect DE and indirect effect IE in Section 2.2. We now briefly discuss their estimation and inference, which may be of separate interest. Recall DE in (6) under linear SEMs. It satisfies a recursive equation,

DE(t)=DE(t-1)ζ2t+δ2t,

for t=2,,T, with DE(1)=δ21. Here, we add the superscript (t) to DE to indicate the direct effect across t time points. This recursive formulation allows us to employ a similar plug-in method as in Section 3 to estimate DE, as well as a similar bootstrap approach for inference. To estimate IE, we first compute the total effect as a byproduct of the proposed procedure in Section 3. We then estimate IE as the difference between the estimated total effect and DE. Again, we can employ the bootstrap approach to infer IE.

Our definition of the individual mediation effect is concerned with the marginal effect,

aERtdoAt=a-aERtdoAt=a,Mtj=m,

which marginalizes over the history As,Ms,Rs for all s<t. This marginalization is appropriate because our interventions on the treatment and mediator at time t do not causally influence those historical variables. Henceforth, the distribution of those historical variables remains unchanged before and after the intervention. Meanwhile, it may be of separate interest to study the conditional effect,

aERtdoAt=a,As,Ms,Rs,s<t-aERtdoAt=a,Mtj=m,As,Ms,Rs,s<t,

given the history. Nevertheless, we note that, under the linear structural model, the conditional effect is equivalent to the marginal effect that we target in this article. We next sketch a few lines to show the equivalence. Specifically, the first term is aERtdoAt=a)]=θAtRt=βAt,RtAs,Ms,Rs,s<t in our current definition. It is the partial coefficient of At by linearly regressing Rt on At given the historical variables that could affect the distribution of At. Under the linear model structures (3) and (4), the effects of At and the historical variables on Rt are additive. Consequently, the resulting conditional effect aERtdoAt=a,As,Ms,Rs,s<t=βAt,RtAs,Ms,Rs,s<t remains the same as the marginal effect, regardless of the values of the historical variables. The second term is aERtdoAt=a,Mtj=m=θAtRtMtj=θAtRt-θAtMtjθMtjRt. Again, the value θAtRt remains the same whether or not conditioning on the historical variables. Similarly, under (3) and (4), the effects of Mtj and the historical variables on Rt are additive. Consequently, the value of the product θAtMtjθMtjRt remains the same, regardless of whether the history is included in the conditioning set or not.

6.4. Extension to varying T and time lags.

Finally, we remark that our method can be adapted to accommodate the setting when the number of time points T varies among subjects, and when the time lags between two time points differ.

For the finite-horizon setting, T can be different for different subjects, because the model parameters and intermediate quantities at any given time t are estimated by pooling the data across subjects who have observations available at that time point. Besides, Theorem 3 remains valid when T varies across subjects, provided that the sample size at each time point is sufficiently large. Meanwhile, for the time lag between two time points, we require it to follow the same distribution across all subjects, but it does not need to follow the same distribution across all time points, since we allow the data generating process to be nonstationary over time.

For the infinite-horizon setting, T again can be different, because the data are pooled across both subjects and time points. Similarly, Theorem 4 remains valid when T varies across subjects, provided that the total sample size is sufficiently large. Meanwhile, the time lag between two time points needs to follow the same distribution, due to the requirement for stationarity for the infinite-horizon setting. However, this requirement does not extend to between subjects, and the distributions can vary among different subjects. In that case, we can use each subject’s own data to estimate their subject-specific mediation effects.

Supplementary Material

supplementary material

Supplement to “Multivariate dynamic mediation analysis under a reinforcement learning framework” (DOI: 10.1214/24-AOS2475SUPP; .pdf). The supplement provides the proofs of the main theorems in the paper.

Acknowledgments.

Lan Luo, Chengchun Shi and Jitao Wang contributed equally. The authors are grateful for the contributions of the researchers, administrators and participants involved in the Intern Health Study (https://clinicaltrials.gov/study/NCT03972293). The authors also thank the Editor, Associate Editor and reviewers for their comments, which have led to substantial improvements of the manuscript.

Funding.

Luo’s research was partly supported by NIH Grant R21AG083364.

Shi’s research was supported in part by the EPSRC Grant EP/W014971/1.

Wu’s work was partly supported by NIH Grants R01 MH101459 and R01 NR013658.

Li’s research was partially supported by NSF Grant CIF-2102227, and NIH Grants R01AG062542 and R01AG080043.

REFERENCES

  1. Baron RM and Kenny DA (1986). The moderator-mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. J. Pers. Soc. Psychol 51 1173–1182. 10.1037//0022-3514.51.6.1173 [DOI] [PubMed] [Google Scholar]
  2. Bello K, Aragam B and Ravikumar P (2022). DAGMA: Learning DAGs via M-matrices and a log-determinant acyclicity characterization. arXiv preprint. Available at arXiv:2209.08037. [Google Scholar]
  3. Bi X, Yang L, Li T, Wang B, Zhu H and Zhang H (2017). Genome-wide mediation analysis of psychiatric and cognitive traits through imaging phenotypes. Hum. Brain Mapp 38 4088–4097. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Boca SM, Sinha R, Cross AJ, Moore SC and Sampson JN (2014). Testing multiple biological mediators simultaneously. Bioinformatics 30 214–220. 10.1093/bioinformatics/btt633 [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Bradley RC (2005). Basic properties of strong mixing conditions. A survey and some open questions. Probab. Surv 2 107–144. Update of, and a supplement to, the 1986 original MR2178042 10.1214/154957805100000104 [DOI] [Google Scholar]
  6. CAI H, Song R and Lu W (2021). ANOCE: Analysis of causal effects with multiple mediators via constrained structural learning. In International Conference on Learning Representations. [Google Scholar]
  7. Cai X, Coffman DL, Piper ME and Li R (2022). Estimation and inference for the mediation effect in a time-varying mediation model. BMC Med. Res. Methodol 22 113. [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Celli V (2022). Causal mediation analysis in economics: Objectives, assumptions, models. J. Econ. Surv 36 214–234. [Google Scholar]
  9. Chakrabortty A, Nandy P and Li H (2018). Inference for individual mediation effects and interventional effects in sparse high-dimensional causal graphical models. arXiv preprint. Available at arXiv:1809.10652. [Google Scholar]
  10. Díaz I, Williams N and Rudolph KE (2023). Efficient and flexible mediation analysis with time-varying mediators, treatments, and confounders. J. Causal Inference 11 Paper No. 20220077, 17. MR4610658 10.1515/jci-2022-0077 [DOI] [Google Scholar]
  11. Djordjilović V, Hemerik J and Thoresen M (2022). On optimal two-stage testing of multiple mediators. Biom. J 64 1090–1108. MR4476372 10.1002/bimj.202100190 [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Efron B (1979). Bootstrap methods: Another look at the jackknife. Ann. Statist 7 1–26. MR0515681 [Google Scholar]
  13. Ge L, Wang J, Shi C, Wu Z and Song R (2023). A reinforcement learning framework for dynamic mediation analysis. arXiv preprint. Available at arXiv:2301.13348. [Google Scholar]
  14. Granger CW (1969). Investigating causal relations by econometric models and cross-spectral methods. Econometrica 424–438. [Google Scholar]
  15. Guo X, Li R, Liu J and Zeng M (2023). Statistical inference for linear mediation models with high-dimensional mediators and application to studying stock reaction to COVID-19 pandemic. J. Econometrics 235 166–179. MR4580425 10.1016/j.jeconom.2022.03.001 [DOI] [Google Scholar]
  16. Hao B, Ji X, Duan Y, Lu H, Szepesvari C and Wang M (2021). Bootstrapping fitted q-evaluation for off-policy inference. In International Conference on Machine Learning 4074–4084. PMLR. [Google Scholar]
  17. Hejazi NS, Rudolph KE, van der Laan MJ and Díaz I (2023). Nonparametric causal mediation analysis for stochastic interventional (in)direct effects. Biostatistics 24 686–707. MR4615248 10.1093/biostatistics/kxac002 [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Hu Y and Wager S (2022). Switchback experiments under geometric mixing. arXiv preprint. Available at arXiv:2209.00197. [Google Scholar]
  19. Huang J and Yuan Y (2017). Bayesian dynamic mediation analysis. Psychol. Methods 22 667–686. [DOI] [PubMed] [Google Scholar]
  20. Huang Y-T and Pan W-C (2016). Hypothesis test of mediation effect in causal mediation model with high-dimensional continuous mediators. Biometrics 72 402–413. MR3515767 10.1111/biom.12421 [DOI] [PubMed] [Google Scholar]
  21. Hyvärinen A, Zhang K, Shimizu S and Hoyer PO (2010). Estimation of a structural vector autoregression model using non-Gaussianity. J. Mach. Learn. Res 11 1709–1731. MR2653353 [Google Scholar]
  22. Kallus N and Uehara M (2022). Efficiently breaking the curse of horizon in off-policy evaluation with double reinforcement learning. Oper. Res 70 3282–3302. MR4538517 [Google Scholar]
  23. Kaufman JS and Kaufman S (2001). Assessment of structured socioeconomic effects on health. Epidemiology 12 157–167. 10.1097/00001648-200103000-00006 [DOI] [PubMed] [Google Scholar]
  24. Li M, Shi C, Wu Z and Fryzlewicz P (2022). Testing stationarity and change point detection in reinforcement learning. arXiv preprint. Available at arXiv:2203.01707. [Google Scholar]
  25. Liao P, Klasnja P and Murphy S (2021). Off-policy estimation of long-term average outcomes with applications to mobile health. J. Amer. Statist. Assoc 116 382–391. MR4227701 10.1080/01621459.2020.1807993 [DOI] [Google Scholar]
  26. Liao P, Qi Z, Wan R, Klasnja P and Murphy SA (2022). Batch policy learning in average reward Markov decision processes. Ann. Statist 50 3364–3387. MR4524500 10.1214/22-aos2231 [DOI] [Google Scholar]
  27. Lin S-H, Young JG, Logan R and VanderWeele TJ (2017). Mediation analysis for a survival outcome with time-varying exposures, mediators, and confounders. Stat. Med 36 4153–4166. MR3713656 10.1002/sim.7426 [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Liu W, Tu J, Zhang Y and Chen X (2023). Online Estimation and Inference for Robust Policy Evaluation in Reinforcement Learning. arXiv preprint. Available at arXiv:2310.02581. [Google Scholar]
  29. Luckett DJ, Laber EB, Kahkoska AR, Maahs DM, Mayer-Davis E and Kosorok MR (2020). Estimating dynamic treatment regimes in mobile health using V-learning. J. Amer. Statist. Assoc 115 692–706. MR4107673 10.1080/01621459.2018.1537919 [DOI] [Google Scholar]
  30. Luo L, Shi C, Wang J, Wu Z and Li L (2025). Supplement to “Multivariate Dynamic Mediation Analysis under a Reinforcement Learning Framework.” 10.1214/24-AOS2475SUPP [DOI] [Google Scholar]
  31. Maathuis MH, Kalisch M and Bühlmann P (2009). Estimating high-dimensional intervention effects from observational data. Ann. Statist 37 3133–3164. MR2549555 10.1214/09-AOS685 [DOI] [Google Scholar]
  32. MacKinnon DP (2008). Introduction to Statistical Mediation Analysis. Taylor & Francis, London. [Google Scholar]
  33. Malinsky D and Spirtes P (2018). Causal structure learning from multivariate time series in settings with unmeasured confounding. In Proceedings of 2018 ACM SIGKDD Workshop on Causal Discovery 23–47. PMLR. [Google Scholar]
  34. Mnih V, Kavukcuoglu K, Silver D, Rusu AA, Veness J, Bellemare MG, Graves A, Riedmiller M, Fidjeland AK et al. (2015). Human-level control through deep reinforcement learning. Nature 518 529–533. [DOI] [PubMed] [Google Scholar]
  35. Murphy SA (2003). Optimal dynamic treatment regimes. J. R. Stat. Soc. Ser. B. Stat. Methodol 65 331–355. MR1983752 10.1111/1467-9868.00389 [DOI] [Google Scholar]
  36. Nandy P, Maathuis MH and Richardson TS (2017). Estimating the effect of joint interventions from observational data in sparse high-dimensional settings. Ann. Statist 45 647–674. MR3650396 10.1214/16-AOS1462 [DOI] [Google Scholar]
  37. NeCamp T, Sen S, Frank E, Walton MA, Ionides EL, Fang Y, Tewari A and Wu Z (2020). Assessing real-time moderation for developing adaptive mobile health interventions for medical interns: Microrandomized trial. J. Med. Internet Res 22 e15033. [DOI] [PMC free article] [PubMed] [Google Scholar]
  38. Pamfil R, Sriwattanaworachai N, Desai S, Pilgerstorfer P, Georgatzis K, Beaumont P and Aragam B (2020). Dynotears: Structure learning from time-series data. In International Conference on Artificial Intelligence and Statistics 1595–1605. PMLR. [Google Scholar]
  39. Pearl J (2000). Causality: Models, Reasoning, and Inference. Cambridge Univ. Press, Cambridge. MR1744773 [Google Scholar]
  40. Pearl J (2012). The causal mediation formula—a guide to the assessment of pathways and mechanisms. Prev. Sci 13 426–436. [DOI] [PubMed] [Google Scholar]
  41. Peters J and Bühlmann P (2014). Identifiability of Gaussian structural equation models with equal error variances. Biometrika 101 219–228. MR3180667 10.1093/biomet/ast043 [DOI] [Google Scholar]
  42. Preacher KJ (2015). Advances in mediation analysis: A survey and synthesis of new developments. Annu. Rev. Psychol 66 825–852. 10.1146/annurev-psych-010814-015258 [DOI] [PubMed] [Google Scholar]
  43. Puterman ML (1994). Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley Series in Probability and Mathematical Statistics: Applied Probability and Statistics. Wiley, New York. A Wiley-Interscience Publication. MR1270015 [Google Scholar]
  44. QIN ZT, ZHU H and Ye J (2021). Reinforcement learning for ridesharing: A survey. In 2021 IEEE International Intelligent Transportation Systems Conference (ITSC) 2447–2454. IEEE Press, New York. [Google Scholar]
  45. Ramprasad P, Li Y, Yang Z, Wang Z, Sun WW and Cheng G (2023). Online bootstrap inference for policy evaluation in reinforcement learning. J. Amer. Statist. Assoc 118 2901–2914. MR4681629 10.1080/01621459.2022.2096620 [DOI] [Google Scholar]
  46. Rucker DD, Preacher KJ, Tormala ZL and Petty RE (2011). Mediation analysis in social psychology: Current practices and new recommendations. Soc. Pers. Psychol. Compass 5 359–371. [Google Scholar]
  47. Sampson JN, Boca SM, Moore SC and Heller R (2018). FWER and FDR control when testing multiple mediators. Bioinformatics 34 2418–2424. 10.1093/bioinformatics/bty064 [DOI] [PMC free article] [PubMed] [Google Scholar]
  48. Selig JP and Preacher KJ (2009). Mediation models for longitudinal data in developmental research. Res. Hum. Dev 6 144–164. [Google Scholar]
  49. Shaffer F and Ginsberg JP (2017). An overview of heart rate variability metrics and norms. Front. Public Health 5 258. 10.3389/fpubh.2017.00258 [DOI] [PMC free article] [PubMed] [Google Scholar]
  50. SHI C and LI L. (2022). Testing mediation effects using logic of Boolean matrices. J. Amer. Statist. Assoc 117 2014–2027. MR4528486 10.1080/01621459.2021.1895177 [DOI] [Google Scholar]
  51. Shi C, Zhang S, Lu W and Song R (2022). Statistical inference of the value function for reinforcement learning in infinite-horizon settings. J. R. Stat. Soc. Ser. B. Stat. Methodol 84 765–793. MR4460575 [Google Scholar]
  52. Shuai K, Liu L, He Y and Li W (2023). Mediation pathway selection with unmeasured mediator-outcome confounding. arXiv preprint. Available at arXiv:2311.16793. [Google Scholar]
  53. Silver D, Schrittwieser J, Simonyan K, Antonoglou I, Huang A, Guez A, Hubert T, BAKER L, LAI M et al. (2017). Mastering the game of go without human knowledge. Nature 550 354–359. [DOI] [PubMed] [Google Scholar]
  54. Sutton RS and Barto AG (2018). Reinforcement Learning: An Introduction, 2nd ed. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA. MR3889951 [Google Scholar]
  55. VanderWeele TJ (2016). Mediation analysis: A practitioner’s guide. Annu. Rev. Public Health 37 17–32. 10.1146/annurev-publhealth-032315-021402 [DOI] [PubMed] [Google Scholar]
  56. VanderWeele TJ and Tchetgen Tchetgen EJ (2017). Mediation analysis with time varying exposures and mediators. J. R. Stat. Soc. Ser. B. Stat. Methodol 79 917–938. MR3641414 10.1111/rssb.12194 [DOI] [Google Scholar]
  57. Wang J, QI Z and Wong RKW (2023). Projected state-action balancing weights for offline reinforcement learning. Ann. Statist 51 1639–1665. MR4658571 10.1214/23-aos2302 [DOI] [Google Scholar]
  58. Wang J, Shi C and Wu Z (2023). A robust test for the stationarity assumption in sequential decision making. In International Conference on Machine Learning 36355–36379. PMLR. [Google Scholar]
  59. Wei H, Cai H, Shi C and Song R (2024). On efficient inference of causal effects with multiple mediators. arXiv preprint. Available at arXiv:2401.05517. [Google Scholar]
  60. Wright S (1921). Correlation and causation. J. Agric. Res 20 557–585. [Google Scholar]
  61. Yuan Y and Qu A (2024). De-confounding causal inference using latent multiple-mediator pathways. J. Amer. Statist. Assoc 119 2051–2065. MR4797922 10.1080/01621459.2023.2240461 [DOI] [Google Scholar]
  62. Yuan Y, Shen X, Pan W and Wang Z (2019). Constrained likelihood for reconstructing a directed acyclic Gaussian graph. Biometrika 106 109–125. MR3912386 10.1093/biomet/asy057 [DOI] [PMC free article] [PubMed] [Google Scholar]
  63. Zhang H, Chen X and Yang LF (2023). Adaptive liquidity provision in uniswap V3 with deep reinforcement learning. arXiv preprint. Available at arXiv:2309.10129. [Google Scholar]
  64. Zhang H, Zheng Y, Zhang Z, Gao T, Joyce B, Yoon G, Zhang W, Schwartz J, Just A et al. (2016). Estimating and testing high-dimensional mediation effects in epigenetic studies. Bioinformatics 32 3150–3154. [DOI] [PMC free article] [PubMed] [Google Scholar]
  65. Zhao Y, Li L and Initiative, A. D. N. (2022). Multimodal data integration via mediation analysis with high-dimensional exposures and mediators. Hum. Brain Mapp 43 2519–2533. [DOI] [PMC free article] [PubMed] [Google Scholar]
  66. Zhao Y and Luo X (2022). Pathway Lasso: Pathway estimation and selection with high-dimensional mediators. Stat. Interface 15 39–50. MR4305014 10.4310/21-SII673 [DOI] [PMC free article] [PubMed] [Google Scholar]
  67. Zhao Y, Luo X, Lindquist M and Caffo B (2018). Functional mediation analysis with an application to functional magnetic resonance imaging data. arXiv preprint. Available at arXiv:1805.06923. [Google Scholar]
  68. Zheng W and van der Laan M (2017). Longitudinal mediation analysis with time-varying mediators and exposures, with application to survival outcomes. J. Causal Inference 5 Art. No. 20160006, 24. MR4328877 10.1515/jci-2016-0006 [DOI] [Google Scholar]
  69. Zheng X, Aragam B, Ravikumar PK and Xing EP (2018). Reinforcement learning for ridesharing: A survey. DAGs with NO TEARS: Continuous optimization for structure learning. In In Advances in Neural Information Processing Systems 9472–9483. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

supplementary material

RESOURCES