Time-Varying Treatments and G-computation

Summary

Time-varying treatments involve sequential assignment over time points, where intermediate confounders are affected by past treatment. Sequential ignorability extends the ignorability assumption to this setting. The g-formula (Robins 1986) identifies the causal effect of a treatment sequence by iterating outcome regression across time. The Bayesian approach applies g-computation: fit a Bayesian model for each component in the g-formula and combine posterior draws.

Overview

In many real-world scenarios, subjects receive treatments sequentially at multiple time points. The challenge: time-varying confounders are affected by both previous treatments and future treatment assignment and outcomes. These settings are called time-varying, sequential, or longitudinal treatments.

Standard ignorability cannot handle this because conditioning on a time-varying confounder simultaneously:

  • Removes confounding for the -th treatment
  • Opens a collider bias path for earlier treatments

The solution is sequential ignorability combined with the g-formula.

Setup

Consider time points. For unit (; ):

  • — baseline time-invariant covariates
  • — binary treatment at time
  • — time-varying confounders between and (affected by previous treatments)
  • — final outcome at time

Treatment sequence: and .

Causal estimand: the marginal effect comparing two pre-specified treatment sequences :

Sequential Ignorability

Assumption 7.2 — Sequential Ignorability

For all :

for all . That is, given all past treatment and covariate history, the current treatment assignment is independent of future potential outcomes.

Sequential ignorability is the time-varying analogue of the standard ignorability assumption. It requires that at each time point, treatment is as-good-as-random conditional on the entire observed history up to that point.

The G-Formula

Theorem: G-Formula (Robins 1986)

Under sequential ignorability, the marginal mean potential outcome for treatment sequence is identified from observed data as:

The g-formula is an extension of the outcome regression identification formula to sequential treatments. It requires:

  1. A model for the final outcome
  2. Models for the time-varying confounders at each time point

Bayesian G-Computation

The Bayesian approach applies g-computation: fit Bayesian models for each component in the g-formula, combine posterior draws.

Algorithm:

  1. Fit a Bayesian outcome model
  2. Fit Bayesian confounder models for each
  3. Draw posterior samples jointly
  4. Compute the g-formula integral by Monte Carlo: simulate from the confounder models under intervention , plug into the outcome model, average

Example 7.3 — Bayesian G-computation with Two Periods

Setup: time periods. : binary baseline covariate. : binary treatment at . : binary time-varying covariate. : binary treatment at . : binary outcome.

Estimand: for any , via:

Posterior computation (with Beta conjugate priors):

  • Sample from (8 Bernoulli cells)
  • Sample similarly (4 Bernoulli cells)
  • Sample from

Then combine to get posterior of and contrasts.

Challenges and Extensions

Scalability: the g-formula becomes intractable as and the dimension of increase — the sum over all history paths requires exponentially many models.

Marginal Structural Models (MSM): A popular alternative (Robins et al. 2000) that models the marginal potential outcome distribution rather than the full conditional. The Bayesian version (Saarela et al. 2016) uses the Bayesian bootstrap.

Dynamic treatment regimes: A closely related topic — sequences of decision rules that individualize treatment over time based on evolving history. Optimal dynamic treatment regimes require combining causal inference + decision theory + reinforcement learning.

G-null Paradox

Robins & Wasserman (2015) showed that unsaturated MSMs might rule out the null hypothesis of zero causal effect a priori — a phenomenon called the g-null paradox. This is an important limitation of MSMs in practice.

Comparison: Bayesian vs. Frequentist

ApproachMethodKey advantageLimitation
FrequentistIPW-based MSMComputationally simplerExtreme weights; g-null paradox
FrequentistG-computationDirect; flexibleRequires many models
BayesianG-computationUncertainty propagation across timeComputationally demanding
BayesianMarginal structural model (Bayesian bootstrap)Avoids specifying all confounder modelsRelies on IPW; extreme weight issues remain

Connections

See Also