Skip to content

Methods · Causal inference · Time-varying confounding

Parametric g-Formula for Time-Varying Treatments

The parametric g-formula estimates the mean outcome under a sustained treatment strategy by modelling time-varying covariates and the outcome given the past, then simulating covariate and treatment histories forward under that strategy.

모수적 g-공식은 시간가변 공변량과 결과를 과거 이력으로 모형화한 뒤, 정해진 처치 전략대로 공변량·처치 이력을 앞으로 모의실험해 그 전략에서의 평균 결과를 추정하는 방법입니다.

Blood pressure affects later treatment and is itself affected by earlier treatment; how do I estimate the outcome if everyone had always been treated versus never treated?

혈압이 이후 치료에 영향을 주면서 이전 치료의 영향도 받는데, 모두가 계속 치료받았을 때와 전혀 받지 않았을 때의 결과를 어떻게 추정하나요?

Fit models for each time-varying covariate given the previous covariates and treatment, and an outcome model given the full history, then simulate histories forward from the observed baseline under each strategy and average the predicted outcome. Bootstrapping the whole procedure gives confidence intervals, and the simulated natural course should reproduce the observed outcome mean.

When to use Parametric g-Formula for Time-Varying Treatments

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

Under the parametric g-formula the mean outcome was [value] if always treated and [value] if never treated (difference [value], 95% bootstrap CI [value] to [value]); the natural course ([value]) matched the observed mean ([value]).

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 1 reference test compares the results with direct computations (formulas, enumeration or simulation).

    독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.

Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.

허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.

Run Parametric g-Formula for Time-Varying Treatments on Quorant

Data you need
a table (CSV or Excel) with an outcome variable, a treatment indicator, predictor (feature) columns, a time variable and a unit (entity) ID
Price
600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
Checking
Compared with independent computations
Before you pay
A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.

Method ID Q81049 · Reviewed 2026-10-25