G-Computation (Parametric G-formula)
Also known as: G-formula, Parametric G-formula, Standardization
G-computation is a causal inference method for estimating the effect of an intervention or treatment on an outcome from observational data. Developed by James M. Robins in 1986, it provides a parametric approach to standardization that can handle time-varying exposures and confounders. The method estimates what the population outcome would be under different intervention scenarios by utilizing fitted outcome models.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use g-computation when estimating causal effects of exposures in observational studies where confounding is a concern and you are willing to assume no unmeasured confounding. The method is particularly valuable for complex exposure patterns, time-varying confounders, and when you want to estimate effects of hypothetical interventions (e.g., if smoking were eliminated tomorrow). It is less suitable when the positivity assumption is severely violated, when the outcome model is difficult to specify correctly, or when interactions between exposure and confounders are complex and not well captured by the fitted model.
Strengths & limitations
- Handles time-varying confounders and exposures that are affected by past outcomes, situations where simple regression adjustment fails
- Can estimate effects of dynamic interventions (policies that adapt based on individual characteristics over time)
- Flexible in specifying the outcome model, allowing use of nonlinear models and flexible functional forms
- Intuitive interpretation: the estimated causal effect is the difference in outcomes under different intervention scenarios in the actual population
- Can estimate effects of sustained interventions and cumulative effects in longitudinal studies
- Relies on assumption of no unmeasured confounding, which cannot be tested from data alone
- Requires specification of a correct outcome model; misspecification biases estimates and there is no simple way to detect misspecification
- Requires positivity assumption (non-zero probability of all exposure values at all levels of confounders), which may be violated with rare exposures
- Computationally intensive, especially with large datasets or complex outcome models requiring simulation
- Performance depends heavily on overlap between exposure groups in the confounder distribution
Frequently asked
How is g-computation different from simple outcome regression adjustment?
Simple regression adjustment estimates conditional effects within covariate strata. G-computation estimates marginal (population-level) causal effects by averaging predicted outcomes under different intervention scenarios across the entire population. For non-linear models or when effect modification is present, these can differ substantially.
Do I need to assume no unmeasured confounding for g-computation to work?
Yes. G-computation, like all standard causal inference methods, requires the assumption that all confounders are measured. If important confounders are unmeasured, bias will remain even with perfect model specification. Sensitivity analyses can assess robustness to unmeasured confounding.
What should I do if my outcome model does not fit well?
Poor model fit suggests the model may be misspecified. Try more flexible functional forms, add interaction terms, use nonparametric or semiparametric methods. However, improving fit on observed data does not guarantee the model is correct for prediction under intervention scenarios. Always examine residuals, test for interactions, and conduct sensitivity analyses.
How do I get confidence intervals for g-computation estimates?
Bootstrap resampling is the standard approach: resample the original data with replacement, fit the outcome model to each bootstrap sample, perform g-computation, and repeat. The distribution of bootstrap estimates provides the confidence intervals. Alternatively, analytical methods using the delta method can be used, though bootstrap is more robust.
Sources
- Robins, J. M. (1986). A new approach to causal inference in mortality studies with sustained exposure periods: application to control of the healthy worker survivor effect. Mathematical Modelling, 7(9-12), 1393-1512. DOI: 10.1016/0270-0255(86)90088-6 ↗
- Taubman, S. L., Robins, J. M., Mittleman, M. A., & Hernán, M. A. (2009). Intervening on risk factors for coronary heart disease: an application of the parametric g-formula. International Journal of Epidemiology, 38(6), 1599-1611. DOI: 10.1093/ije/dyp192 ↗
- Ahern, J., Hubbard, A., & Galea, S. (2009). Estimating the effects of potential public health interventions on population disease burden: a step-by-step illustration of causal inference methods. American Journal of Epidemiology, 169(9), 1140-1147. DOI: 10.1093/aje/kwp015 ↗
How to cite this page
ScholarGate. (2026, June 3). G-Computation (Parametric G-formula). ScholarGate. https://scholargate.app/en/causal-inference/g-computation
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Doubly Robust EstimationCausal inference↔ compare
- Inverse Probability WeightingCausal inference↔ compare