Why the History Must Match the Decision
In a longitudinal study, treatment can be assigned more than once, and the information guiding a later decision may differ from what guided an earlier one. A patient’s current symptoms, for example, may influence a clinician’s next prescription even if those symptoms were absent at baseline. To use the g-formula for a causal question, researchers therefore need to define not just a list of covariates, but the history available before each treatment decision.
The design challenge is substantive as well as statistical: determine what information was available to the decision-maker, when it was recorded, and whether it could also be related to the outcome. A history that misses an important reason for treatment may leave treatment assignment confounded, even if the later g-formula calculation is performed correctly.
The time ordering in this definition is essential. \(L_t\) must describe information available before \(A_t\), not a measurement recorded after the decision or a consequence of \(A_t\). A baseline characteristic can be included in \(L_1\) and carried forward in the history. A covariate measured at a later visit belongs in the history for decisions after that visit, but not for decisions already made.
Sequential Exchangeability and the Role of Measurement
Sequential exchangeability says that, conditional on the measured history at each decision, treatment assignment is independent of the potential outcome under the regime being considered. In other words, among people with the same recorded pre-decision history, differences in the treatment assigned at that time should not reflect additional information that also predicts their potential outcome.
The history should include the measured factors that jointly explain why treatment is assigned and why the outcome might differ. For example, disease severity may influence both prescribing and future health. Recording severity before each decision can make exchangeability more plausible. A variable that predicts treatment but has no bearing on the potential outcome is not automatically a confounder, although it may still be useful for other design or precision reasons.
History design requires knowledge of the clinical or policy process. Ask what the decision-maker knew or could observe, what information was recorded, and what factors influenced the decision. These questions are not answered by a generic rule to “adjust for all available variables.” A large dataset can still omit the information that actually guided treatment.
Worked Example: Mapping a Two-Decision Treatment Process
Hypothetical setting. A study follows 24 adults with a chronic condition through two treatment decisions. At the first visit, clinicians consider baseline disease severity and recent symptoms before assigning \(A_1\). At the second visit, they consider updated symptoms before assigning \(A_2\). The outcome \(Y\) is measured after the second decision. Assume the study also records contraindications and prior treatment use before each decision.
For the first decision, the candidate history is \(H_1=L_1\), where \(L_1\) includes baseline severity, recent symptoms, contraindications, and prior use recorded before \(A_1\). There is no earlier study treatment in this setup, so \(\bar A_0\) is empty.
For the second decision, \(H_2=(L_1,A_1,L_2)\), where \(L_2\) includes the updated symptoms and contraindications recorded before \(A_2\). The earlier treatment \(A_1\) remains part of the history because it may influence current health and may also affect the clinician’s next decision.
To make the role of baseline severity concrete, suppose the hypothetical first-visit records show 12 people with high severity, of whom 9 receive \(A_1=1\), and 12 with lower severity, of whom 3 receive \(A_1=1\). The treatment fractions are $$ \frac{9}{12}=0.750,\qquad \frac{3}{12}=0.250. $$ The difference in observed treatment fractions shows that severity is related to treatment assignment in this toy dataset. If severity also predicts the outcome, omitting it from \(H_1\) would be a clear concern for exchangeability. These fractions do not establish exchangeability after severity is included; other decision factors may still be unmeasured.
Time-Varying Confounders Need Their Own Place in the History
A particularly important design feature is that a covariate measured before a later treatment may itself have been affected by an earlier treatment. For example, \(A_1\) may improve symptoms, and those symptoms may then influence both \(A_2\) and the final outcome. Symptoms at the second visit are thus part of \(H_2\), even though they are partly a consequence of earlier treatment.
The relevant distinction is temporal: include a covariate in the history for a treatment decision if it was measured before that decision and helps describe the assignment process. Do not treat “affected by prior treatment” as a reason to erase a genuinely pre-decision covariate from the history. The g-formula uses the evolving covariate history to represent how the population’s covariates develop under treatment regimes.
Worked Example: Including a Covariate Affected by Prior Treatment
Hypothetical setting. Consider 20 patients followed for two decisions. All have the same baseline risk profile for this illustration. \(A_1\) is assigned at the first visit. At the second visit, symptoms \(L_2\) are assessed before \(A_2\); the first treatment may have changed those symptoms. The hypothetical decision log is:
| Prior treatment \(A_1\) | Symptoms before \(A_2\) | Number of patients | Received \(A_2=1\) |
|---|---|---|---|
| 1 | High | 8 | 6 |
| 1 | Low | 4 | 1 |
| 0 | High | 4 | 2 |
| 0 | Low | 4 | 0 |
The counts sum to \(8+4+4+4=20\) patients. Within the \(A_1=1\), high-symptom history, the observed fraction receiving \(A_2=1\) is \(6/8=0.750\). Within the \(A_1=0\), high-symptom history, it is \(2/4=0.500\). For low symptoms, the corresponding fractions are \(1/4=0.250\) and \(0/4=0\).
These calculations illustrate why the proposed second-decision history must retain both \(A_1\) and \(L_2\): treatment fractions differ across the recorded histories. If symptoms also predict the potential outcome, failing to measure them before \(A_2\) would leave an important assignment factor out. Their possible dependence on \(A_1\) does not change their timing: they are measured before the second decision, so they belong in \(H_2=(L_1,A_1,L_2)\). The table alone cannot show that this history is sufficient; other factors, such as access to care or clinician judgment, could still matter.
A Practical Design Sequence
A useful design begins with the treatment decisions, not with a list of database columns. For each decision time, specify the measurement window and ask which variables were available to the person or system assigning treatment. Then consider whether each candidate factor is also relevant to the outcome under the regimes of interest.
State when \(A_t\) is assigned and when the outcome is measured. Use a timeline precise enough to distinguish pre-decision from post-decision measurements.
For each \(t\), identify clinical status, prior treatment, contraindications, preferences, access factors, and other information that could influence the decision.
Ask whether each treatment-assignment factor could also predict the potential outcome. Prioritize measuring factors that may affect both assignment and outcome.
Record whether each variable was measured before the relevant treatment, how it was measured, and whether the measurement is sufficiently informative for the decision process.
Make explicit which covariates and prior treatments are in each history. Check that no post-decision information has been placed in a pre-decision history.
This process does not require every possible predictor to be measured. It does require a defensible account of the treatment-assignment process and a clear statement of what remains uncertain. Measurements should also match the decision scale: a symptom score recorded months before a prescription may be a poor substitute for the symptoms actually considered at the visit.
Worked Example: Detecting a Missing Access Factor
Hypothetical setting. In a second-visit log, 20 patients have the same recorded disease severity, prior treatment, and symptom category. The care team also knows whether each patient has reliable transportation, but transportation was not included in the proposed history. Among 10 patients with reliable transportation, 8 receive the next treatment. Among 10 without reliable transportation, 3 receive it.
The observed treatment fractions are $$ \frac{8}{10}=0.800\quad\text{and}\quad \frac{3}{10}=0.300. $$ Thus, even within the proposed clinical history, treatment assignment differs by transportation access. If access also predicts the outcome—for example, through the ability to attend follow-up care—then the clinical history alone does not capture a plausible common cause of treatment and outcome. A defensible design would measure transportation access before the decision and consider it in \(L_2\).
This comparison is a diagnostic illustration, not a causal estimate and not proof that transportation is a confounder. It signals that the decision process may depend on information missing from the proposed history. Researchers should also ask whether the recorded transportation measure accurately captures the access information used by clinicians.
Why a Well-Designed History Matters
When sequential exchangeability is plausible, the measured histories provide the basis for relating observed conditional outcomes and covariate distributions to outcomes under specified treatment regimes. Earlier material on the g-formula develops that calculation. Here the design implication is that the calculation cannot repair a history that omits important pre-decision information: modeling observed data more flexibly does not, by itself, remove unmeasured confounding.
Histories also clarify the scientific question. If a treatment rule uses current symptoms, then the data must contain symptoms measured before each decision at a frequency that can represent that rule. If the study records symptoms only at baseline, it cannot distinguish patients with different symptom histories at later decisions, even if those later symptoms guided treatment.
No observed pattern can prove that all confounders have been measured. Exchangeability concerns potential outcomes, which are not jointly observed for each person under all possible treatment choices. Researchers therefore support the assumption through careful subject-matter reasoning, measurement planning, transparent timing, and sensitivity to plausible omitted factors.
Common Mistakes
- Using one baseline list for every decision. Later treatment may depend on new symptoms, lab results, or access conditions. Define \(H_t\) separately at each time.
- Leaving out prior treatment. Earlier treatment can shape current health and later assignment. Include \(\bar A_{t-1}\) in the later history.
- Excluding a covariate because prior treatment affected it. If it is measured before the current decision and informs that decision, it may belong in the current history. Its timing and role must be stated explicitly.
- Using information measured after the decision. A post-treatment response cannot be treated as information available before that treatment was assigned.
- Claiming exchangeability because many variables were recorded. A large covariate set does not guarantee that the reasons for treatment and outcome have been adequately captured.
Check Your Understanding
Use the timing of each decision and the possible treatment-assignment process to answer these questions.
- At what point must \(L_t\) be measured to belong in \(H_t\)?
- A symptom measure before \(A_2\) may have been changed by \(A_1\). Should it automatically be excluded from \(H_2\)? Explain.
- Give one reason why a variable that predicts treatment may still not be a confounder for the outcome.
- A clinician uses transportation access when deciding whether to prescribe treatment, and access may also affect follow-up outcomes. What measurement should be considered, and when should it be taken?
- Why can a large number of recorded covariates not prove sequential exchangeability?