Tutorials › Marginal Structural Models › G-Estimation at a Single Treatment Decision

Structural Nested Models and g-Estimation · Tutorial 329 of 501

G-Estimation at a Single Treatment Decision

Learn how to estimate a single-treatment additive blip by removing the proposed treatment effect from the outcome and checking whether the result remains associated with treatment after conditioning on covariates.

Advanced 12 min read

What You'll Learn

  • Define the additive blip and its blipped-down outcome for one treatment decision.
  • Derive the treatment-history conditional moment equation from exchangeability.
  • Obtain the closed-form sample estimator and identify the positivity condition for identification.
  • Calculate g-estimates in stratified and unstratified examples.
  • Diagnose weak overlap, unstable estimates, and failures of the blip model.
  • Compare g-estimation with the g-formula and inverse-probability weighting.

From a Proposed Blip to an Estimating Equation

With one treatment decision, the central computational task in g-estimation is to find the blip parameter that removes the treatment effect from the observed outcome. If the parameter is correct, the resulting blipped-down outcome has the same conditional mean in the treated and untreated groups at each covariate history. This turns a counterfactual effect model into an equation that can be evaluated using observed data.

Let \(L\) denote covariates measured before treatment, \(A\in\{0,1\}\) the treatment, and \(Y\) the observed outcome. Write \(Y^a\) for the outcome that would be observed under treatment level \(a\). Consider the additive structural nested mean model with a single scalar parameter \(\psi\):

$$ E[Y^a-Y^0\mid L=l]=\psi a,\qquad a\in\{0,1\}. $$

The blip function is \(\gamma(a,l;\psi)=\psi a\). It is additive because the model specifies a mean difference on the outcome scale, and it has no effect modification by \(L\). G-estimation at this decision searches for the value of \(\psi\) that makes the observed outcome minus its proposed treatment blip conditionally unrelated, in mean, to treatment.

Definition: For a proposed value \(\psi\), the blipped-down outcome is \(U(\psi)=Y-\psi A\). The g-estimate solves a treatment-history conditional moment equation for which \(U(\psi)\) has equal conditional means across treatment levels given \(L\).

The identifying assumptions used here are consistency (\(Y=Y^A\)), conditional exchangeability (\(Y^a\perp A\mid L\) for \(a=0,1\)), and positivity (\(0<P(A=1\mid L=l)<1\) for covariate values in the target population). Assume the relevant conditional means exist and the additive blip model is correct. Consistency and exchangeability identify the observed conditional mean in each treatment group with the corresponding potential-outcome mean. Positivity ensures that both treatment levels are represented at the histories where the contrast is to be identified.

The Conditional Moment and Its Derivation

Set \(e(L)=P(A=1\mid L)\). Under the assumptions above, define \(m_a(l)=E[Y\mid A=a,L=l]\). The model and exchangeability give

$$ m_1(l)-m_0(l) =E[Y^1-Y^0\mid L=l] =\psi. $$

Consequently, at the true parameter \(\psi_0\), the conditional means of the blipped-down outcome agree:

$$ E[U(\psi_0)\mid A=1,L=l] =m_1(l)-\psi_0 =m_0(l) =E[U(\psi_0)\mid A=0,L=l]. $$

This equality is the treatment-history conditional moment condition for a single decision. An equivalent form uses the propensity residual \(A-e(L)\). Since \(E[A-e(L)\mid L]=0\), equal conditional means of \(U(\psi_0)\) across the two treatment groups imply \(E[(A-e(L))U(\psi_0)\mid L]=0\). Conversely, because \(A\) is binary and positivity holds, that conditional residual equation implies the two conditional means are equal.

Theorem: Under consistency, conditional exchangeability, positivity, finite conditional means, and the correctly specified additive blip model, the true parameter satisfies $$ E[(A-e(L))(Y-\psi_0 A)\mid L]=0. $$ If \(E[e(L)\{1-e(L)\}]>0\), the corresponding population scalar equation \(E[(A-e(L))(Y-\psi A)]=0\) has the unique solution \(\psi=\psi_0\).

To verify the conditional equation directly, note that

