Tutorials › Marginal Structural Models › Diagnostics for Blip-Function Misspecification

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

Diagnostics for Blip-Function Misspecification

Use extra treatment-residual moments and subgroup-specific checks to diagnose blip-function misspecification while distinguishing evidence against the blip form from evidence against the assumptions behind g-estimation.

Advanced 12 min read

What You'll Learn

  • Define diagnostic moments using treatment residuals and blipped-down outcomes.
  • Derive how subgroup contrasts expose omitted effect modification.
  • Use extra instruments to test restrictions not imposed during fitting.
  • Interpret a Wald test for overidentifying restrictions under its regularity conditions.
  • Recognize why a failed diagnostic does not uniquely identify the source of model failure.

Why Diagnose the Blip Function?

A fitted structural nested mean model (SNMM) can satisfy the moment equations used to estimate its blip parameters and still represent treatment effects poorly. This can happen when the fitted blip function omits effect modification, uses an incorrect functional form, or imposes an inappropriate restriction across treatment times. Diagnostics therefore ask whether the fitted model also satisfies additional implications that were not used to fit it.

The central tool is the treatment residual: observed treatment minus its conditional expectation given the treatment history. Multiplying a blipped-down outcome by this residual produces a moment that should average to zero when the blip function and the identifying assumptions are adequate. Extra history-dependent multipliers and subgroup indicators make the check more targeted.

Diagnostic Moments

Let \(A_t\) denote treatment at decision time \(t\), and let \(H_t\) denote the measured history available just before that decision. Write \(p_t(H_t)=E[A_t\mid H_t]\). For binary treatment, this is the conditional probability of treatment. Let \(Y\) be the outcome and let \(\gamma_k(H_k,A_k;\psi)\) be the proposed blip at time \(k\), indexed by parameter \(\psi\). For a terminal-outcome additive SNMM, define the fully blipped-down outcome

$$ U(\psi)=Y-\sum_{k=1}^{K}\gamma_k(H_k,A_k;\psi). $$

The subtraction removes the modeled treatment contributions. At the true parameter \(\psi_0\), the resulting quantity represents the outcome with the modeled blips removed. Under sequential exchangeability and a correctly specified blip structure, treatment at time \(t\) is conditionally unassociated with this blipped-down outcome given \(H_t\). Consequently, the residualized-treatment moment is zero.

Definition: A residualized-treatment diagnostic moment at time \(t\) is \(E[(A_t-p_t(H_t))U(\psi)q_t(H_t)]\), where \(q_t(H_t)\) is a specified function of the observed history. The basic g-estimation moments use chosen functions \(q_t\); diagnostics use additional functions, subgroup indicators, or other history features not required to fit the model.

This diagnostic has an important qualification: a zero moment is not guaranteed by the blip form alone. It also depends on the treatment-residual construction and the assumptions that justify g-estimation. In interpreting a failure as evidence against the blip function, one must regard the treatment model and identifying assumptions as credible. The diagnostic does not, by itself, identify which assumption failed.

What a Subgroup Contrast Measures

The clearest calculation is for one binary treatment decision. Suppose the true conditional mean treatment effect is \(\tau(H)\), so that \(E[Y\mid A,H]=m(H)+A\tau(H)\). Suppose the fitted model uses a constant blip \(\psi\), giving \(U(\psi)=Y-A\psi\). Assume treatment has probability \(p(H)\) conditional on history and that the mean-zero outcome error has conditional mean zero given \(A,H\).

$$ \begin{aligned} E[(A-p(H))U(\psi)\mid H] &=E[(A-p(H))(m(H)+A\tau(H)-A\psi)\mid H]\\ &=(\tau(H)-\psi)E[(A-p(H))A\mid H]\\ &=p(H)\{1-p(H)\}\{\tau(H)-\psi\}. \end{aligned} $$

The baseline term disappears because \(E[A-p(H)\mid H]=0\). For binary \(A\), \(E[(A-p)A\mid H]=p-p^2\). Thus, in histories where treatment varies, the residualized moment tracks the difference between the true effect and the fitted blip. If a subgroup indicator \(q(H)\) selects a region of history, its moment averages this discrepancy within that region, weighted by \(p(H)\{1-p(H)\}\).

Result: Under the assumptions in the calculation above, if \(0<p(H)<1\), a zero conditional residualized-treatment moment implies \(\tau(H)=\psi\) at that history. A zero unconditional moment is weaker: positive and negative discrepancies in different histories can cancel.

