Why AIPW Requires Two Kinds of Nuisance Fits
An augmented inverse-probability weighted (AIPW) estimate combines two ingredients: a model for the outcome given treatment and covariates, and a model for the probability of receiving treatment given covariates. These are called nuisance models because their parameters are not the causal effect being estimated. Their fitted values nevertheless enter the estimator directly, so their definitions, fitting populations, and predictions must be clear.
Let \(A\) be a binary treatment, with \(A=1\) for treated and \(A=0\) for control; let \(Y\) be the outcome; and let \(X\) denote the measured pre-treatment covariates. For the average treatment effect, the two outcome regressions describe the expected outcome under each observed treatment status, conditional on \(X\). The treatment-probability model describes how treatment assignment varies with \(X\).
The subscript \(0\) denotes the underlying population function, not a fitted model. A model specification chooses a functional form and predictors; fitting estimates its parameters from data. For example, a logistic regression for treatment specifies a model for the log odds of treatment, while a logistic outcome regression for a binary \(Y\) specifies a model for the conditional outcome probability. A fitted model is not automatically a correct model.
AIPW uses these fits in the estimator
Thus, each subject receives two outcome predictions, one for each treatment level, along with a predicted probability of treatment. The residual correction uses the observed outcome only for the treatment group the subject actually received. The model-fitting task is to produce defensible estimates of these functions over the covariate values represented in the study, not merely to maximize fit to a single observed outcome column.
Assumptions and Model Targets
The nuisance models do not by themselves make a causal interpretation valid. For the average treatment effect, the usual identification conditions include consistency, conditional exchangeability, and positivity. Consistency says that the observed outcome equals the potential outcome corresponding to the treatment actually received. Conditional exchangeability says that, given \(X\), treatment assignment is independent of the potential outcomes. Positivity requires \(0<P(A=1\mid X)<1\) for covariate values in the target population. The observed data must also be measured and sampled in a way that supports the target population and analysis.
These conditions distinguish causal identification from nuisance-model specification. Exchangeability concerns whether relevant confounders were measured and controlled; it is not guaranteed by a well-fitting regression. Positivity concerns treatment availability across covariate profiles; a fitted probability near zero or one can flag a practical difficulty, but a model cannot create treatment overlap where the data contain none.
For standard parametric nuisance fits, the analyst chooses model forms intended to approximate \(m_{10}(X)\), \(m_{00}(X)\), and \(e_0(X)\). Continuous covariates may enter linearly, through transformations or splines, or through interactions. A binary treatment model commonly uses logistic regression. The outcome model should match the outcome scale: for a continuous outcome, a linear conditional-mean model may be reasonable; for a binary outcome, a logistic model can estimate a conditional probability. In either case, the predictions used as \(\hat m_a(X)\) must be on the outcome's mean scale.
Worked Example: Choosing Candidate Nuisance Models
Suppose a hypothetical study estimates the effect of a counseling program (\(A=1\)) on a continuous symptom score \(Y\), measured four months later. Baseline symptom score \(X_1\), age \(X_2\), and clinic \(X_3\) are measured before treatment. Investigators expect baseline severity to relate nonlinearly to follow-up symptoms and treatment availability to vary by clinic.
A candidate treatment model is
Here \(X_3\) is represented by indicator variables if clinic is categorical. The quadratic term allows treatment probability to vary nonlinearly with baseline severity. After fitting this logistic regression to all study participants, the predicted treatment probability is \(\hat e(X_i)\) for each participant.
Because the follow-up score is continuous, candidate outcome regressions can use conditional-mean models, for example
One can fit this form separately among participants with \(A=1\) and \(A=0\), yielding separate coefficient estimates for \(a=1\) and \(a=0\). The quadratic term is included in both because the assumed curvature concerns outcome prediction as well as treatment assignment. That is a modeling choice to assess, not a fact established by the treatment model. This specification is a candidate, not proof of adequate confounding control or correct conditional means. The causal assumptions must still be justified from the study design and subject-matter knowledge.
Fitting Is Followed by Prediction
Fitting and prediction are distinct steps. The outcome regressions are fitted using observed outcomes in their corresponding treatment groups, or through an equivalent pooled model that permits treatment-specific outcome relationships. The treatment model is fitted using all participants, with \(A\) as its response. Once fitted, the outcome models are evaluated at each participant's \(X_i\) under both treatment levels, and the treatment model is evaluated at that same \(X_i\).
The predictions are not restricted to the group used to estimate a particular regression. For example, \(\hat m_1(X_i)\) is needed for a control participant as well as for a treated participant: it represents the fitted mean outcome for that covariate profile under treatment. Such a prediction is a model-based counterfactual mean, not an observed outcome for that person. Its usefulness depends on the model and the support of the data.
Worked Example: From Fitted Values to One AIPW Contribution
Consider one hypothetical treated participant with \(A_i=1\), observed outcome \(Y_i=8\) symptom-score points, fitted outcome predictions \(\hat m_1(X_i)=6\) and \(\hat m_0(X_i)=4\) points, and fitted treatment probability \(\hat e(X_i)=0.50\). These values are assumed to be outputs of the fitted nuisance models. The participant's contribution to the AIPW average-treatment-effect estimate is
The first term is the difference between the two predicted conditional means. Because this participant was treated, the treated residual \(Y_i-\hat m_1(X_i)=2\) is weighted by \(1/\hat e(X_i)=2\). The control residual term is zero because \(1-A_i=0\). In the estimator, this contribution is averaged with the corresponding contribution from every participant; it is not by itself an estimate of the population effect.
For a control participant, the treated residual term would instead be zero, and the control residual would be weighted by \(1/\{1-\hat e(X_i)\}\). This difference follows directly from the observed treatment indicator in the formula; it is not a choice made after inspecting the residual.
Ways to Fit the Outcome Regressions
Separate fitting is straightforward: fit one conditional-mean model among treated participants and another among controls. This allows the covariate-outcome relationships and intercepts to differ freely across groups, but it uses fewer observations to estimate each model and can be unstable when a treatment group is small.
A pooled model can use all observations while allowing treatment-specific relationships. For example, a linear model with \(A\), covariates \(X\), and interactions between \(A\) and the covariates can represent distinct intercepts and slopes by treatment group. Omitting the interactions imposes a shared-slope restriction; that may be efficient if credible, but it can misrepresent one or both outcome regressions if the relationship differs by treatment. A pooled model and separate regressions are not automatically equivalent: their equivalence depends on the included terms and fitting method.
For binary outcomes, logistic regression models conditional probabilities. If the fitted linear predictor under treatment \(a\) is \(\hat\eta_a(X)\), the outcome prediction is \(\hat m_a(X)=\operatorname{expit}\{\hat\eta_a(X)\}=1/[1+\exp\{-\hat\eta_a(X)\}]\), not the linear predictor itself. For other outcome types, select a model whose response mean and scale correspond to the estimand. A model's link function is a computational specification; the AIPW outcome prediction remains a conditional mean on the scale of \(Y\).
Worked Example: Interactions Versus a Shared-Slope Model
Suppose a hypothetical continuous-outcome analysis uses one covariate \(X\), baseline score, and treatment indicator \(A\). A pooled shared-slope model is
This model implies \(\hat m_0(X)=\hat\beta_0+\hat\beta_X X\) and \(\hat m_1(X)=\hat\beta_0+\hat\beta_A+\hat\beta_X X\). The fitted difference is the constant \(\hat\beta_A\), regardless of baseline score.
A pooled interaction model adds \(A X\):
It implies \(\hat m_0(X)=\hat\beta_0+\hat\beta_X X\) and \(\hat m_1(X)=\hat\beta_0+\hat\beta_A+(\hat\beta_X+\hat\beta_{AX})X\). For illustration, if fitted coefficients are \(\hat\beta_0=2\), \(\hat\beta_A=1\), \(\hat\beta_X=0.5\), and \(\hat\beta_{AX}=0.2\), then at \(X=4\), \(\hat m_0(4)=2+0.5(4)=4\) points and \(\hat m_1(4)=2+1+(0.5+0.2)(4)=5.8\) points. The predicted difference is \(1.8\) points. Without the interaction, the model would predict a difference of \(1\) point at every \(X\). The interaction is therefore important when the treatment-specific outcome relationship plausibly varies with baseline score; it should not be included or excluded solely because of a significance test.
Diagnostics, Alternatives, and Limitations
Diagnostics ask whether the fitted functions are plausible and whether the data support the predictions that AIPW needs. For outcome regressions, examine residual patterns, calibration or prediction errors within each treatment group, and whether important nonlinearities or interactions remain. For the treatment model, inspect the distribution of fitted probabilities by observed treatment group and investigate covariate profiles with very few treated or control participants. Balance diagnostics can help assess covariate balance induced by weighting, but balance on a score alone does not establish balance on all relevant covariates.
A fitted model can look adequate overall while failing in a subgroup that matters for the estimator. The outcome regressions should be assessed separately by treatment level, since strong prediction in one group does not establish good prediction in the other. The treatment model should be assessed for plausibility and overlap, not merely for classification accuracy: accurately classifying observed treatment assignments is not the same goal as estimating useful conditional treatment probabilities. Data-adaptive model selection can also make ordinary in-sample fit summaries optimistic.
The main alternatives clarify what the two nuisance fits contribute. Outcome regression alone estimates the treatment-specific means by averaging outcome-model predictions; it depends on the outcome regressions being adequate. Inverse-probability weighting alone uses the treatment model to reweight observed outcomes and depends on that model being adequate. AIPW combines both components and has a double-robustness property under the identification conditions: consistency can hold if either the outcome regressions or the treatment-probability model is correctly specified, subject to regularity conditions. This property does not repair unmeasured confounding, lack of positivity, or arbitrary errors in both components.
A practical limitation is that flexible models can reduce functional-form bias but may be unstable in small samples, especially when treated or control observations are sparse in regions of covariate space. Conversely, restrictive models can be stable but miss important structure. Fitted probabilities near zero or one are a warning that residual corrections may become large; diagnosing and addressing such instability is a separate issue from choosing the basic nuisance-model specification.
A useful workflow is to define the covariates before fitting, specify outcome models separately or with explicit treatment interactions, fit the treatment model to all participants, and generate all three predictions at every participant's covariates. Then inspect prediction scale, group-specific fit, and treatment overlap before forming the AIPW contributions. This sequence keeps the model targets distinct and makes errors in coding or interpretation easier to find.
Check Your Understanding
Answer each question, then compare with the solutions below.
- What is the response variable when fitting the treatment-probability model, and which observations are used?
- Why is \(\hat m_1(X_i)\) needed for a control participant?
- A logistic outcome model has fitted linear predictor \(0.4\) for a binary outcome. What conditional mean prediction does it provide, approximately?
- What restriction does a pooled outcome model without treatment-covariate interactions impose when it includes a treatment indicator and a continuous covariate?
- Why does good predictive fit not by itself justify a causal interpretation of AIPW?
Solutions. (1) The response is the binary treatment indicator \(A\), and the model is fitted using all participants. (2) It is the fitted conditional mean outcome for that participant's covariates under treatment; the AIPW score includes both treatment-specific predictions for every participant. (3) The mean is \(\operatorname{expit}(0.4)=1/[1+\exp(-0.4)]\approx0.5987\), or about 0.599. (4) It imposes a common covariate slope across treatment groups, while allowing different intercepts. (5) Prediction does not establish conditional exchangeability or positivity, and it does not guarantee that the other nuisance model is adequate.