$$ E[(A-e(L))U(\psi_0)\mid L] =e(L)\{1-e(L)\} \left\{ E[U(\psi_0)\mid A=1,L] - E[U(\psi_0)\mid A=0,L] \right\} =0. $$

For uniqueness and the estimator formula, first calculate the two conditional expectations involving treatment:

$$ E[(A-e(L))Y\mid L] =e(L)\{1-e(L)\}\{m_1(L)-m_0(L)\}, \qquad E[(A-e(L))A\mid L]=e(L)\{1-e(L)\}. $$

The first identity follows by splitting over \(A=1\) and \(A=0\): its left side is \(e(L)\{1-e(L)\}m_1(L)-\{1-e(L)\}e(L)m_0(L)\). The second follows because \(A^2=A\). Since the model gives \(m_1(L)-m_0(L)=\psi_0\), taking expectations yields

$$ E[(A-e(L))Y] =\psi_0 E[e(L)\{1-e(L)\}], \qquad E[(A-e(L))A] =E[e(L)\{1-e(L)\}]. $$

Thus the scalar moment equation is linear in \(\psi\), and its coefficient is strictly positive when \(E[e(L)\{1-e(L)\}]>0\). Solving it gives the population identification formula

$$ \psi_0= \frac{E[(A-e(L))Y]}{E[(A-e(L))A]}. $$

This derivation also clarifies the scope of the result: the conditional equation is stronger than one averaged scalar equation. A single scalar moment identifies the common \(\psi\) under the stated homogeneous blip model; if the conditional treatment effect varies with \(L\), positive and negative discrepancies can cancel in the averaged equation.

Worked Calculations

Worked Example: Combining Two Covariate Strata

Suppose a sample has four people in each of two strata. In stratum \(L=0\), the known treatment probability is \(e(0)=0.25\); one person is treated and has \(Y=12\), while three are untreated and each has \(Y=10\). In stratum \(L=1\), \(e(1)=0.75\); three people are treated and each has \(Y=22\), while one is untreated and has \(Y=20\). Solve the empirical residual moment for \(\psi\).

The empirical equation is \(\sum_i(A_i-e(L_i))(Y_i-\psi A_i)=0\), so the estimate is the ratio of the sum involving \(Y\) to the sum involving \(A\). In stratum \(L=0\), the numerator contribution is \(0.75(12)+3(-0.25)(10)=9-7.5=1.5\). The denominator contribution is \(0.75(1)+3(-0.25)(0)=0.75\).

In stratum \(L=1\), the numerator contribution is \(3(0.25)(22)+(-0.75)(20)=16.5-15=1.5\). The denominator contribution is \(3(0.25)(1)+(-0.75)(0)=0.75\). Thus the full numerator is \(1.5+1.5=3\), and the full denominator is \(0.75+0.75=1.5\). Therefore \(\hat\psi=3/1.5=2\). The calculation adjusts for the two different treatment probabilities rather than comparing the overall treated and untreated averages.

Worked Example: Confounding Can Reverse the Crude Contrast

Let \(P(L=0)=P(L=1)=0.5\). Suppose \(e(0)=0.2\), \(e(1)=0.8\), and the conditional mean outcomes are \(m_0(0)=0\), \(m_1(0)=2\), \(m_0(1)=10\), and \(m_1(1)=12\). The additive blip is \(\psi=2\) in both strata.

The treated group has probability \(0.1\) of coming from \(L=0\) and \(0.4\) from \(L=1\), for total probability \(0.5\). Its mean is \(\{0.1(2)+0.4(12)\}/0.5=10\). The untreated group has probability \(0.4\) from \(L=0\) and \(0.1\) from \(L=1\), also totaling \(0.5\); its mean is \(\{0.4(0)+0.1(10)\}/0.5=2\). The crude difference is \(10-2=8\), not 2.

For the g-estimating moment, \(e(l)\{1-e(l)\}=0.2(0.8)=0.16\) in both strata. The expected numerator is \(0.5(0.16)(2)+0.5(0.16)(2)=0.32\); the expected denominator is \(0.5(0.16)+0.5(0.16)=0.16\). Their ratio is \(0.32/0.16=2\), recovering the common conditional mean contrast. This example shows why the conditional treatment history matters.

