Tutorials › Causal Inference › Nested Counterfactual Outcomes For Treatment Histories

Structural Nested Models and G-Estimation · Tutorial 754 of 972

Nested Counterfactual Outcomes For Treatment Histories

Learn how treatment-history potential outcomes are indexed, how a one-time treatment contrast holds the rest of a history fixed, and when a counterfactual is genuinely nested.

Advanced 12 min read

What You'll Learn

  • Define potential covariates and outcomes under longitudinal treatment histories.
  • Distinguish history-indexed potential outcomes from counterfactuals with counterfactual-valued arguments.
  • Interpret a treatment contrast that changes one visit’s treatment while fixing the rest of the history.
  • Evaluate nested outcomes in which a later treatment rule uses a covariate under a specified counterfactual history.
  • Recognize why these potential outcomes alone do not identify causal effects from observed data.

Why Treatment Histories Need Precise Notation

With repeated treatment, an outcome can depend on the full sequence of decisions, not just on the treatment received at the final visit. A potential outcome must therefore specify the treatment history being considered. It is also important to distinguish that history-indexed potential outcome from a formally nested counterfactual, whose argument is itself a counterfactual quantity. The distinction clarifies what is being compared when one treatment changes and the rest of the history is held fixed.

Consider treatment at visits \(1,\ldots,K\). Write \(A_t\) for treatment at visit \(t\), and let \(L_{t+1}\) denote covariates measured after treatment \(A_t\) and before the next treatment. The timing matters: a covariate measured after treatment may itself depend on earlier treatment.

Definition: A treatment history through visit \(t\) is \(\bar a_t=(a_1,\ldots,a_t)\); a complete treatment history is \(\bar a_K=(a_1,\ldots,a_K)\). The potential covariate \(L_{t+1}(\bar a_t)\) is the value of \(L_{t+1}\) that would occur under history \(\bar a_t\). The potential outcome \(Y(\bar a_K)\) is the outcome that would occur under the complete history \(\bar a_K\). These are history-indexed potential outcomes. Their arguments are treatment values, not other counterfactual quantities.

For example, \(Y(1,0)\) means the outcome under treatment at visit 1 and no treatment at visit 2. It does not mean the outcome for someone who happened to receive that history, nor does its notation alone assert that the outcome is observable. Similarly, \(L_2(1)\) denotes the covariate value that would follow treatment \(A_1=1\). It is part of the potential covariate trajectory under that history.

A standard interpretation presumes that the treatment interventions are sufficiently well specified to define their potential outcomes. For example, if “treated” combines materially different versions of treatment, the potential outcome for that label may be ambiguous. For a given person, potential outcomes under different histories can differ, but only the outcome under the person’s received history is observed. This notation defines causal quantities; it does not by itself show that they can be identified from observed data.

Changing One Treatment While Fixing the Rest

To isolate the contrast associated with treatment at visit \(t\), hold the previous treatment history and the later treatment sequence fixed. For two possible treatments \(a_t\) and \(a'_t\), the individual-level contrast is \(Y(\bar a_{t-1},a_t,\underline a_{t+1:K})-Y(\bar a_{t-1},a'_t,\underline a_{t+1:K})\). Here \(\underline a_{t+1:K}\) denotes the same specified sequence of treatments after visit \(t\) in both potential outcomes. A contrast of this kind is often called a treatment blip in structural nested models.

The contrast is specific to the history held fixed. It need not be the same for different previous histories or different later treatment sequences. In particular, “the effect of treatment at visit \(t\)” does not name a unique quantity until the comparison treatments and the fixed histories are stated. An average blip can be defined by averaging these individual contrasts over a specified population or subgroup, but that averaging does not change which counterfactual outcomes are being contrasted.

Worked Example: Reading a Two-Visit History

Suppose the following table gives hypothetical potential outcomes and covariate values for one person. The covariate \(L_2\) is measured between the two treatment visits.

History \((A_1,A_2)\)\(L_2(A_1)\)\(Y(A_1,A_2)\), outcome units
(0, 0)410
(0, 1)414
(1, 0)713
(1, 1)719

The covariate value depends on the first treatment in this hypothetical table: \(L_2(0)=4\) and \(L_2(1)=7\). At the fixed first treatment \(A_1=1\), the contrast for changing the second treatment from 0 to 1 is

$$ Y(1,1)-Y(1,0)=19-13=6 $$

Thus, for this person, the potential outcome under history \((1,1)\) is 6 outcome units greater than under \((1,0)\). This is a contrast between two specified potential outcomes, not an estimate from observed data. The table also gives a different contrast when the first treatment is fixed at 0:

$$ Y(0,1)-Y(0,0)=14-10=4 $$

The two contrasts differ, so this hypothetical person’s treatment contrast at visit 2 depends on the first treatment history. The example illustrates why stating the fixed history is part of defining the causal quantity.

What “Nested Counterfactual” Means

