Tutorials › Marginal Structural Models › Potential Outcomes Indexed by Treatment Histories

Sequential Exchangeability, Consistency and Positivity · Tutorial 33 of 501

Potential Outcomes Indexed by Treatment Histories

Learn to index potential outcomes and time-varying covariates by treatment history, distinguish them from observed data, and express marginal targets precisely.

Intermediate 12 min read

What You'll Learn

  • Define a potential outcome for each complete treatment history.
  • Index a time-varying covariate by the treatments that precede its measurement.
  • Distinguish observed variables from their history-indexed counterfactual counterparts.
  • Count the potential outcomes represented by a collection of binary treatment histories.
  • Express a population mean and contrast for specified treatment histories.
  • Recognize when notation accidentally uses future treatment or implies unobserved outcomes are known.

Why Outcomes Need a Treatment-History Index

With a single treatment decision, a potential outcome can be indexed by the treatment assigned at that decision. In longitudinal studies, treatment is assigned repeatedly, and earlier treatment can affect covariates measured later. Those covariates can in turn be relevant to later treatment and the outcome. A potential outcome therefore needs to say which sequence of treatments is being considered, not merely whether treatment was received at one visit.

The purpose here is to establish the notation for those counterfactual quantities. It is important to keep two things separate: the outcome that is observed for a person, and the outcomes that would be observed under other treatment histories. Defining the latter does not make them observed or identify their distributions from the data.

Definition: Suppose there are \(K\) treatment decision times, indexed \(t=1,\ldots,K\). Write \(\bar a_t=(a_1,\ldots,a_t)\) for a treatment history through time \(t\), and let \(\bar a_0\) denote the empty history. The potential outcome \(Y^{\bar a_K}\) is the outcome that would occur under the complete treatment history \(\bar a_K\). The collection \(\{Y^{\bar a_K}:\bar a_K\in\mathcal A_1\times\cdots\times\mathcal A_K\}\) is the set of history-indexed potential outcomes for the endpoint.

Here \(\mathcal A_t\) is the set of possible treatment values at time \(t\). A history is an ordered sequence: \((1,0)\) and \((0,1)\) are different histories if treatment can be given at two times. The potential outcome is a random variable across the target population; for a particular individual, its value under a specified history is that individual's counterfactual outcome under that history.

We use \(L_0\) for baseline covariates, measured before the treatment decisions. Let \(L_t\) be covariates measured before treatment \(A_t\), for \(t=1,\ldots,K\). Thus \(L_t\) can be affected by treatments before time \(t\), but it precedes the treatment decision at time \(t\). The corresponding potential covariate is written \(L_t^{\bar a_{t-1}}\): it is the value of \(L_t\) under the treatment history up to, but not including, time \(t\). In particular, \(L_1^{\bar a_0}=L_1^{\emptyset}\) has no prior treatment in its index. The endpoint \(Y\), measured after the final decision, is indexed by the full history \(\bar a_K\).

Notation: A typical observed record is \(O=(L_0,L_1,A_1,L_2,A_2,\ldots,L_K,A_K,Y)\). A bar denotes a history, such as \(\bar A_t=(A_1,\ldots,A_t)\). Superscripts on \(L_t\) and \(Y\) denote potential variables under a specified treatment history; they are not powers. The observed variables \(L_t\) and \(Y\) have no such superscript.

This timing convention makes the indices interpretable. The covariate \(L_t\), measured before \(A_t\), cannot be indexed by \(A_t\) as though that decision had already occurred. By contrast, \(Y\), measured after \(A_K\), can be indexed by all \(K\) treatment decisions. These definitions establish the objects needed to formulate later assumptions; they do not themselves impose those assumptions.

Observed Values and Counterfactual Values

For each person, the data contain the treatment actually received at each time and the outcome actually recorded. The data do not contain that person's outcome under every other treatment history. Potential outcomes are defined for the histories of interest, even though only one treatment path is followed for a person.

A link between an observed outcome and a potential outcome is usually expressed through consistency: when a person's actual treatment history is \(\bar a_K\), the observed endpoint equals \(Y^{\bar a_K}\). The precise conditions and complications surrounding that link are important, but are treated separately. For now, the distinction is essential: \(Y\) is observed, while \(Y^{\bar a_K}\) is a history-specific counterfactual, and the equality is not a consequence of notation alone.

Worked Example: Four Outcomes Under Two Binary Decisions

