Tutorials › Marginal Structural Models › Cumulative Exposure And Treatment Timing In Regression

Time-Varying Treatments and Confounder Feedback · Tutorial 24 of 501

Cumulative Exposure And Treatment Timing In Regression

Distinguish total exposure from its timing, and see algebraically how a regression on cumulative dose can combine different visit-specific effects.

Intermediate 9 min read

What You'll Learn

  • Define cumulative exposure as a summary of a repeated treatment history.
  • Identify treatment schedules with equal total exposure but different timing.
  • Derive the coefficient from a regression on cumulative dose.
  • Determine when that coefficient represents a common per-dose association.
  • Compare cumulative-dose models with models that retain timing information.
  • Diagnose when a single coefficient conceals relevant schedule differences.

Why Total Exposure and Timing Are Different

A cumulative treatment measure answers a useful but limited question: how much treatment was received over a specified period? It does not necessarily tell us when that treatment was received. If effects depend on time since dose, or if doses at different visits have different associations with the outcome, two histories with the same total can correspond to different expected outcomes.

This distinction matters when a regression replaces a sequence of treatment measurements with one cumulative-exposure variable. The resulting coefficient summarizes the relationship with that chosen summary. It does not, by itself, establish that treatment timing is irrelevant or that every schedule with the same total has the same outcome. The treatment-history coding discussed in the earlier material on current, lagged, and historical treatment supplies the ingredients for making this distinction explicit.

Definition: For \(T\) treatment occasions, let \(A_t\) denote the treatment dose at occasion \(t\), for \(t=1,\ldots,T\). The treatment history is the vector \((A_1,\ldots,A_T)\). Its cumulative exposure is \(C=\sum_{t=1}^{T} A_t\). Cumulative exposure preserves the total dose but generally discards the occasion-by-occasion schedule.

For example, the histories \((1,0)\) and \((0,1)\) both have cumulative exposure 1. One assigns the dose at the first occasion, the other at the second. A model using only \(C\) treats these histories as equivalent in its treatment predictor. That equivalence is a modeling restriction, not a mathematical consequence of their equal totals.

What a Regression on Cumulative Exposure Estimates

Consider a simple outcome regression with an intercept and cumulative exposure as its only predictor. Suppose the outcome follows the linear model

$$ Y=\alpha+\sum_{t=1}^{T}\beta_t A_t+\varepsilon, $$

where the \(\beta_t\) values may differ across occasions. They represent the occasion-specific coefficients in this working model, and \(\varepsilon\) is an error term. For the derivation below, assume finite second moments, \(\operatorname{Var}(C)>0\), and \(\operatorname{Cov}(C,\varepsilon)=0\). These assumptions describe the regression calculation; they do not by themselves establish a causal interpretation.

Result: The population least-squares slope from regressing \(Y\) on an intercept and \(C\) is $$ \gamma_C=\frac{\operatorname{Cov}(C,Y)}{\operatorname{Var}(C)} =\frac{\sum_{t=1}^{T}\beta_t\operatorname{Cov}(C,A_t)}{\operatorname{Var}(C)}. $$ Thus, if occasion-specific coefficients differ, the cumulative-exposure slope combines them according to how each occasion's dose covaries with the total in the population being analyzed.

To derive the result, the population least-squares slope is the value minimizing \(E[(Y-a-\gamma C)^2]\) over \(a\) and \(\gamma\). Differentiating with respect to \(a\) gives \(a=E[Y]-\gamma E[C]\). Substituting this intercept and differentiating with respect to \(\gamma\) gives the normal equation \(\operatorname{Cov}(C,Y)-\gamma\operatorname{Var}(C)=0\). Since \(\operatorname{Var}(C)>0\), its solution is \(\gamma_C=\operatorname{Cov}(C,Y)/\operatorname{Var}(C)\).

Now substitute the outcome model. Covariance is linear in its second argument, and constants have zero covariance, so

$$ \operatorname{Cov}(C,Y) =\sum_{t=1}^{T}\beta_t\operatorname{Cov}(C,A_t) +\operatorname{Cov}(C,\varepsilon). $$