Worked Example: Solving a Small Empirical Moment

Suppose four observations have \(L\) values with known \(e(L)=0.5\) for each person, treatments \(A=(1,1,1,0)\), and outcomes \(Y=(5,7,6,4)\). Calculate the empirical root.

The numerator is \((1-0.5)5+(1-0.5)7+(1-0.5)6+(0-0.5)4=2.5+3.5+3-2=7\). The denominator is \((1-0.5)1+(1-0.5)1+(1-0.5)1+(0-0.5)0=1.5\). The empirical root is therefore \(\hat\psi=7/1.5=14/3\), or approximately \(4.67\). This is a finite-sample calculation, not evidence that the true effect equals \(4.67\): with only four observations, chance imbalance in outcomes can make the moment root far from the underlying parameter.

Implementation, Diagnostics, and Alternatives

In a sample, if \(e(L_i)\) is available, the empirical moment equation is

$$ \sum_{i=1}^{n}\{A_i-e(L_i)\}(Y_i-\psi A_i)=0, \qquad \hat\psi= \frac{\sum_{i=1}^{n}\{A_i-e(L_i)\}Y_i} {\sum_{i=1}^{n}\{A_i-e(L_i)\}A_i}, $$

provided the denominator is nonzero. The population justification requires the propensity \(e(L)\) to represent the conditional treatment probability. Estimating that probability in practice introduces additional conditions; the formula alone does not guarantee validity if the treatment model is inappropriate.

Several checks are useful before interpreting the result. Examine treatment probabilities across covariate histories: probabilities near zero or one make \(e(L)\{1-e(L)\}\) small, so those histories contribute little information about the blip. Check whether there are treated and untreated observations across relevant ranges of \(L\), and whether the sample denominator is small. Also inspect whether the conditional contrasts appear compatible with a common additive effect. A single pooled equation may equal zero even when stratum-specific discrepancies have opposite signs.

A common mistake is to treat a zero pooled moment as proof that every conditional moment is correct. The equation \(E[(A-e(L))U(\psi)]=0\) averages over \(L\); it can be zero through cancellation. The correction is to distinguish the model-based scalar estimating equation from the stronger conditional claim \(E[U(\psi)\mid A,L]=E[U(\psi)\mid L]\). The latter is the model implication at the true parameter, while the scalar equation is a way to estimate a common parameter under the assumed blip model.

G-estimation is not the only way to estimate a marginal treatment contrast. The parametric g-formula models outcome means and standardizes them over covariates; inverse-probability weighting reweights treatment groups using treatment probabilities. In contrast, this one-decision g-estimation equation explicitly blips down the outcome and uses the treatment-assignment residual. These approaches rely on different modeling steps, but none repairs a lack of positivity, unmeasured confounding, or a substantively incorrect target model automatically.

The method here is deliberately limited to a binary treatment at one decision and a constant additive mean blip. It does not establish that individual effects are constant, and it does not specify a model for effect modification. Its principal value is conceptual and practical: it makes the structural nested mean model estimable through a transparent conditional moment, while exposing how overlap and model specification govern the information in that moment.

Check Your Understanding

Answer each question, then compare with the short solutions.

  1. Why does the blipped-down outcome have equal conditional means across treatment groups at the true parameter?
  2. If \(e(L)=0.1\) for a covariate stratum, what is \(e(L)\{1-e(L)\}\), and what does its size indicate?
  3. Suppose the population numerator is 0.45 and the population denominator is 0.15. What is the g-estimate under the common additive blip model?
  4. Why can the crude treated-minus-untreated outcome mean fail to estimate the blip parameter?

Solutions. (1) By consistency, exchangeability, and the blip model, subtracting \(\psi_0 A\) from the observed outcome leaves conditional mean \(E[Y^0\mid L]\) in either treatment group. (2) The value is \(0.1(0.9)=0.09\), which is small and signals relatively little treatment contrast information in that stratum. (3) The ratio is \(0.45/0.15=3\). (4) The treatment groups can have different distributions of \(L\), so their crude mean difference mixes the conditional treatment contrast with covariate composition differences.

Clinical Biostats