Suppose treatment is binary at two decision times, so \(\mathcal A_1=\mathcal A_2=\{0,1\}\). There are \(2\times2=4\) complete histories: \((0,0),(0,1),(1,0),(1,1)\). For one person, suppose the potential endpoints are as follows.

History \((a_1,a_2)\)Potential outcome \(Y^{(a_1,a_2)}\)
(0, 0)4
(0, 1)6
(1, 0)7
(1, 1)8

If this person actually receives \((1,0)\), the observed treatment history is \(\bar A_2=(1,0)\), and the recorded endpoint is one number. Under consistency, that recorded number is \(Y^{(1,0)}=7\). The other three values, 4, 6, and 8, remain counterfactual for this person; they are not additional observations.

The example also shows why the order of treatment matters. The history \((0,1)\) gives endpoint 6, whereas \((1,0)\) gives 7. A notation that records only “one treated visit” would fail to distinguish these histories.

Result: With \(K\) binary treatment decisions, there are \(2^K\) complete histories and hence \(2^K\) history-indexed endpoint potential outcomes per person. With treatment sets of sizes \(m_1,\ldots,m_K\), there are \(\prod_{t=1}^K m_t\) histories.

To verify the count, at decision 1 there are \(m_1\) choices. For each such choice, there are \(m_2\) choices at decision 2, producing \(m_1m_2\) histories through time 2. Continuing this multiplication through all \(K\) decisions gives \(\prod_{t=1}^K m_t\). In the binary case each \(m_t=2\), so the count is \(2^K\). This is a count of defined counterfactual quantities, not a claim that the data reveal all of them. For example, with three binary decisions there are \(2^3=8\) histories, but a person follows only one realized history. \(\square\)

Worked Example: Indexing a Time-Varying Covariate

Consider two decisions. \(L_2\) is measured before \(A_2\), so it can depend on the first treatment \(A_1\), but not on the second decision that has not yet occurred. Suppose a person's potential values are \(L_2^{(0)}=10\) and \(L_2^{(1)}=14\). If the person received \(A_1=1\), then the observed value of \(L_2\) is 14 under the consistency link for that covariate. The value 10 describes the counterfactual covariate under \(A_1=0\).

At the same time, the endpoint can have four potential outcomes \(Y^{(0,0)},Y^{(0,1)},Y^{(1,0)},Y^{(1,1)}\), because it is measured after both decisions. Thus the covariate index is the past history \(\bar a_1\), while the endpoint index is the complete history \(\bar a_2\). Writing \(L_2^{(a_1,a_2)}\) would attach a future treatment to a measurement made before that treatment.

Population Targets Are Defined From Potential Outcomes

