Why Functional Form Matters Under Feedback
An evolving confounder can be affected by earlier treatment, predict later treatment, and predict the outcome. Adjusting for it with the wrong functional form does not necessarily remove its confounding of the later treatment comparison. For example, adding a continuous confounder as one linear term cannot represent a curved outcome relationship, and adding treatment and confounder as separate terms cannot represent effect modification.
The issue is distinct from measurement error: even if the confounder is measured without error and included in the regression, a misspecified conditional mean can leave treatment associated with outcome-relevant parts of that confounder. The calculations below isolate this problem. They concern a two-decision setting: \(A_0\) is earlier treatment, \(L_1\) is a covariate measured later, \(A_1\) is subsequent treatment, and \(Y\) is the outcome.
Suppose \(L_1\) is influenced by \(A_0\), and in turn influences both \(A_1\) and \(Y\). A regression of \(Y\) on \(A_0,L_1,A_1\) adjusts for a linear main effect of \(L_1\). It does not, without additional terms, adjust for arbitrary nonlinear functions of \(L_1\) or allow the effect of \(A_1\) to vary with \(L_1\). This tutorial examines the consequences of precisely those omissions.
Omitted Terms and the Treatment Coefficient
A useful way to make the issue exact is to residualize treatment against the other regressors. Let \(C\) denote the included covariates, such as an intercept, \(A_0\), and a linear term in \(L_1\). Let \(R\) be the residual from the population least-squares regression of \(A_1\) on \(C\). Assume the required second moments are finite, the included-regressor moment matrix is nonsingular, and \(E[R^2]>0\).
Proof. By the population Frisch–Waugh–Lovell theorem, the coefficient of \(A_1\) equals \(E[RY]/E[RA_1]\), where \(R\) is the residual from projecting \(A_1\) on \(C\). Since \(A_1\) is its fitted value plus \(R\), and \(R\) is orthogonal to every column of \(C\), \(E[RA_1]=E[R^2]\). Substitute the stated outcome equation into the numerator. Orthogonality gives \(E[RC^\mathsf{T}\alpha]=0\); the assumption gives \(E[R\varepsilon]=0\). The remaining numerator is \(\tau E[RA_1]+E[RH]\). Dividing by \(E[R^2]\) yields the result. \(\square\)
This expression covers two important omissions. If the true outcome contains a nonlinear confounder term, \(H\) may be a function such as \(L_1^2\). If the true outcome contains a treatment interaction, \(H\) may be \(A_1L_1\). In either case, including \(L_1\) as a linear main effect does not ensure \(E[RH]=0\).
Worked Example: A Quadratic Confounder Effect
Let \(A_0\) be Bernoulli with probability \(1/2\). Independently, let \(U\) take values \(-1,0,1\), each with probability \(1/3\), and set \(L_1=A_0+U\). Thus earlier treatment shifts the later covariate. Given \(A_0,U\), let \(A_1\) be Bernoulli with probability \(0.8\) when \(|U|=1\), and \(0.2\) when \(U=0\). Let \(Y=2A_1+3U^2+\varepsilon\), with \(E[\varepsilon\mid A_0,U,A_1]=0\). Consider the population regression of \(Y\) on an intercept, \(A_0,L_1,A_1\).
Because \(U=L_1-A_0\), the regressors \(A_0,L_1\) span the same linear space as \(A_0,U\). The mean of \(A_1\) is \((0.8+0.2+0.8)/3=0.6\); its covariance with \(U\) is zero by symmetry, and it is independent of \(A_0\). Therefore its residual after projection on the other regressors is \(R=A_1-0.6\).
The residual variance is \(E[R^2]=\operatorname{Var}(A_1)=0.6(0.4)=0.24\). Also, \(E[U^2]=2/3\) and \(E[A_1U^2]=0.8(2/3)=8/15\). Hence $$ E[RU^2]=E[A_1U^2]-0.6E[U^2] =\frac{8}{15}-\frac{2}{5} =\frac{2}{15}. $$
The omitted term is \(H=3U^2\), so the treatment coefficient is $$ 2+\frac{3(2/15)}{0.24} =2+\frac{5}{3} =\frac{11}{3}. $$ The structural treatment effect in the specified outcome equation is \(2\), but the regression coefficient is \(11/3\). The quadratic term is larger in the strata where treatment is more common, so the linear adjustment leaves an outcome-relevant treatment association.
Treatment Interactions Change the Comparison
A treatment-by-confounder interaction is not merely a more complicated confounder effect. It means that the conditional treatment contrast itself varies across confounder values. If the regression omits that interaction, its treatment coefficient combines information across covariate strata in a way determined by the treatment and covariate distributions.
Worked Example: An Omitted Treatment Interaction
Use \(A_0,U,L_1\) as in the preceding example, but let the probabilities of \(A_1=1\) at \(U=-1,0,1\) be \(0.2,0.2,0.8\), respectively. Let \(Y=1.5A_1+0.9A_1U+\varepsilon\), with conditional mean-zero error. Fit a regression with an intercept, \(A_0,L_1,A_1\), but omit \(A_1U\).
The adjustment variables again span \(A_0,U\). The projection of \(A_1\) on an intercept and \(U\) is \(0.4+0.3U\): the mean treatment probability is \(0.4\), and the slope is \(\operatorname{Cov}(A_1,U)/\operatorname{Var}(U)=0.2/(2/3)=0.3\). Its residual is \(R=A_1-(0.4+0.3U)\).
The residual variance has a conditional-variance component and a projection-error component: $$ E[R^2]=\frac{0.16+0.16+0.16}{3} +\frac{0.1^2+(-0.2)^2+0.1^2}{3} =0.16+0.02=0.18. $$ The omitted term is \(H=0.9A_1U\). At \(U=-1,0,1\), the conditional contributions to \(E[RA_1U\mid U]\) are \(-0.18,0,0.24\). Therefore \(E[RA_1U]=0.02\), and the fitted treatment coefficient is $$ 1.5+\frac{0.9(0.02)}{0.18}=1.6. $$
The conditional treatment effect is \(1.5+0.9U\), so it varies across \(U\). Its average over the equally likely \(U\) values is \(1.5\), whereas this misspecified regression coefficient is \(1.6\). The coefficient is not automatically the average effect; the omitted interaction and the unequal treatment probabilities affect the projection.
What a Correctly Specified Regression Can Recover
Proof. The conditional-mean assumption implies \(Y=\tau A_1+g(C)+\varepsilon\), where \(E[\varepsilon\mid A_1,C]=0\). Consequently \(E[R\varepsilon]=0\) for the residual \(R\) from projecting \(A_1\) on the included functions of \(C\). Since \(g(C)\) is in their linear span, \(E[Rg(C)]=0\). Applying the residualization calculation above leaves the coefficient \(\tau\). The non-perfect-prediction condition ensures \(E[R^2]>0\), so that coefficient is identified in the regression. \(\square\)
This result is conditional on the stated mean model being correct; it does not say that adding arbitrary terms guarantees a valid causal interpretation. A regression can include \(U^2\) and \(A_1U\) in the examples and represent their conditional means exactly. In the first example, including \(U^2\) allows the coefficient of \(A_1\) to equal \(2\). In the second, including \(A_1U\) represents the varying conditional effect, with coefficients \(1.5\) for \(A_1\) and \(0.9\) for the interaction.
Worked Example: Checking the Added Terms
For the first data-generating process, fit the terms \(A_1,A_0,U,U^2\), where \(U=L_1-A_0\). The conditional mean is exactly \(E[Y\mid A_1,A_0,U]=2A_1+3U^2\). Thus this model represents the conditional mean, and the coefficient of \(A_1\) is \(2\); there is no omitted \(U^2\) contribution to the residualized treatment coefficient.
For the interaction process, fit \(A_1,U,A_1U,A_0\). Its conditional mean is exactly \(1.5A_1+0.9A_1U\). The coefficient on \(A_1\) is then \(1.5\), and the interaction coefficient is \(0.9\). The effect at a particular \(U=u\) is \(1.5+0.9u\), not the coefficient \(1.5\) alone. These recoveries follow from exact representation of the specified conditional means, not from the fact that the models contain more terms in general.
Diagnostics, Alternatives, and Limits
Functional-form checks should be directed at the roles of the evolving confounder. Useful warning signs include systematic curvature in outcome residuals against \(L_1\), residual patterns that differ by treatment, or evidence that the treatment contrast changes across ranges of \(L_1\). Plotting fitted outcome residuals against \(L_1\) separately by \(A_1\), and checking whether treatment-assignment patterns vary nonlinearly with \(L_1\) and prior treatment, can reveal inadequacies in the chosen forms.
These checks are diagnostic, not proof. A nonsignificant test for a quadratic term does not establish linearity, especially with limited data. Sparse treatment histories can make interactions difficult to estimate, and adding many flexible terms can increase variance. Positivity problems—little or no treatment variation in some covariate-history strata—cannot be repaired simply by selecting a more flexible regression.
| Approach | What it can address | Important limitation |
|---|---|---|
| Linear outcome adjustment | Adjusts for the specified linear main effects | Can leave nonlinear or interaction terms omitted |
| Richer outcome regression | Can represent curvature and treatment-effect modification | Requires suitable terms, adequate data, and correct specification |
| Flexible regression, such as splines | Can represent smooth nonlinear associations without choosing one polynomial shape | Does not automatically solve sparse-data or causal-identification problems |
| Weighting approaches | Use a treatment-assignment model rather than relying on the same outcome regression adjustment | Depend on their own modeling and positivity conditions; they are not guaranteed to work if those fail |
The practical distinction is important: a correctly specified treatment-assignment model does not, by itself, make a misspecified outcome regression correct. Conversely, a flexible outcome regression does not eliminate the need to define the treatment comparison and assess whether the data support it. The aim here is narrower: recognize that functional form is part of confounder adjustment, not a cosmetic choice made after adjustment is complete.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In the first worked example, what features make \(L_1\) an evolving confounder rather than a baseline covariate?
- In the omitted-term result, what condition makes the omitted term contribute no bias to the treatment coefficient?
- Why is the treatment coefficient \(1.6\) in the interaction example not the average treatment effect over the stated \(U\) distribution?
- Name one diagnostic for a missing treatment-by-confounder interaction and one reason that diagnostic cannot prove the model is correct.
Solutions. (1) \(L_1=A_0+U\), so earlier treatment changes its value; \(A_1\) depends on \(U=L_1-A_0\), and the outcome depends on \(U^2\). Thus it lies between treatment decisions and predicts later treatment and outcome. (2) The omitted term must be orthogonal to residualized treatment: \(E[RH]=0\). (3) The conditional effect is \(1.5+0.9U\), whose average is \(1.5+0.9E[U]=1.5\); the fitted coefficient \(1.6\) is the projection from a model omitting the interaction. (4) Plot outcome residuals against \(L_1\) separately by treatment, or compare fitted treatment contrasts across \(L_1\) ranges. Limited sample size or sparse treatment histories can hide patterns, so a quiet diagnostic is not proof of correct specification.