Chapter_21
9/17/25About 4 min
### Chapter 21: G-METHODS FOR TIME-VARYING TREATMENTS **Context**: This chapter addresses limitations of traditional methods for time-varying treatments with treatment-confounder feedback (e.g., bias under null effects). It introduces three g-methods—g-formula, IP weighting, and g-estimation—that correctly estimate causal effects under sequential exchangeability, positivity, and consistency.
21.1 The g-formula for time-varying treatments
Technical Points:
- Core Theory: The g-formula standardizes mean outcomes to the confounder distribution in the study population. For time-varying treatments, it generalizes to:
where is the treatment strategy, is confounder history, and is the confounder density at time given prior history.
- Key Formula: Under sequential exchangeability, this equals , the counterfactual mean under strategy .
- Positivity Requirement: The g-formula requires for all (Technical Point 19.2).
- Application: In Table 21.1 (sequentially randomized experiment), the g-formula correctly estimates (null effect).
Fine Points:
- Confounder Dependency: Omitting necessary confounders (e.g., in Figure 20.8) invalidates the g-formula’s causal interpretation.
- Component Interpretation: Individual components (e.g., ) may lack causal meaning, but their combination identifies under sequential exchangeability.
- Simulation View: The g-formula simulates counterfactual outcomes by assigning treatment and preserving observed covariate distributions (Figures 21.1–21.2).
21.2 IP weighting for time-varying treatments
Technical Points:
- Weights Definition:
- Nonstabilized:
- Stabilized:
- Estimation: is the mean of in the pseudo-population weighted by or , among those with .
- Marginal Structural Models (MSMs): For high-dimensional treatments, specify . Parameters are estimated via weighted least squares.
Fine Points:
- Equivalence to g-formula: Nonparametric IP weighting and g-formula yield identical results, even without causal validity.
- Model Robustness: MSMs avoid the g-null paradox (Technical Point 21.3) and allow effect modification by baseline variables (e.g., ).
- Software: Implemented in R (
gfoRmula) and SAS (GFORMULA).
21.3 A doubly robust estimator for time-varying treatments
Technical Points:
- Doubly Robust Estimator: Combines treatment and outcome models. Consistent if either model is correct.
- Steps for "Always Treat" ():
- Fit treatment model for .
- Compute time-varying IP weights .
- Fit sequential outcome models with as covariate, starting from to .
- Estimate as the sample mean of .
- Robustness: -robust—unbiased if treatment models for times to and outcome models for to are correct for any .
Fine Points:
- Extensions: Targeted Minimum Loss-Based Estimators (TMLE) handle dynamic strategies (Technical Point 21.6).
- Practical Use: Requires correct specification of either treatment or outcome models, reducing bias in observational studies.
21.4 G-estimation for time-varying treatments
Technical Points:
- Structural Nested Mean Model (SNMM): Models the effect of a "blip" of treatment at time :
- G-estimation:
- Compute .
- Solve estimating equations for such that is independent of given past history.
- Closed-Form Solution: For linear SNMMs, has an analytic expression (Technical Point 21.8).
Fine Points:
- Rank Preservation: Optional assumption; g-estimation remains valid for SNMMs without it.
- Efficiency vs. Robustness: SNMMs increase efficiency if no effect modification by past covariates, but may introduce bias if misspecified (vs. MSMs).
21.5 Censoring is a time-varying treatment
Technical Points:
- Censoring Weights: Extend IP weighting to handle censoring :
- G-formula Adjustment: For censored data, condition on :
Fine Points:
- Survival Analysis: For failure-time outcomes, use pooled logistic models with IP weights or g-formula (Technical Point 21.10).
- Selection Bias: Censoring can induce bias if not adjusted (e.g., when is a collider).
21.6 The big g-formula
Technical Points:
- Definition: The big g-formula includes all variables (observed and unobserved ) and identifies under any causal DAG.
- Reduction to Observed Data: If d-separation holds, it simplifies to formulas using only observed data (e.g., front-door criterion).
Fine Points:
- Front-Door Formula Proof: Under Figure 7.14, (Technical Point 21.11).
- SWIG Property: Single-world counterfactual graphs (SWIGs) enable d-separation proofs without cross-world assumptions (Technical Point 21.12).
Key Takeaways:
- g-methods (g-formula, IP weighting, g-estimation) resolve bias from treatment-confounder feedback.
- Doubly/Multiply Robust Estimators enhance reliability in high-dimensional settings.
- Censoring requires explicit adjustment as a time-varying treatment.
- Software (e.g.,
gfoRmula,GFORMULA) implements these methods for applied research.