The assumed zero covariance with the error removes the final term. Dividing by \(\operatorname{Var}(C)\) proves the stated expression. The weights \(\operatorname{Cov}(C,A_t)/\operatorname{Var}(C)\) sum to 1 because \(C=\sum_t A_t\). However, they need not all be positive, so the cumulative slope is not always an ordinary weighted average lying between the smallest and largest \(\beta_t\).

Special case: If \(\beta_t=\beta\) for every occasion, then \(\sum_t\beta A_t=\beta C\), and the outcome model becomes \(Y=\alpha+\beta C+\varepsilon\). Under \(\operatorname{Cov}(C,\varepsilon)=0\), the cumulative-exposure slope is exactly \(\beta\). A common per-dose coefficient is therefore a sufficient linear-model condition for interpreting the slope as the same association at each occasion.

The converse interpretation is not justified: a fitted slope on \(C\) does not demonstrate that all \(\beta_t\) are equal. Different timing-specific coefficients can produce a single summary slope, and different treatment histories can have different residuals around that summary.

Worked Examples

Worked Example: Equal Total, Different Timing

Suppose two visits have dose indicators \(A_1,A_2\), and the expected outcome under a simple linear schedule model is \(E[Y\mid A_1,A_2]=10+3A_1+A_2\). Compare the schedules \((1,0)\) and \((0,1)\).

For \((1,0)\), cumulative exposure is \(C=1+0=1\), and the expected outcome is \(10+3(1)+1(0)=13\). For \((0,1)\), cumulative exposure is \(C=0+1=1\), and the expected outcome is \(10+3(0)+1(1)=11\).

The schedules have equal cumulative exposure but their expected outcomes differ by \(13-11=2\). A regression using only \(C\) assigns both histories the same fitted treatment contribution. It cannot represent this two-unit timing contrast without additional terms or a different coding of treatment history.

Worked Example: A Cumulative Slope Blends Visit-Specific Coefficients

Suppose the four histories \((0,0),(1,0),(0,1),(1,1)\) are equally frequent and the outcome is exactly \(Y=2A_1+A_2\). The occasion-specific coefficients are 2 and 1. Calculate the slope from a regression of \(Y\) on an intercept and \(C=A_1+A_2\).

The four \((C,Y)\) pairs are \((0,0),(1,2),(1,1),(2,3)\). Their means are \(\bar C=(0+1+1+2)/4=1\) and \(\bar Y=(0+2+1+3)/4=1.5\). The population covariance, using the equal-probability average, is

$$ \operatorname{Cov}(C,Y) =\frac{(-1)(-1.5)+(0)(0.5)+(0)(-0.5)+(1)(1.5)}{4} =0.75. $$

Similarly, \(\operatorname{Var}(C)=[(-1)^2+0^2+0^2+1^2]/4=0.5\). The slope is therefore \(0.75/0.5=1.5\). The intercept is \(\bar Y-1.5\bar C=0\). The resulting fitted values are 0, 1.5, 1.5, and 3 for the four histories; the observed outcomes are 0, 2, 1, and 3. The early-only history is above its fitted value by 0.5, while the late-only history is below by 0.5. Here the slope equals the midpoint of 2 and 1 because the design is balanced and each visit's dose has the same covariance with \(C\). That numerical equality is not a general rule.

Worked Example: Moving a Dose Changes a Timing-Weighted Total

For three visits, suppose the modeled outcome contribution is \(3A_1+2A_2+A_3\). Compare histories \((1,1,0)\) and \((0,1,1)\).

Both histories have cumulative exposure 2. The first has timing-weighted contribution \(3(1)+2(1)+1(0)=5\); the second has \(3(0)+2(1)+1(1)=3\). Moving one unit from the first visit to the third lowers this modeled contribution by \(5-3=2\), although total dose is unchanged.

If the scientific question concerns only total dose, \(C\) may be a useful summary. If the question concerns schedules or timing-specific associations, this comparison shows exactly what that summary omits. The numbers are consequences of the stated model, not a claim that these coefficients apply in every setting.

Choosing a Treatment Representation

Cumulative exposure is compact and can be appropriate when the scientific target is explicitly a total-dose association and a common per-unit linear contribution across occasions is plausible. It also reduces the number of treatment parameters. Its cost is that schedules with the same total are treated alike in the treatment component of the model.

