In observational data, people who take treatment often already differ from those who do not. G-computation first estimates outcomes under each treatment level, then averages those predictions over the same target population's baseline covariate distribution to compare the two scenarios. It turns an outcome model into an estimate of a population average effect, but causal interpretation still depends on confounding control, overlap, and modeling assumptions.

The core idea of standardization
G-computation uses the g-formula to compute outcome distributions under interventions; with a single-time-point treatment, pooling outcome predictions over a shared covariate distribution is also called standardization. Let A be treatment receipt, Y the outcome, L pretreatment covariates, and Yᵃ the potential outcome when A is set to a. When identification conditions hold:
E[Yᵃ] = Eₗ{E[Y | A=a, L]}.
The inner expectation is the mean outcome given L and treatment level; the outer averages over the target population's distribution of L. Computing the means for a=1 and a=0 and subtracting yields the average treatment effect (ATE) for that target. Change the target population, and both the distribution used for standardization and the estimand change with it.
Computational steps and a training example
Take job training as a conceptual example: A indicates training participation, Y later earnings, and L includes pre-training education, work experience, and region. The raw mean earnings gap between participants and non-participants may reflect both training and preexisting group differences.
First, fit an outcome model μ̂(a,L) on the observational data—either one model with treatment, covariates, and suitable interactions, or separate models by treatment level. Next, keep each person's observed L and plug in A=1 and A=0 to obtain predicted earnings under both scenarios. Finally, average the two sets of predictions over the same target population and subtract the standardized mean under no training from that under training. If the target is the population represented by the sample, average with the sample distribution; if it is another population, use that population's covariate distribution and appropriate weights. The example clarifies the logic; it does not supply a numerical training effect.

Identification assumptions and common misuses
Interpreting the standardized difference as a causal effect requires no unmeasured confounding given L; every relevant L combination in the target population must have a chance of receiving either treatment (positivity); the observed treatment must match the defined intervention; and one person's treatment must not change another's outcome. Training content, timing, and the target population must also be clear, and L should include variables that precede treatment and suffice to control confounding.
In practice, first check the distribution and overlap of L across groups, then check outcome-model fit and whether predictions land in sparsely observed regions. Without overlap, model numbers may largely be extrapolation; a model alone cannot repair structural positivity failure. Misspecifying the outcome model also biases the estimate. Results can be compared with inverse-probability weighting under the same target and covariate set, with attention to why they differ; agreement does not prove either estimate is unbiased.
Do not treat every adjusted regression coefficient as the desired population causal effect: conditional coefficients in nonlinear models need not equal the standardized marginal effect. Do not put variables that occur after training and lie on the causal pathway into L as baseline confounders, which can change the question or introduce bias. High predictive accuracy does not remove unmeasured confounding; when treatment and confounding interact over time, use g-methods matched to the longitudinal problem rather than mechanically applying the single-time-point formula.
Relation to other estimators
Standardization and inverse-probability weighting can estimate the same causal quantity under similar identification conditions: the former usually models the outcome, the latter the probability of treatment assignment. Doubly robust estimators combine outcome and treatment models; when identification and other regularity conditions hold, consistency follows if either modeling path is correctly specified. Outcome-model standardization alone does not enjoy that double robustness.
References
-
Robins JM. A new approach to causal inference in mortality studies with a sustained exposure period—application to control of the healthy worker survivor effect. Mathematical Modelling. 1986;7:1393–1512.
-
Hernán MA, Robins JM. Causal Inference: What If. Chapman & Hall/CRC; 2020. Chapter 13.
-
Naimi AI, Cole SR, Kennedy EH. An introduction to g methods. International Journal of Epidemiology. 2017;46(2):756–762.
-
Research Methods · Rituals can be copied; understanding cannot be faked
-
Information compiled and published by the Scholay academic one-stop platform; please report infringement for takedown.
-
Also published on Enter Scholar, a scholars' community for the intelligent era