Why Fit Blips Across Visits?
When treatment is a dose that can vary at each visit, a useful causal question is not only whether treatment was given, but how changing the dose at one or more visits changes the outcome. In longitudinal data, that question is complicated by time-varying covariates: a covariate measured at a later visit may be affected by earlier treatment and may also help determine later dose. A structural nested mean model represents the treatment contribution at each visit with a blip function. G-estimation then uses treatment variation conditional on measured history to estimate the blip parameters.
The calculations below use two visits and doses measured in units of 10 mg. They are deliberately small, hypothetical examples that make the estimating equations visible. In an applied analysis, the histories, treatment models, uncertainty estimates, and diagnostics would need to reflect the study design and sample size.
A Two-Visit Linear Dose Model
Begin with an additive model in which the blip at each visit is linear in dose and has no history interaction:
Here \(\beta_t\) is the change in mean outcome per 10 mg at visit \(t\), under this model. For example, \(\beta_2=0.6\) means a 10 mg increase at visit 2 is associated, as a modeled causal blip, with a 0.6-unit increase in the outcome. The causal interpretation depends on the assumptions below; the coefficient is not automatically causal merely because it comes from a blip model.
For g-estimation, treatment is residualized against its measured history. Write \(m_t(H_t)=E(A_t\mid H_t)\) and \(R_t=A_t-m_t(H_t)\). The residual has conditional mean zero by construction. At visit 2, subtract the proposed visit-2 blip from the outcome. At visit 1, subtract both the visit-1 and visit-2 blips. These are the successive blipped-down outcomes:
At the correct parameter values, sequential exchangeability implies that the blipped-down outcome at each step has no remaining treatment association conditional on the history at that step. This gives the treatment-residual moment conditions
Estimation proceeds backward: estimate the last-visit blip first, then use it to remove the later treatment contribution before estimating the earlier blip. For more visits, the same logic continues from the last visit toward the first.
Worked Example: Estimating Two Visit-Specific Blips
Suppose a hypothetical analysis has two visits, with dose measured in 10 mg units and outcome measured in points. Assume the linear blip model above. After modeling each dose conditional on its measured history, the analyst obtains the following illustrative sample moment summaries: at visit 2, \(\sum R_2^2=20\) and \(\sum R_2Y=12\); at visit 1, \(\sum R_1^2=25\), \(\sum R_1Y=19\), and \(\sum R_1A_2=15\). These are hypothetical summaries, not patient data.
At visit 2, the estimating equation is \(\sum R_2(Y-\beta_2A_2)=0\). Since \(A_2=R_2+m_2(H_2)\) and the residual is orthogonal to the modeled history, the relevant residualized treatment moment is \(\sum R_2A_2=\sum R_2^2=20\). Thus:
The fitted visit-2 blip is \(0.600A_2\) outcome points. At visit 1, first remove the fitted visit-2 contribution. The visit-1 equation is \(\sum R_1(Y-\beta_1A_1-\widehat{\beta}_2A_2)=0\), with \(\sum R_1A_1=\sum R_1^2=25\). Therefore:
The fitted model is \(\widehat{\gamma}_1(A_1)=0.400A_1\) and \(\widehat{\gamma}_2(A_2)=0.600A_2\). The estimates are per 10 mg, and their units are outcome points per 10 mg. This backward calculation depends on the stated linear, additive model and the validity of the residual moments; it is not a general recipe for ignoring the histories or treatment models.
Assumptions Behind the Moment Equations
The moment equations have a causal interpretation only under substantive and modeling conditions. Sequential exchangeability requires that, at each visit, treatment is independent of the relevant future counterfactual outcomes conditional on the measured history \(H_t\). In practical terms, the history must contain the measured common causes needed to control treatment-outcome confounding at that visit. Consistency requires that the observed outcome under the treatment actually received agrees with the corresponding counterfactual outcome. Positivity requires adequate treatment variation at the histories used for the contrasts; for a continuous dose, the relevant dose range must be supported by the data rather than extrapolated far beyond it.
The blip model must also be adequate for the target question. The example assumes linear dose effects, no effect modification by history, and additivity across visits. If a dose effect varies with a measured covariate, that variation must be represented in the blip function. If the effects of doses at different visits interact, simply adding visit-specific linear blips will generally fail to represent the regime contrast. The conditional treatment mean \(m_t(H_t)\), or the conditional means of dose functions used in a nonlinear model, must also be estimated well enough for the chosen moments to be informative. Residualizing treatment does not repair unmeasured confounding or a misspecified blip model.
From Fitted Blips to a Regime Contrast
A treatment regime specifies the dose at each visit, possibly as a function of the history. For fixed doses and an additive blip model with no history modification, the mean outcome contrast between a regime \(g=(a_1,a_2)\) and the reference regime \(g_0=(0,0)\) is the sum of the two fitted blips. With effect modification or history-dependent regimes, the blips must instead be evaluated at the histories induced under each regime and averaged over the target population.
Worked Example: Comparing Two Dose Schedules
Use the estimates from the previous example. Compare a schedule of 10 mg at visit 1 and 20 mg at visit 2 with the zero-dose schedule. In the model's units, the first schedule is \((a_1,a_2)=(1,2)\).
The fitted contrast is:
Under the specified model and assumptions, this schedule has an estimated mean outcome 1.600 points higher than the zero-dose schedule in the target population. The same fitted model gives a contrast of \((0.400)(2)+(0.600)(0)=0.800\) points for 20 mg at visit 1 followed by zero at visit 2. The order matters because the visit-specific blips differ. These are model-based contrasts, not proof that changing the schedule would cause the stated difference if the assumptions fail.
Sensitivity to the Dose-Response Specification
A linear dose blip assumes that each additional 10 mg has the same effect, regardless of the dose already received. That may be a poor approximation when effects flatten, accelerate, or otherwise curve with dose. One simple sensitivity analysis compares the linear specification with a quadratic blip:
For this model, both dose and squared dose must be residualized against the measured history. Let \(Q_1=A-E(A\mid H)\) and \(Q_2=A^2-E(A^2\mid H)\). The two g-estimation moments are \(E[Q_1U(\beta,\kappa)]=0\) and \(E[Q_2U(\beta,\kappa)]=0\). In a sample, these can be written as a system involving the cross-products of the residualized dose terms. This is not equivalent to adding \(A^2\) to an ordinary outcome regression and interpreting its coefficients as causal.
Worked Example: Linear Versus Quadratic Dose Response
Consider a hypothetical single-visit sensitivity analysis, again with dose in 10 mg units and outcome in points. Suppose the residualized dose terms and blipped-down outcome yield the following moment summaries for the quadratic model:
The quadratic estimating equations are \(20\beta+10\kappa=12\) and \(10\beta+10\kappa=8\). Dividing the first equation by 10 gives \(2\beta+\kappa=1.2\); dividing the second by 10 gives \(\beta+\kappa=0.8\). Subtracting the second from the first gives \(\beta=0.4\), and then \(\kappa=0.4\). The fitted blip is therefore \(0.4A+0.4A^2\) outcome points.
At a dose of 10 mg, \(A=1\), so the quadratic model gives \(0.4(1)+0.4(1^2)=0.8\) points. At 20 mg, \(A=2\), it gives \(0.4(2)+0.4(2^2)=0.8+1.6=2.4\) points. By contrast, fitting the linear model alone to the first moment gives \(\widehat{\beta}=12/20=0.6\), predicting 0.6 points at 10 mg and 1.2 points at 20 mg. The fitted predictions differ materially at 20 mg, so conclusions about that dose are sensitive to the functional form in this hypothetical example.
This comparison is a sensitivity check, not a test that establishes the quadratic model as true. The quadratic fit uses an additional parameter and can be unstable when high doses are sparse or when the residualized dose and squared-dose terms are highly correlated. The dose range, uncertainty in the estimates, and plausibility of the curve should all be considered before interpreting the difference.
Deriving the Residual Moment
The key algebra explains why treatment residuals appear in the estimating equation. At the correct blip parameter, suppose the blipped-down outcome \(U_t(\psi)\) is conditionally independent of \(A_t\) given \(H_t\), as required by the structural model and sequential exchangeability. Then its conditional mean does not depend on the realized dose once history is fixed. Since \(E\{A_t-m_t(H_t)\mid H_t\}=0\), iterated expectation gives:
The factorization in the second line uses the stated conditional independence. The zero follows from the definition of the treatment residual. For a quadratic model, the same argument applies to each component of a residualized dose-basis vector, provided each component has conditional mean zero given the history. This justification also shows the limitation: if relevant confounders are omitted from \(H_t\), the required conditional independence need not hold, even though the residual has sample mean near zero.
Common Pitfalls and Practical Interpretation
- Reading a blip coefficient as the effect of the entire regimen. A visit-specific coefficient describes a dose change at that visit under the model. A multi-visit contrast requires evaluating and combining the relevant blips, with appropriate averaging when histories vary.
- Assuming that a residualized dose is randomized. The residual has conditional mean zero by construction; it does not guarantee absence of unmeasured confounding. That causal requirement comes from sequential exchangeability given the measured history.
- Comparing dose units inconsistently. If \(A_t\) is recorded in 10 mg units, the coefficient is per 10 mg, not per 1 mg. Squaring the dose also uses those same units, so the quadratic coefficient corresponds to the squared 10 mg scale.
- Treating a sensitivity analysis as model selection by arithmetic alone. A changed point estimate can signal important functional-form sensitivity, but it does not identify which specification is correct. Check support, uncertainty, history adjustment, and the substantive plausibility of each dose-response curve.
Continuous-dose g-estimation makes the longitudinal structure explicit: estimate later blips first, remove them from the outcome, then estimate earlier blips using treatment variation conditional on history. Regime contrasts follow from the fitted functions only when the model's structure and causal assumptions are credible. Reporting the dose scale, reference dose, history adjustment, functional form, and sensitivity of conclusions helps make that interpretation auditable.
Check Your Understanding
Use the definitions and calculations above to answer these questions.
- In the two-visit linear model, why is the visit-2 blip estimated before the visit-1 blip?
- If a fitted blip is \(0.5A_t\) and \(A_t\) is measured in 10 mg units, what does the coefficient represent in outcome units?
- Using \(\widehat{\beta}_1=0.4\) and \(\widehat{\beta}_2=0.6\), calculate the modeled contrast for the schedule \((2,1)\) versus \((0,0)\).
- Why does a treatment residual with conditional mean zero not by itself establish a causal interpretation?
- In the quadratic example, calculate the fitted blip at \(A=3\), and compare it with the linear model's prediction at that dose.