Course

Parametric G-Formula

Slide 1 of 8

The G-Formula: Foundation and Theory

The parametric g-formula is one of the most powerful methods in causal inference, providing a unified framework for estimating causal effects from observational data. Named after James Robins who developed it in 1986, the "g" stands for "generalized," reflecting its ability to handle complex treatment regimes including time-varying exposures.

Definition: The G-Formula
The g-formula expresses the counterfactual mean outcome under treatment level a as:

E[Ya]=lE[YA=a,L=l]P(L=l)E[Y^a] = \sum_l E[Y|A=a, L=l] \cdot P(L=l)

This formula "standardizes" the conditional expectation of Y to the distribution of confounders L in the population, yielding a marginal causal effect.

The parametric g-formula makes this theoretical expression operational by:

  1. Estimating E[Y|A,L] using a parametric regression model
  2. Using the empirical distribution of L in the data
  3. Averaging predictions across all individuals
Historical Context: The NHANES Mortality Follow-up
The g-formula was first applied to estimate the causal effect of smoking cessation on mortality using National Health and Nutrition Examination Survey (NHANES) data. The challenge was that smokers who quit differed systematically from those who continued - they were often sicker (quitting due to illness) or healthier (more health-conscious). The g-formula provided a principled way to adjust for these differences.

The Causal Identification

Under the standard causal assumptions:

  1. Exchangeability: Ya ⁣ ⁣ ⁣ALY^a \perp\!\!\!\perp A | L (no unmeasured confounding)
  2. Positivity: P(A=aL=l)>0P(A=a|L=l) > 0 for all l with P(L=l)>0P(L=l) > 0
  3. Consistency: If A=aA=a, then Y=YaY = Y^a

The g-formula identifies the causal effect:

E[Ya]=EL[E[YA=a,L]]=lE[YA=a,L=l]P(L=l)E[Y^a] = E_L[E[Y|A=a, L]] = \sum_l E[Y|A=a, L=l] P(L=l)

Key Insight
The g-formula replaces the unobservable counterfactual expectation E[Y^a] with an observable quantity: the expected outcome among those with A=a, L=l, averaged over the population distribution of L.

The mathematical derivation proceeds as: E[Ya]=EL[E[YaL]](law of total expectation)E[Y^a] = E_L[E[Y^a|L]] \quad \text{(law of total expectation)} =EL[E[YaA=a,L]](exchangeability)= E_L[E[Y^a|A=a, L]] \quad \text{(exchangeability)} =EL[E[YA=a,L]](consistency)= E_L[E[Y|A=a, L]] \quad \text{(consistency)}

Use arrow keys to navigate