In strict usage, a nested counterfactual has a counterfactual quantity inside the argument of another counterfactual. The expression \(L_2(a_1')\) by itself is a history-indexed potential covariate, not a formally nested counterfactual. But if a later treatment is assigned by a rule that takes this counterfactual covariate as input, the resulting outcome has a counterfactual-valued argument.

Definition: Let \(d_2(l)\) be a specified rule that assigns a treatment at visit 2 based on covariate value \(l\). The expression \(Y(a_1,d_2(L_2(a_1')))\) is a nested counterfactual: the treatment argument for the outcome is determined by applying \(d_2\) to the covariate that would occur under the counterfactual first treatment \(a_1'\). The first argument of \(Y\) and the history used to generate \(L_2\) can differ, so the expression can combine counterfactual quantities from different treatment histories.

This composition is not merely another way to write \(Y(a_1,a_2)\) with a fixed numerical \(a_2\). The later treatment is selected using a counterfactual covariate value. Thus, the nested expression asks what the outcome would be under the first treatment \(a_1\) and a later treatment chosen by \(d_2\) using the covariate that would have arisen under \(a_1'\). It may involve quantities that cannot all be observed for the same person.

Worked Example: Evaluating a Nested Counterfactual

Use the hypothetical values in the preceding table, and define the visit-2 rule \(d_2(l)=1\) if \(l\) is at least 6, and \(d_2(l)=0\) otherwise. Consider \(Y(0,d_2(L_2(1)))\). First evaluate the covariate under the history specified inside the argument:

$$ L_2(1)=7,\qquad d_2(L_2(1))=d_2(7)=1. $$

Then evaluate the outcome under first treatment 0 and second treatment 1:

$$ Y(0,d_2(L_2(1)))=Y(0,1)=14. $$

For comparison, using the covariate under first treatment 0 gives

$$ L_2(0)=4,\qquad d_2(L_2(0))=d_2(4)=0,\qquad Y(0,d_2(L_2(0)))=Y(0,0)=10. $$

The difference between these nested counterfactuals is \(14-10=4\) outcome units. The first treatment supplied directly to \(Y\) is fixed at 0 in both quantities; what changes is the covariate history used to choose the second treatment. This is a formally nested comparison, and not simply the effect of changing \(A_1\) while fixing \(A_2\).

A Simple Decomposition of History Contrasts

A contrast between two complete treatment histories can be decomposed into successive contrasts that change one treatment at a time. This is an algebraic identity: it does not require an additive causal model, independence assumptions, or a claim that any component is identified from data. For two visits, add and subtract the intermediate potential outcome \(Y(a_1',a_2)\):

$$ \begin{aligned} Y(a_1,a_2)-Y(a_1',a_2') &=\{Y(a_1,a_2)-Y(a_1',a_2)\}\\ &\quad+\{Y(a_1',a_2)-Y(a_1',a_2')\}. \end{aligned} $$

The first bracket changes visit-1 treatment while holding visit-2 treatment at \(a_2\). The second changes visit-2 treatment while holding visit-1 treatment at \(a_1'\). Adding the two brackets cancels \(Y(a_1',a_2)\), leaving exactly the original history contrast. This derivation shows why one-time contrasts are useful building blocks, while also making clear that their values depend on the histories held fixed.

With more visits, one can insert intermediate histories that replace one treatment at a time and sum the resulting contrasts. The decomposition remains algebraically valid when the same intermediate histories are used in the terms. It does not imply that a total effect is constant across treatment sequences or that each component has a universal interpretation independent of its fixed history.

What the Notation Does—and Does Not—Establish

Potential outcomes make a causal question precise, but defining a quantity is different from identifying or estimating it. For example, the contrast \(Y(\bar a_{t-1},a_t,\underline a_{t+1:K})-Y(\bar a_{t-1},a'_t,\underline a_{t+1:K})\) refers to outcomes under two histories for the same person. Ordinarily, only one of those histories is observed. Additional assumptions and methods are needed to relate observed data to such contrasts.

The same caution applies even more strongly to nested counterfactuals. An expression such as \(Y(0,d_2(L_2(1)))\) combines an outcome under one treatment history with a covariate under another. Its notation defines the target quantity, but does not guarantee that the observed data identify it. Questions about the assumptions needed for identification are distinct from the task of defining the counterfactual.

In structural nested mean models, treatment blips are often defined by comparing treatment at one time while setting later treatments to a specified reference sequence, commonly no treatment. That is one particular choice of the fixed later history, not a requirement built into the definition of a history-indexed potential outcome. The later sequence can instead be another specified sequence, provided the comparison is clearly stated.

Common Mistakes

  • Calling every history-indexed potential outcome “nested.” \(L_2(a_1)\) and \(Y(a_1,a_2)\) are indexed by treatment values. Reserve “formally nested” for an expression such as \(Y(a_1,d_2(L_2(a_1')))\), where a counterfactual quantity appears inside another counterfactual’s argument.
  • Changing more than one part of a history without noticing. A contrast \(Y(1,1)-Y(0,0)\) changes both visits. It is not the visit-2 contrast at a fixed visit-1 history; that contrast would compare \(Y(a_1,1)\) with \(Y(a_1,0)\) for the same \(a_1\).
  • Leaving the later treatment unspecified. A one-time treatment contrast in a longitudinal setting must state which later sequence is held fixed, or specify a rule that determines it.
  • Treating a defined counterfactual as an identified effect. Potential-outcome notation defines the target. It does not show that both potential outcomes are observed, or that their contrast can be recovered from the observed data.
Key takeaway: A longitudinal potential outcome is indexed by a treatment history. A one-time treatment contrast changes one treatment while keeping the remaining history fixed. A counterfactual is formally nested only when a counterfactual quantity, such as a history-indexed covariate, is used as an argument in another counterfactual.

Check Your Understanding

Answer each question by stating the treatment history or counterfactual argument precisely.

  1. In a three-visit study, write the potential outcome under treatment at visits 1 and 3 but not visit 2.
  2. What is the difference between \(L_2(1)\) and \(Y(1,0)\) in terms of what each quantity represents?
  3. Write a contrast that changes treatment at visit 2 while holding treatment at visit 1 and visit 3 fixed.
  4. Explain why \(Y(0,d_2(L_2(1)))\) is formally nested, whereas \(L_2(1)\) alone is not.
  5. For the two-visit table in the worked example, calculate the visit-2 contrast when \(A_1=1\). State the units and the fixed history.
  6. Does defining \(Y(\bar a_K)\) imply that its value can be identified from observed data? Explain briefly.
Clinical Biostats