Why the Coefficient Is Not the Whole Contrast
In a longitudinal study, a regression can include both treatment and an evolving covariate. The treatment coefficient then describes a comparison made at fixed values of the included covariates, under the model’s assumptions. But a population-level treatment-history contrast compares mean outcomes across histories, allowing the covariate distribution to differ between those histories. These are different comparisons whenever treatment history changes the distribution of an evolving covariate that predicts the outcome.
This distinction is especially important when an evolving covariate is affected by earlier treatment and also predicts later treatment or the outcome. Adjusting for it may be necessary for a conditional regression description, but its coefficient does not automatically equal the population effect of following one treatment history rather than another. The earlier material on treatment-history effects motivates the population comparison; here the focus is on what the regression coefficient does and does not represent.
For the calculations below, write \(m(a,l)=E[Y\mid A=a,L=l]\) for a conditional mean in an illustrative model, and let \(F_a\) denote the distribution of \(L\) under the specified history with treatment value \(a\). When discussing a population-level contrast, assume the model and these distributions describe the outcomes and covariate values under the histories being compared. This is an algebraic comparison, not a claim that an observed regression alone identifies a causal effect. Causal interpretation requires appropriate design and identification assumptions.
A Linear Decomposition
First consider a binary treatment \(A\), an evolving covariate \(L\), and a correctly specified additive conditional mean:
Assume \(Y\) and \(L\) have finite means under each history. The conditional treatment contrast at a fixed \(l\) is \(\beta_A\). The population mean under history \(a\), however, averages the conditional mean over the distribution of \(L\) under that history.
The integral exists because the stated means are finite. Subtracting the two population means gives the following result.
Proof. By the model and finite means,
Subtracting the second equality from the first proves the result. \(\square\)
The formula makes the conditions for equality explicit. The population contrast equals \(\beta_A\) if \(\beta_L=0\), if the mean of \(L\) is the same under both histories, or if the product of the two terms is zero. In more complicated models, equality may require further conditions; it should not be assumed simply because the fitted model is linear.
Worked Example: A Conditional Coefficient and a History Contrast
Suppose the conditional mean is
Here \(A_1\) is coded 0 or 1, and \(A_2\) is a dose coded 0 or 2. Under the history \((A_1,A_2)=(0,0)\), suppose \(L_1=0\). Under the history \((A_1,A_2)=(1,2)\), suppose \(L_1=2\). Calculate the modelled means and contrast.
For the first history, substitute \(a_1=0\), \(l=0\), and \(a_2=0\):
For the second history:
Therefore the population-level history contrast is \(17-5=12\). The coefficient of \(A_1\), namely 2, is not this contrast. It is the modelled change associated with changing \(A_1\) from 0 to 1 while holding \(L_1\) and \(A_2\) fixed. The history comparison changes all three quantities: the \(A_1\) term contributes 2, the \(L_1\) term contributes 6, and the \(A_2\) term contributes 4. Their sum is \(2+6+4=12\).
Why Averaging the Conditional Mean Matters
The previous calculation used fixed covariate values. More generally, \(L\) can vary within each history. The population mean is obtained by averaging the conditional mean over the history-specific distribution, not by evaluating the regression at one convenient value of \(L\). The next result states the calculation for a linear model that allows treatment-effect modification.
Proof. Averaging the conditional mean under \(A=1\) gives
Under \(A=0\), the interaction term is zero, so
Subtracting yields \(\beta_A+\beta_{AL}E[L\mid 1]+\beta_L\{E[L\mid 1]-E[L\mid 0]\}\), as claimed. Each expectation is finite by assumption, so these averages and their subtraction are well-defined. \(\square\)
Worked Example: Covariate Distributions Change the Contrast
Let \(L\) be binary, and suppose the conditional mean is \(E[Y\mid A=a,L=l]=10+2a+4l\). Suppose \(P(L=1\mid A=0)=0.25\) and \(P(L=1\mid A=1)=0.75\), with the distributions understood as those associated with the histories being compared. Compute the conditional treatment contrast and the population contrast.
At either fixed value of \(L\), changing \(A\) from 0 to 1 adds 2 to the conditional mean:
Since \(L\) is binary, its mean equals its probability of being 1. The population mean under history 0 is
The population mean under history 1 is
The population contrast is \(15-11=4\), not 2. The extra 2 comes from the difference in covariate means: \(4(0.75-0.25)=2\). This example does not show that the conditional coefficient is incorrectly calculated; it shows that the coefficient and the population contrast answer different questions.
Worked Example: Treatment-Effect Modification
Suppose \(L\) is binary and the conditional mean is \(E[Y\mid A=a,L=l]=3+2a+5l+4al\). Let \(P(L=1\mid A=0)=0.25\) and \(P(L=1\mid A=1)=0.75\). Find the conditional treatment contrasts at each \(L\), then calculate the population contrast.
At \(L=0\), the conditional means are 3 for \(A=0\) and \(3+2=5\) for \(A=1\), so the contrast is \(5-3=2\). At \(L=1\), they are \(3+5=8\) for \(A=0\) and \(3+2+5+4=14\) for \(A=1\), so the contrast is \(14-8=6\). The conditional treatment effect therefore varies with \(L\).
Average separately under the two history-specific distributions:
Thus the population contrast is \(11.75-4.25=7.5\). It is neither the conditional contrast at \(L=0\) (2) nor the conditional contrast at \(L=1\) (6). The calculation averages the outcome model over different covariate distributions and includes treatment-effect modification.
Interpretation, Diagnostics, and Alternatives
A conditional coefficient is a useful description when the question is explicitly conditional: for example, how the modelled mean differs between treatment values at the same specified covariate values. It is not automatically the answer to a population question about two histories. Before assigning an interpretation, identify the comparison, the covariates being held fixed, and the distribution over which any population mean is averaged.
Several checks help reveal when a conditional coefficient is being mistaken for a marginal effect:
- Write down the target contrast. If the target compares treatment histories, list every treatment component that changes. A coefficient for one term does not include changes in other history components.
- Inspect which covariates are evolving. If an evolving covariate predicts the outcome and its distribution differs across histories, its contribution may change the population contrast.
- Check for interactions. A treatment-by-covariate interaction means the conditional treatment contrast varies across covariate values. A single coefficient then does not describe every stratum.
- State the averaging distribution. A predicted mean at a fixed covariate value is not an average over the population. If a marginal quantity is wanted, the averaging distribution must be specified.
- Separate model interpretation from causal identification. A correctly calculated regression coefficient does not, by itself, establish that the coefficient or a standardized contrast has a causal interpretation.
One alternative is to report the conditional coefficient and explicitly describe its fixed-covariate interpretation. If the scientific target is a population-level contrast, another approach is to calculate predicted means under each history and average them over the appropriate covariate distributions. Marginal structural models are also designed to parameterize population-level treatment-history effects. These approaches target different quantities; the choice should follow the scientific question, not the convenience of reading a coefficient from a fitted model.
A common mistake is to reason, “The regression includes the evolving covariate, so the treatment coefficient is the treatment effect for the population.” The correction is to ask what was held fixed in the coefficient and what was averaged in the population contrast. In the additive example, the difference is visible directly in \(\beta_L\{E[L\mid 1]-E[L\mid 0]\}\). In a model with interactions, the average also depends on how treatment effects vary with covariate values. The course’s earlier material on covariate feedback explains why these distinctions matter when treatment affects later covariates.
These calculations do not resolve confounding, model misspecification, or whether a history-specific distribution is identified from observed data. They rely on the stated conditional mean model and distributions. Incorrect functional form, omitted interactions, measurement error, or unsupported causal assumptions can invalidate an applied interpretation even when the arithmetic is correct.
Check Your Understanding
For each question, identify the comparison before interpreting a coefficient. Solutions follow each problem.
- In the model \(E[Y\mid A,L]=4+3A+2L\), suppose \(E[L\mid A=0]=1\) and \(E[L\mid A=1]=4\). What is the conditional coefficient for \(A\), and what is the population contrast? Solution: The conditional coefficient is 3. The population contrast is \(3+2(4-1)=9\).
- Under what condition does the additive model’s population contrast equal its conditional treatment coefficient? Solution: The decomposition is \(\beta_A+\beta_L\{E[L\mid1]-E[L\mid0]\}\). Equality holds when \(\beta_L\{E[L\mid1]-E[L\mid0]\}=0\), including equal covariate means or no outcome association with \(L\) in the model.
- For \(E[Y\mid A,L]=1+2A+3L+5AL\), what is the conditional treatment contrast at \(L=0\) and at \(L=1\)? Solution: At \(L=0\), it is 2. At \(L=1\), it is \(2+5=7\). The interaction makes the conditional contrast depend on \(L\).
- Why does a conditional coefficient alone not establish a causal population effect? Solution: The coefficient is a model-based comparison holding included regressors fixed. A causal population contrast additionally requires an appropriate causal interpretation and identification assumptions, and it averages over the distributions associated with the histories being compared.