Once potential outcomes are defined, a population target can be described without referring to a regression coefficient. For a fixed complete history \(\bar a_K\), define the marginal mean \(\mu(\bar a_K)=E[Y^{\bar a_K}]\), provided the potential outcome is integrable, meaning \(E[|Y^{\bar a_K}|]<\infty\). A contrast between two histories, such as \(\mu(\bar a_K)-\mu(\bar a'_K)\), compares their population-average counterfactual outcomes.

“Marginal” means averaged over the target population's distribution of baseline and other characteristics, rather than conditioned on a particular covariate value. This definition identifies the target quantity, not a way to estimate it from observed data. Identification requires additional assumptions, and the equality between an observed-data quantity and this counterfactual target cannot be assumed merely because the target has been written down.

Result: If \(X\) is a baseline covariate with finitely many possible values and \(E[|Y^{\bar a_K}|]<\infty\), then $$ \mu(\bar a_K)=\sum_x E[Y^{\bar a_K}\mid X=x]P(X=x), $$ where terms with \(P(X=x)=0\) may be omitted.

Derivation. The events \(\{X=x\}\) for values with positive probability form a disjoint partition of the population. Decomposing the expectation over that partition gives $$ E[Y^{\bar a_K}] =\sum_x E\!\left[Y^{\bar a_K}\mathbf{1}\{X=x\}\right] =\sum_x E[Y^{\bar a_K}\mid X=x]P(X=x). $$ The integrability condition ensures these expectations are finite. This identity explains how a marginal counterfactual mean relates to subgroup-specific counterfactual means: each subgroup mean is weighted by that subgroup's population prevalence. It does not say that the subgroup means are observed or that they can be recovered from the observed data without further assumptions. \(\square\)

Worked Example: A Marginal Mean Across Baseline Groups

Suppose a baseline characteristic \(X\) has two values, \(0\) and \(1\), with \(P(X=0)=0.60\) and \(P(X=1)=0.40\). Under a specified complete treatment history \(\bar a_2\), suppose the counterfactual subgroup means are \(E[Y^{\bar a_2}\mid X=0]=5\) and \(E[Y^{\bar a_2}\mid X=1]=9\). The marginal mean is $$ \mu(\bar a_2)=5(0.60)+9(0.40)=3+3.6=6.6. $$

The unweighted average \((5+9)/2=7\) is not the population marginal mean because the two baseline groups are not equally prevalent. If a second history \(\bar a'_2\) had subgroup means 4 and 8, its marginal mean would be \(4(0.60)+8(0.40)=2.4+3.2=5.6\). The marginal contrast for the first history relative to the second is \(6.6-5.6=1.0\). These computations define and calculate targets from assumed counterfactual means; they do not establish that those means can be learned from observed data.

Notation Checks, Comparisons, and Limitations

This framework differs from writing one potential outcome for each treatment level at a single decision: a longitudinal endpoint distinguishes the timing and order of the full sequence. It also differs from a conditional regression coefficient. A coefficient is a feature of a specified model for observed data; \(\mu(\bar a_K)\) is a population mean defined under a specified treatment history. The two quantities need not be the same.

Before using history-indexed notation, check the timing of each measurement and the scope of each index. A covariate measured before decision \(t\) receives only the history through \(t-1\); an endpoint measured after decision \(K\) receives the history through \(K\). The observed record and the potential variables should also be labelled separately. This discipline prevents a notation error from being mistaken for a causal assumption.

  • Potential outcomes are not observed outcomes. Writing \(Y^{\bar a_K}\) defines a counterfactual quantity; it does not reveal its value for each person.
  • More potential outcomes do not mean more observed information. A person supplies one realized treatment path and one observed endpoint, not a table of endpoints under all paths.
  • History order matters. Two sequences with the same number of treated visits can be different interventions and can have different potential outcomes.
  • Notation does not guarantee well-defined interventions or identify effects. The meaning of treatment values, consistency, exchangeability, and positivity require separate conditions.

A common mistake is to treat \(Y^{(1,0)}\) as though it were the observed outcome whenever a person's data show “one treated visit.” That reasoning discards time order: a person treated at the first visit and not the second has history \((1,0)\), while someone untreated first and treated second has history \((0,1)\). The correction is to record the complete ordered history and link the observed endpoint to its matching potential outcome only under the appropriate consistency condition.

These definitions also have limitations. They do not specify how treatment versions within a recorded category are handled, which treatment histories are feasible, or which assumptions connect counterfactual distributions to observed-data distributions. Those are substantive and statistical questions, not consequences of the indexing scheme. The notation's value is that it makes the target and the required assumptions explicit enough to discuss without confusing counterfactual definitions with observed evidence.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. With three binary treatment decisions, how many endpoint potential outcomes are indexed by complete treatment histories?
  2. There are two decision times. Why is \(L_2^{(a_1)}\) the appropriate index for a covariate measured before \(A_2\), rather than \(L_2^{(a_1,a_2)}\)?
  3. For two treatment histories, the observed data contain an endpoint of 12 for a person who received \((0,1)\). Does that alone reveal the person's value of \(Y^{(1,0)}\)? Explain.
  4. A binary baseline covariate has prevalence \(P(X=0)=0.75\), and the counterfactual subgroup means under a fixed history are 2 for \(X=0\) and 10 for \(X=1\). Calculate the marginal mean.
  5. What is the difference between \(\mu(\bar a_K)\) and an observed-data regression coefficient?

Solutions. (1) There are \(2^3=8\) histories, hence eight indexed endpoint potential outcomes. (2) \(L_2\) is measured before the second decision, so its treatment history includes only the prior treatment \(a_1\). (3) No. The observed endpoint is linked, under consistency, to \(Y^{(0,1)}\); it does not give the person's counterfactual value under \((1,0)\). (4) The marginal mean is \(2(0.75)+10(0.25)=1.5+2.5=4\). (5) \(\mu(\bar a_K)\) is the population mean of the potential outcome under a specified complete history, whereas a regression coefficient is a parameter of a model for observed data. They are distinct quantities and need not coincide.

Clinical Biostats