A model with separate occasion-specific terms, such as \(\sum_t\beta_t A_t\), retains information about when doses occurred. It permits timing-specific coefficients but requires enough variation in the data to estimate them and enough observations for the chosen model. A model with prespecified weights, such as \(\sum_t w_t A_t\), is another way to summarize timing, but its interpretation depends on the weights and it still imposes a particular structure. A sufficiently detailed history representation can distinguish schedules more fully, at the cost of many parameters and potentially sparse data.

RepresentationWhat it retainsMain restriction or cost
Cumulative exposure \(C=\sum_t A_t\)Total doseHistories with equal totals share the same treatment predictor
Separate occasion terms \(A_1,\ldots,A_T\)Visit-specific dose informationRequires estimation of multiple coefficients and adequate variation
Prespecified weighted total \(\sum_t w_tA_t\)A selected timing-weighted summaryResults depend on the selected weights and still compress histories

These are choices of regression representation, not automatic solutions to confounding. In particular, a cumulative-dose coefficient should not be read as a causal effect simply because cumulative exposure is easy to interpret. The treatment assignment process, covariate history, and assumptions needed for causal interpretation remain important; a regression summary alone does not settle them.

Diagnostics and Common Pitfall

Check the exposure coding before interpreting the coefficient. List plausible histories and verify whether the coding gives the same cumulative value to schedules that the scientific question regards as meaningfully different. Then examine whether the model's residuals or fitted values systematically differ by schedule among histories with the same total. Such patterns indicate that the cumulative summary may be concealing timing information, although a diagnostic pattern alone does not identify its cause.

Also check variation and overlap. If \(C\) is constant, \(\operatorname{Var}(C)=0\), and a slope on cumulative exposure cannot be estimated. If almost all observed dose is delivered at one visit, the data provide little basis for separating occasion-specific associations. A complicated timing model cannot recover distinctions absent from the observed treatment histories.

  • Pitfall: “Both patients received two doses, so the cumulative-exposure model says their treatment contributions must be the same; therefore timing has no effect.” The first clause describes the model's restriction, not a finding about timing.
  • Correction: Equal totals imply equal values of \(C\), but do not imply equal outcomes or equal timing-specific coefficients. Compare relevant schedules, and use a representation that retains the timing distinctions required by the question.
  • Pitfall: Calling the cumulative slope the average visit effect without checking the treatment-history distribution.
  • Correction: The slope follows the covariance formula above. Its weights depend on how the visit-specific doses vary with the total, and may not be simple positive averaging weights.
Key takeaway: Cumulative exposure is a summary of treatment history, not the history itself. A single regression coefficient can represent a common per-dose association under suitable model and error assumptions; with timing-specific coefficients, it instead compresses their relationships with the observed total dose.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. For histories \((1,0,1)\) and \((0,1,1)\), calculate cumulative exposure. What timing information is lost by this summary?
  2. Under the model \(Y=\alpha+4A_1+A_2+\varepsilon\), compare the modeled treatment contributions for \((1,0)\) and \((0,1)\). Do the histories have equal cumulative exposure?
  3. State the assumptions used to derive the population slope for a regression of \(Y\) on \(C\) in this tutorial.
  4. Why is it generally incorrect to describe the cumulative-exposure slope as the unweighted average of all visit-specific coefficients?
  5. What does zero variation in cumulative exposure imply for estimating its regression slope?

Solutions. (1) Both totals are \(1+0+1=2\) and \(0+1+1=2\). The summary does not show which of the first two visits received the dose. (2) Both totals are 1. The modeled contributions are \(4(1)+1(0)=4\) and \(4(0)+1(1)=1\), a difference of 3. (3) The outcome model is linear as written, second moments are finite, \(\operatorname{Var}(C)>0\), and \(\operatorname{Cov}(C,\varepsilon)=0\). (4) The slope weights each occasion-specific coefficient according to \(\operatorname{Cov}(C,A_t)/\operatorname{Var}(C)\), which depends on the joint distribution of the doses; those weights need not be equal or all positive. (5) If \(C\) is constant, \(\operatorname{Var}(C)=0\), so the slope is not identified by variation in \(C\) and the covariance-over-variance formula is undefined.

Clinical Biostats