Worked Example: Finding Omitted Effect Modification

Let \(H\) identify two equally common subgroups, 0 and 1. In both groups, \(P(A=1\mid H)=0.5\). Suppose the true effects are \(\tau(0)=1\) and \(\tau(1)=2\), but the fitted model uses one constant blip \(\psi\). Find the constant selected by the overall moment and calculate the subgroup moments.

For each subgroup, the conditional moment is \(0.5(1-0.5)\{\tau(h)-\psi\}=0.25\{\tau(h)-\psi\}\). The overall moment is the equally weighted average: \(0.5[0.25(1-\psi)+0.25(2-\psi)]=0\). Solving gives \(\psi=1.5\).

At that fitted value, the subgroup-0 moment is \(0.25(1-1.5)=-0.125\), while the subgroup-1 moment is \(0.25(2-1.5)=0.125\). They cancel in the overall moment, which is zero, but the subgroup moments are not zero. The constant blip matches neither subgroup effect; an overall fit alone concealed the omitted effect modification.

Extra Moments and Overidentifying Restrictions

In practice, one estimates \(\psi\) using a chosen set of moments, then evaluates extra moments at \(\hat\psi\). For instance, if fitting uses \(q(H)=1\), diagnostic choices might include subgroup indicators, \(H\) itself, or nonlinear functions of a continuous history variable. These extra conditions are called overidentifying restrictions: the fitted parameter is already determined by the fitting equations, so the additional moments are checks rather than further equations used to define that fit.

A formal test requires regularity conditions. Suppose the fitted estimator is consistent under the null, the extra sample moments have a joint asymptotic normal distribution after accounting for estimation of \(\psi\), and their covariance matrix \(V\) is finite and positive definite. Let \(\bar g_{\mathrm{extra}}(\hat\psi)\) be the vector of extra sample moments, and let \(\hat V\) consistently estimate the covariance of their scaled, centered vector. Then the Wald statistic is

$$ W=n\,\bar g_{\mathrm{extra}}(\hat\psi)^\mathsf{T} \hat V^{-1}\bar g_{\mathrm{extra}}(\hat\psi). $$

Under the null that all the extra restrictions hold, \(W\) converges in distribution to a chi-square random variable with degrees of freedom equal to the number of extra restrictions. This version assumes the extra moments are used as checks after fitting; \(\hat V\) must incorporate the effect of estimating \(\psi\), not treat it as known.

To see the result, write \(Z_n=\sqrt n\,\bar g_{\mathrm{extra}}(\hat\psi)\). By the stated asymptotic normality, \(Z_n\xrightarrow{d}N(0,V)\), and consistency gives \(\hat V\xrightarrow{p}V\). If \(V\) is positive definite, the continuous mapping theorem and Slutsky’s theorem yield \(Z_n^\mathsf{T}\hat V^{-1}Z_n\xrightarrow{d}Z^\mathsf{T}V^{-1}Z\), where \(Z\sim N(0,V)\). The quadratic form on the right has a chi-square distribution with dimension equal to the number of extra moments. Since \(W=Z_n^\mathsf{T}\hat V^{-1}Z_n\), the claimed limit follows. \(\square\)

In finite samples, the covariance estimate should reflect the sampling design and any clustering, and it should account for fitting the blip parameters. A large test statistic is evidence that the tested restrictions do not jointly fit the data under the working assumptions. It is not a direct estimate of how large the blip misspecification is, nor does it say which extra moment caused the rejection.

Worked Example: An Overidentifying Restriction Detects a Misspecified Blip

Let \(X\) equal \(-1\) or \(1\) with equal probability, let \(P(A=1\mid X)=0.5\), and suppose \(Y=A(1+X)+\varepsilon\), where \(E[\varepsilon\mid A,X]=0\). Fit a constant blip \(\psi\). Use \(q=1\) to fit and \(q=X\) as an extra diagnostic.

The fitting moment is \(E[(A-0.5)(Y-A\psi)]=0\). Since the true conditional effect is \(1+X\), the moment is \(0.25E[1+X-\psi]\). Because \(E[X]=0\), this equals \(0.25(1-\psi)\), so the fitted population value is \(\psi=1\).

