1 The Problem with Static Causal Inference
Most of the econometrics literature on causal inference focuses on static, binary, and one-shot treatments. A worker either participates in a training programme or does not. A firm either receives a subsidy or does not. The counterfactual is a clean comparison: what would have happened to the treated unit in the absence of treatment?
Many policy-relevant questions are inherently dynamic. A patient receives a sequence of drug doses, each adjusted based on their evolving health status. A welfare recipient moves through multiple benefit programmes over years, with transition probabilities that depend on current outcomes. A tax policy changes in multiple periods, and its effects depend on when and how often it applies. In all these settings, the standard single-treatment causal inference framework fails.
The failure is not merely one of complexity but of identification. When treatment at time t affects both the outcome at time t and intermediate variables that influence treatment at time t + 1, conditioning on those intermediate variables creates a collider bias problem that corrupts estimation of the cumulative effect. This is the core identification challenge for dynamic treatment effects.
2 Setup: Potential Outcomes for Sequences of Treatments
Let time periods run from t = 0, 1, ..., T. At each period, unit i receives treatment Dᵢₜ ∈ {0, 1} and we observe an intermediate outcome Lᵢₜ (a time-varying covariate) and a terminal outcome Yᵢ at t = T.
The treatment history up to period t is D̅ᵢₜ = (Dᵢ₀, Dᵢ₁, ..., Dᵢₜ), and the covariate history is L̅ᵢₜ = (Lᵢ₀, Lᵢ₁, ..., Lᵢₜ).
A treatment regime is a policy that maps the observed history (D̅ᵢₜ₋₁, L̅ᵢₜ₋₁) to a treatment decision at time t. The potential outcome under a fixed deterministic regime d̅ = (d₀, d₁, ..., dₜ) is denoted Yᵢ(d̅).
The causal estimand of interest is the average potential outcome under regime d̅:
Comparing μ(d̅) and μ(d̅') for two different regimes identifies the causal effect of following one treatment sequence versus another over the entire period.
3 The Key Identifying Assumption: Sequential Ignorability
The standard assumption for identifying μ(d̅) from observational data is sequential ignorability (also called no unmeasured time-varying confounding):
This says that at each time period, conditional on the observed history of treatments and covariates, the treatment decision is as good as randomly assigned. It is the longitudinal analogue of unconfoundedness for static treatments.
Sequential ignorability fails when there are time-varying confounders that are themselves affected by past treatment. If, for example, a patient's health status Lᵢₜ is both an intermediate outcome of prior treatment and a predictor of current treatment decisions, then Lᵢₜ is simultaneously a mediator (blocking the effect of past treatment) and a confounder (explaining current treatment selection). Conditioning on Lᵢₜ to control for confounding also removes the indirect effect of past treatment—a classic bad-control problem.
4 G-Computation: The Direct Method
Robins [1986] proposed the G-computation formula as the non-parametric identification result for μ(d̅) under sequential ignorability:
The formula says: to estimate the mean potential outcome under regime d̅ we integrate the conditional outcome 𝔼[Y | D̅, L̅] over the distribution of covariate histories L̅ that would naturally arise if treatment followed regime d̅.
In practice, G-computation is implemented by fitting parametric models for each component 𝔼[Y | D̅, L̅] and P(Lₜ | D̅ₜ₋₁, L̅ₜ₋₁) and then simulating the distribution of L̅ under the target regime. This Monte Carlo G-computation estimator is consistent under correct model specification but is sensitive to misspecification at any stage.
5 Marginal Structural Models and IPTW
An alternative identification strategy avoids the recursive integration problem by using inverse probability of treatment weighting (IPTW). Robins et al. [2000] proposed marginal structural models (MSMs) that model the potential outcome as a function of treatment history:
where m is a parametric function (e.g., linear or logistic) and β is the parameter of interest.
Under sequential ignorability, β can be estimated by weighted regression, using the stabilised IPTW weights:
The numerator is the marginal probability of the treatment sequence; the denominator is the conditional probability given covariate history. This ratio up-weights units whose treatment sequence is unlikely given their covariate history and down-weights units whose treatment sequence was predictable creating a pseudo-population in which treatment is independent of time-varying covariates.
Fitting the MSM on the weighted sample recovers consistent estimates of β under correct specification of both the outcome model and the propensity score models at each time period.
6 Sequential G-Estimation: Semiparametric Efficiency
Robins [1994] proposed G-estimation as a semiparametric alternative that is efficient in the class of estimators consistent under sequential ignorability. The approach works backwards from the terminal period, using the structural nested mean model (SNMM):
This decomposes the total treatment effect into period-specific "blip" effects γₜ, each capturing the causal impact of treatment at time t conditional on the history up to that point.
G-estimation proceeds backwards: starting at period T, estimate γₜ from the residual Y - 𝔼[Y | D̅, L̅] using a moment condition that exploits sequential ignorability. Then "remove" the period-T effect from the outcome, creating an adjusted outcome, and repeat for period T - 1, and so on. This backward induction produces consistent estimates of each γₜ that are doubly robust: consistent if either the propensity score models or the blip function specifications are correct.
7 Connecting to Machine Learning: Dynamic DML
The double machine learning (DML) framework of Chernozhukov et al. [2018] has been extended to dynamic treatment settings. The core insight is that at each time period, the treatment effect can be identified via Neyman orthogonal moment conditions, and machine learning can be used to estimate the nuisance components (the propensity score P(Dₜ | D̅ₜ₋₁, L̅ₜ) and the outcome model 𝔼[Y | D̅, L̅]) without imposing functional form restrictions.
The challenge is cross-fitting in a temporal setting. Standard cross-fitting splits the sample randomly, but in a panel setting, the temporal ordering of observations must be respected to avoid using future information to estimate current nuisance functions. "Rolling" or "forward-validation" cross-fitting strategies split the sample along the time dimension, using earlier observations to estimate nuisance functions applied to later observations.
Recent work has formalised sufficient conditions under which dynamic DML recovers √n consistent and asymptotically normal estimates of cumulative treatment effects, even when the nuisance estimators converge at slower rates [Lewis and Syrgkanis, 2021]. The requirements are analogous to those for static DML: the product of the nuisance estimation rates must be o(n⁻¹/²).
8 An Application: Labour Market Programmes
To illustrate, consider a worker who may participate in multiple retraining programmes over a three-year period. Let Dᵢₜ = 1 if worker i participates in a programme in year t, and let Lᵢₜ be the worker's employment status at the end of year t. The terminal outcome Yᵢ is the worker's wage in year 3.
Programme participation in year t depends on employment status Lᵢ,ₜ₋₁—unemployed workers are more likely to be assigned to training. But employment status Lᵢₜ is also affected by the year-t programme. Conditioning on Lᵢₜ to control for pre-year-(t+1) confounding therefore blocks the indirect effect of training in year t through its impact on employment.
The sequential G-estimation approach handles this correctly: at each period, it estimates the causal effect of that period's programme while accounting for the fact that earlier programme participation operates through intermediate employment status. The result is a cumulative treatment effect that correctly aggregates effects across periods without the bad-control bias that would arise from standard panel regression.
9 Software and Implementation
In R, the CBPS and WeightIt packages provide IPTW estimation for longitudinal settings, with support for stabilised weights and the Covariate Balancing Propensity Score (CBPS) estimator of Imai and Ratkovic [2014]. The ltmle package implements the longitudinal TMLE of Gruber and van der Laan [2010], which achieves semiparametric efficiency bounds. In Python, the causaltune library provides a high-level interface for dynamic DML estimation.
10 Limitations
Sequential ignorability is a strong assumption. In many economic applications, the dominant confounders are unobserved permanent characteristics (such as ability or health propensity) rather than time-varying characteristics. In such cases, even the longitudinal G-estimation framework fails unless fixed effects can be incorporated. The interaction between fixed-effect control and sequential treatment is an active area of research that remains incompletely resolved.
11 Conclusion
Dynamic treatment regimes require methods that go beyond the standard static causal inference toolkit. G-computation, marginal structural models, and sequential G-estimation each handle the time-varying confounding problem in different ways, with different robustness properties. The connection to DML offers a path toward flexible, machine-learning-augmented estimation of dynamic causal effects. As administrative panel datasets become more accessible, these methods will become increasingly central to empirical practice.
References
- Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., and Robins, J. (2018). Double/debiased machine learning for treatment and structural parameters. Econometrics Journal, 21(1):C1-C68.
- Imai, K. and Ratkovic, M. (2014). Covariate balancing propensity score. Journal of the Royal Statistical Society: Series B, 76(1):243-263.
- Lewis, G. and Syrgkanis, V. (2021). Double/debiased machine learning for dynamic treatment effects. arXiv preprint, 2002.13485.
- Gruber, S. and van der Laan, M. J. (2010). A targeted maximum likelihood estimator of a causal effect on a bounded continuous outcome. International Journal of Biostatistics, 6(1).
- Robins, J. M. (1986). A new approach to causal inference in mortality studies with a sustained exposure period. Mathematical Modelling, 7(9-12):1393-1512.
- Robins, J. M. (1994). Correcting for non-compliance in randomised trials using structural nested mean models. Communications in Statistics, 23(8):2379-2412.
- Robins, J. M., Hernan, M. A., and Brumback, B. (2000). Marginal structural models and causal inference in epidemiology. Epidemiology, 11(5):550-560.
- Luedtke, A. R. and van der Laan, M. J. (2016). Optimal individualised treatments in resource-limited settings. International Journal of Biostatistics, 12(1):283-303.