Start With the Decision Times
A longitudinal data table is not merely a collection of columns measured repeatedly. Its meaning depends on when each covariate was measured relative to each treatment decision. A covariate recorded before a decision can inform that decision; a covariate recorded after an earlier treatment may also reflect that treatment. When both are true, treatment and covariate histories feed into one another over time.
Use \(A_t\) for treatment assigned at decision time \(t\), and \(L_t\) for covariates measured just before that decision. Thus \(L_0\) precedes \(A_0\); after \(A_0\), \(L_1\) is measured before \(A_1\); and so on. A terminal outcome \(Y\) is measured after the final treatment decision under study. These labels describe an ordering, not a claim that treatment actually caused a later covariate value.
The time labels matter. If a column is called “severity at visit 2,” that name alone does not tell whether the measurement occurred before or after the visit-2 treatment. The table’s timestamp, protocol, and treatment-recording convention must settle the order. If they do not, the causal role of that measurement cannot safely be read from the table.
A Reliable Table-Reading Procedure
For each treatment decision, locate the covariates measured immediately before it. Then look backward: which of those covariates were recorded after earlier treatment decisions? This two-direction check separates a covariate’s role at the current decision from its possible history as an outcome of earlier treatment.
Write down the actual order of covariate measurement, treatment assignment, and outcome measurement. Use the study protocol if the table’s labels are ambiguous.
For each \(A_t\), list \(L_t\) and any other information measured before that decision. Do not include measurements taken afterward as if they were available to the decision-maker.
For each listed covariate, ask whether it was measured after \(A_{t-1}\) or another earlier treatment. If so, it is temporally eligible to reflect that treatment, although timing alone does not prove an effect.
If a covariate may carry effects of earlier treatment while also informing later treatment, ordinary adjustment can address one part of the history while changing or blocking another. Mark the variable and the relevant treatment times explicitly.
Worked Example: Labeling Covariates at Two Decisions
A study records baseline severity \(L_0\), assigns treatment \(A_0\), measures severity again at the next visit as \(L_1\), assigns \(A_1\), and later records outcome \(Y\). The table’s columns are \(L_0,A_0,L_1,A_1,Y\). Classify each covariate relative to the decisions.
Before \(A_0\), the measured covariate is \(L_0\). It is pre-treatment for the first decision. There is no earlier study treatment in this sequence that could have affected \(L_0\).
Before \(A_1\), the recorded covariate is \(L_1\). It precedes the second decision, so it may be relevant to how \(A_1\) is assigned. It was measured after \(A_0\), so it could also reflect earlier treatment. The table alone does not show whether \(A_0\) changed severity; it identifies the timing that makes such an effect possible.
Finally, \(Y\) follows both treatment decisions in the stated order. It is an outcome measurement, not a covariate available before either decision. The feedback pattern to flag is therefore \(A_0 \rightarrow L_1 \rightarrow A_1\), with \(L_1\) potentially reflecting \(A_0\) and preceding \(A_1\).
The Temporal Rule and Its Limits
The classification can be stated precisely. Suppose the recorded order is \(L_0,A_0,L_1,A_1,\ldots,L_T,A_T,Y\), with each \(L_t\) measured before \(A_t\), and each \(L_{t+1}\) measured after \(A_t\) but before \(A_{t+1}\). Then \(L_t\), for \(t\geq1\), is temporally positioned to be both a pre-decision covariate for \(A_t\) and a post-decision measurement relative to \(A_{t-1}\).
Justification. By the ordering assumption, the measurement time of \(L_t\) is earlier than the assignment time of \(A_t\), so \(L_t\) is available before that decision. The same assumption places \(A_{t-1}\) before the measurement time of \(L_t\). A prior event cannot cause a measurement that was already recorded, but it can precede and potentially influence a later measurement. These are the two claims; neither supplies a causal effect or a statistical association without additional information. \(\square\)
This distinction prevents a common over-reading: “measured after treatment” is a temporal statement, not proof that treatment changed the covariate. Conversely, an observed association between \(A_{t-1}\) and \(L_t\) does not by itself establish that effect; other causes may contribute to both.
Worked Example: Reading a Visit-Level Table
Suppose three people have the following recorded histories. Severity is on a 0–10 scale, and treatment is coded 1 for received and 0 for not received. The protocol states that severity is measured before the treatment decision at each visit.
| Person | \(L_0\) | \(A_0\) | \(L_1\) | \(A_1\) | \(Y\) |
|---|---|---|---|---|---|
| 1 | 4 | 0 | 7 | 1 | 8 |
| 2 | 6 | 1 | 5 | 0 | 4 |
| 3 | 3 | 0 | 4 | 0 | 3 |
For person 1, \(L_0=4\) is recorded before \(A_0=0\). The later severity \(L_1=7\) is recorded after \(A_0\) and before \(A_1=1\). Thus \(L_1\) is pre-decision information for \(A_1\) and could have been affected by \(A_0\). The sequence is compatible with treatment escalation following worsening severity, but these three rows cannot establish that treatment caused the severity change or that severity caused the later treatment.
For person 2, \(L_1=5\) follows \(A_0=1\) and precedes \(A_1=0\). The lower value than baseline does not prove improvement due to treatment: individual trajectories also reflect natural variation, measurement error, and other causes. Person 3 likewise has a post-\(A_0\), pre-\(A_1\) value \(L_1=4\), even though both treatments are coded 0.
The table therefore permits a timing classification for every person, not a causal conclusion from a person’s before-and-after values. Across the data, a pattern such as \(L_1\) predicting \(A_1\) may motivate a confounding assessment, but it is not a substitute for one.
Why Ordinary Adjustment Becomes Difficult
The key warning is not that a covariate should always be included or always excluded. It is that a time-varying covariate can occupy two positions in the sequence: it may lie after an earlier treatment and before a later treatment. Adjusting for it can therefore change which portion of the earlier treatment history is represented in a comparison, while omitting it may leave later treatment related to the covariate’s prognostic information.
A small linear model makes the tension explicit. Let \(A_0\) be an initial treatment, let \(L_1\) be a later covariate, and let \(A_1\) be the next treatment. Suppose
where \(U,V,\varepsilon\) have mean zero and are independent of \(A_0\) and one another. Treat the treatment equations as a simplified assignment mechanism. Under this model, changing \(A_0\) by one unit changes the mean of \(L_1\) by \(0.5\), and changes the mean of \(A_1\) through \(L_1\) by \(0.4(0.5)=0.2\). Substituting the first two equations into the outcome equation gives
so the model’s total mean contrast for a one-unit change in \(A_0\) is \(2.2\). In contrast, conditional on \(L_1\) and \(A_1\), the outcome equation has coefficient \(1\) on \(A_0\). This follows directly from its specified conditional mean: \(E[Y\mid A_0,L_1,A_1]=A_0+A_1+2L_1\). In this model, conditioning on the later variables removes the pathways through which the initial treatment changes \(L_1\) and \(A_1\). That calculation illustrates why a coefficient from an adjusted regression need not represent the overall effect carried by the treatment history.
Worked Example: Checking the Adjustment Arithmetic
Use the model above with \(A_0=0\) versus \(A_0=1\). For \(A_0=0\), the mean of \(L_1\) is \(0\), the mean of \(A_1\) is \(0.4(0)=0\), and the mean of \(Y\) is \(0\). For \(A_0=1\), the mean of \(L_1\) is \(0.5\); the mean of \(A_1\) is \(0.4(0.5)=0.2\); and the mean of \(Y\) is
The total mean difference is \(2.2-0=2.2\). If \(L_1\) and \(A_1\) are held fixed in the conditional outcome equation, increasing \(A_0\) from 0 to 1 changes its right-hand side by exactly \(1\). The two numbers answer different questions in this specified model: the first allows later variables to change with \(A_0\), while the second holds them fixed. This is a worked illustration of the feedback warning, not a general formula for analyzing longitudinal data.
Diagnostics, Alternatives, and Limits
Before interpreting adjustment in a repeated-measures analysis, audit the table’s chronology. Check whether visit labels mean “before treatment,” “after treatment,” or simply “during visit”; whether treatment is recorded as assigned or received; and whether measurements are available before the relevant decision. For irregular visit times, use actual timestamps rather than assuming that column order equals temporal order. If a covariate’s timing cannot be resolved, report that uncertainty instead of assigning it a definite causal role.
A long-format table, with one row per person-time, makes ordering and visit-specific histories visible. A wide-format table, with one row per person and separate columns for each visit, can be easier to scan across an individual’s history. Neither format determines causal order by itself; both must be interpreted using measurement times and study procedures. A timeline or directed graph can supplement either table by displaying the candidate sequence \(A_{t-1}\), \(L_t\), \(A_t\), and later outcome.
A common mistake is to see \(L_1\) before \(A_1\) and conclude that it is simply an ordinary pre-treatment covariate. That reasoning notices its role for \(A_1\) but ignores that it was measured after \(A_0\). The correction is to state both relations: \(L_1\) precedes the later decision and follows the earlier one. A second mistake is to infer from timing alone that \(A_0\) caused \(L_1\); the correction is to distinguish a possible causal pathway from an established effect.
The table-reading exercise does not diagnose unmeasured confounding, establish exchangeability, repair measurement error, or choose a statistical method. It also cannot resolve whether recorded treatment versions are comparable or how missing visits should be handled. Its purpose is narrower and essential: to expose the time ordering that any later causal analysis must respect.
Check Your Understanding
Answer each question by stating the relevant measurement order, not merely naming a variable.
- In the sequence \(L_0,A_0,L_1,A_1,Y\), which covariate precedes \(A_1\), and which treatment occurred before that covariate was measured?
- A severity value is recorded after a treatment visit but the table does not say whether it was measured before or after treatment administration. Can it be classified as pre-treatment for that decision?
- In the linear model in this tutorial, calculate the mean of \(L_1\), the mean of \(A_1\), and the mean of \(Y\) when \(A_0=1\).
- Why can adjusting for a covariate create a different comparison from allowing it to vary with earlier treatment?
Solutions. (1) \(L_1\) precedes \(A_1\), and \(A_0\) occurred before \(L_1\) was measured; therefore \(L_1\) can be both pre-decision information for \(A_1\) and a possible consequence of \(A_0\). (2) No. The ordering relative to treatment is unresolved, so the measurement cannot safely be classified as pre-treatment without the protocol or timestamp. (3) The model gives \(E[L_1\mid A_0=1]=0.5\), \(E[A_1\mid A_0=1]=0.4(0.5)=0.2\), and \(E[Y\mid do(A_0=1)]=1+0.2+2(0.5)=2.2\). (4) If the covariate lies after earlier treatment, allowing it to vary includes pathways through it, whereas holding it fixed removes those pathways in the model calculation. The table flags this distinction but does not alone identify which comparison should answer a particular scientific question.