At \(\psi=1\), the extra moment is \(E[(A-0.5)X\{Y-A\}]\). The conditional mean of \(Y-A\), given \(A,X\), is \(AX\). Thus the moment is \(E[(A-0.5)AX^2]\). Since \(X^2=1\) and \(E[(A-0.5)A]=0.25\), the extra moment is \(0.25\), not zero. The overall fitting moment is satisfied, but the \(X\)-weighted restriction exposes the varying effect.

Worked Example: Interpreting a Wald Diagnostic

Suppose two extra moments have sample vector \((0.04,0.03)^\mathsf{T}\), sample size \(n=200\), and estimated covariance matrix \(\hat V=\begin{pmatrix}0.25&0\\0&0.25\end{pmatrix}\). Calculate the Wald statistic and describe the result.

The inverse covariance is \(\hat V^{-1}=\begin{pmatrix}4&0\\0&4\end{pmatrix}\). Therefore \(W=200[4(0.04^2)+4(0.03^2)]=200[4(0.0016+0.0009)]=200(0.01)=2\). Under the null and the stated large-sample conditions, compare this to a chi-square distribution with 2 degrees of freedom. Its upper-tail probability is approximately \(0.368\), so this diagnostic does not reject at conventional significance levels. This is not proof of correct specification: the test may have limited power, and its conclusion relies on the assumptions used to form the moments and covariance estimate.

Diagnostics, Comparisons, and Limitations

Subgroup moments and overidentification tests serve related but different purposes. A subgroup contrast localizes a discrepancy by asking whether the residual moment is near zero in a specified region of history. An omnibus Wald test combines several extra restrictions into one assessment. The subgroup approach can be easier to interpret, but testing many groups raises multiplicity concerns and small subgroups can yield imprecise moments. An omnibus test can summarize evidence efficiently, but rejection does not identify which restriction failed.

A practical diagnostic sequence is:

1
Fit the proposed blip model.
Estimate its parameters using the selected g-estimation moments and the specified treatment probabilities.
2
Construct additional checks.
Choose history functions or subgroup indicators that target plausible omissions, such as effect modification or curvature.
3
Evaluate and quantify uncertainty.
Calculate extra residualized-treatment moments at the fitted parameter and use standard errors or a joint test that accounts for estimation.
4
Interpret the pattern, not just a p-value.
Look at which histories contribute, the moment signs, treatment variation, and whether conclusions are stable under reasonable diagnostic choices.

A near-zero moment can be uninformative where treatment is nearly deterministic: for binary treatment, the weight \(p(H)\{1-p(H)\}\) is then small even if the fitted effect is wrong. Conversely, a large moment can reflect a poor treatment-probability model or a failure of sequential exchangeability, as well as an inadequate blip. Residualizing treatment is essential to the intended moment, but does not guarantee the residuals are correctly modeled.

The main alternative is to compare richer blip specifications directly—for example, add a prespecified interaction and examine its estimate and uncertainty. Such comparisons can make a particular departure interpretable, while extra-moment diagnostics can probe several implications without selecting one expanded model in advance. Neither approach removes the need for scientific judgment: testing many candidate functions can produce chance findings, and an untested form of misspecification may remain.

Common Pitfall

Common mistake: “The g-estimation equation used for fitting is zero, so the blip function must be correct.” The fitting equation is zero by construction (or approximately so in a sample) and only checks the restrictions used to obtain the estimate. The correction is to evaluate additional, substantively chosen moments and to interpret them under the treatment and exchangeability assumptions. Even then, non-rejection is not confirmation, and rejection does not uniquely diagnose blip misspecification.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. For binary treatment with \(P(A=1\mid H)=0.3\), what factor multiplies \(\tau(H)-\psi\) in the conditional residualized moment?
  2. Why can a zero overall moment conceal a misspecified constant blip?
  3. What does a subgroup indicator contribute to a diagnostic moment?
  4. Under what conditions is a Wald test based on extra moments approximately chi-square?
  5. If an extra moment is nonzero, does that establish blip-function misspecification? Explain.

Solutions. (1) The factor is \(0.3(1-0.3)=0.21\). (2) Positive and negative discrepancies across histories can cancel when averaged. (3) It restricts or weights the check to a particular history-defined subgroup. (4) The null moments must be jointly asymptotically normal, their covariance must be consistently estimated and nonsingular, and parameter estimation must be accounted for. (5) No. It is evidence against the restriction under the working assumptions, but treatment-model error or failure of an identifying assumption can also produce a nonzero moment.

Clinical Biostats