Why Baseline Covariates Need Careful Representation
At each treatment decision, a treatment probability model conditions on information available before that decision. A baseline covariate is part of that information at every decision time: its value does not change, but the treatment-assignment relationship associated with it may. The modeling question is therefore not whether a baseline variable is measured repeatedly. It is whether the model should impose a common association with treatment over time or allow that association to differ by decision time.
This distinction matters for inverse probability of treatment weights. A denominator model that represents the conditional treatment probabilities poorly can produce inaccurate weights, even when the baseline covariate has been entered into the data correctly. Repeating a baseline value in long-format records is a way to represent its availability at each decision; it does not, by itself, justify assuming its effect is constant.
This definition assumes that \(X\) is measured before the first treatment decision and that its recorded value is available when each later treatment is assigned. The components of \(H_t\) must likewise be temporally appropriate: a covariate measured after \(A_t\) must not be used to predict \(A_t\). For a causal interpretation of the resulting weights, correct measurement and modeling are not enough; the usual causal assumptions, including consistency, sequential exchangeability, and positivity, are also needed.
Repeated Inclusion and the Shared-Effect Model
In long-format data, a person typically contributes one row for each treatment decision. The same baseline value appears on each of that person’s rows. For example, a pooled logistic model can be written as
where \(i\) indexes people, \(t\) indexes decisions, \(Z_{it}\) contains other pre-decision covariates, and \(\alpha_t\) represents the time-specific baseline log odds. The coefficient \(\beta\) is shared across times. If \(X_i\) increases by one unit while the other terms are held fixed, the conditional odds of treatment are multiplied by \(\exp(\beta)\) at every decision time.
Repeated inclusion does not mean that a person’s baseline value has been measured anew at every time. It means that the same baseline information is included in each conditional treatment model. It also does not mean that the person has become multiple independent people. The treatment likelihood is built from sequential conditional probabilities, while uncertainty estimation must respect the fact that multiple rows belong to the same person.
To verify the result, let \(z\) collect the time and other covariate terms held fixed, and let \(p(x)=\operatorname{expit}(z+\beta x)\). The odds at \(x\) are \(\exp(z+\beta x)\); at \(x+1\), they are \(\exp(z+\beta(x+1))\). Their ratio is \(\exp(\beta)\). The probability difference generally depends on \(z\), so it can change with time even under a shared coefficient.
Worked Example: Repeating Age in Long-Format Records
Suppose age is measured at baseline, and three treatment decisions are recorded for each person. A pooled model uses \(\operatorname{logit}(p_{it})=\alpha_t+0.04(\text{age}_i-50)+\eta^\top Z_{it}\). For illustration, hold \(Z_{it}\) fixed at zero and use \(\alpha_1=-1.2\), \(\alpha_2=-0.8\), and \(\alpha_3=-0.4\). Consider a person aged 60, so \(\text{age}_i-50=10\). The age contribution is \(0.04(10)=0.4\) on each row.
At the first decision, the log odds are \(-1.2+0.4=-0.8\), giving \(p_{i1}=\operatorname{expit}(-0.8)\approx0.310\). At the second, they are \(-0.8+0.4=-0.4\), giving \(p_{i2}\approx0.401\). At the third, they are \(-0.4+0.4=0\), giving \(p_{i3}=0.500\).
The value 60 is repeated in the three records, but the fitted probabilities differ because the time terms differ. The model assumes that each ten-year increase in age multiplies the conditional treatment odds by \(\exp(0.4)\approx1.492\) at each decision. It does not assume equal treatment probabilities across times.
Allowing the Baseline Association to Vary
A time-varying effect replaces the common coefficient with time-specific coefficients. For a single baseline variable, one representation is
where \(K\) is the number of decision times and \(I(T=t)\) indicates that a row belongs to time \(t\). The effect at the reference time is \(\beta\); at time \(t\ne1\), it is \(\beta+\gamma_t\). This is an interaction between the baseline covariate and time. With several baseline covariates, the model can allow time variation for selected variables rather than automatically interacting every baseline covariate.
The implication follows directly from the logistic link. At a given time \(t\), increasing \(X\) by one multiplies the conditional odds by \(\exp(\beta+\gamma_t)\), with \(\gamma_1=0\). Thus the shared-effect model is the special case in which all the interaction coefficients are zero.
Worked Example: Comparing Shared and Time-Varying Effects
Let \(X\) be binary, set other covariates to zero, and consider two decision times. Under the shared-effect model, take \(\alpha_1=-1\), \(\alpha_2=-2\), and \(\beta=0.7\). At time 1, the fitted probabilities for \(X=0\) and \(X=1\) are \(\operatorname{expit}(-1)\approx0.269\) and \(\operatorname{expit}(-0.3)\approx0.426\). The difference is about \(0.157\), and the odds ratio is \(\exp(0.7)\approx2.014\).
At time 2, the probabilities are \(\operatorname{expit}(-2)\approx0.119\) and \(\operatorname{expit}(-1.3)\approx0.214\). The difference is about \(0.095\), while the odds ratio remains \(\exp(0.7)\approx2.014\). The probability difference changed, but the conditional odds ratio did not.
Now add an interaction so the time-2 coefficient is \(0.7-0.4=0.3\). The time-2 probability for \(X=1\) becomes \(\operatorname{expit}(-1.7)\approx0.154\), compared with \(0.119\) for \(X=0\). The odds ratio is now \(\exp(0.3)\approx1.350\), while the time-1 odds ratio remains \(2.014\). The interaction has changed the time-2 association itself, not merely the time-2 baseline probability.
What a Pooled Shared Coefficient Estimates
A common coefficient is a modeling constraint. It is not a claim that the biological or behavioral mechanism must truly be stable. The following score equation makes clear how the pooled estimate is determined.
For the derivation, the conditional Bernoulli log-likelihood contribution for person \(i\) at time \(t\) is \(A_{it}\log(p_{it})+(1-A_{it})\log(1-p_{it})\). Under a logistic model with linear predictor containing \(\beta X_i\), differentiation with respect to \(\beta\) gives \(X_i(A_{it}-p_{it})\). Summing these contributions over all modeled people and times gives the log-likelihood derivative. At an interior maximum, that derivative is zero; evaluating at the estimate gives the displayed equation.
Consequently, a shared coefficient is chosen to balance the treatment residuals across the pooled records. If the true association differs by time, the shared model generally cannot reproduce every time-specific conditional probability. Its fitted coefficient should not be described as a simple arithmetic average of the time-specific effects: the likelihood weights the information according to the observed covariates, treatment patterns, and fitted probabilities.
Worked Example: Detecting Different Associations Across Times
Suppose that, within the same stratum of other measured history, the treatment probabilities for \(X=0\) and \(X=1\) are \(0.20\) and \(0.50\) at time 1. The corresponding odds are \(0.20/0.80=0.25\) and \(0.50/0.50=1\). Thus the time-1 odds ratio is \(1/0.25=4\), with log odds ratio \(\log(4)\approx1.386\).
At time 2, suppose the probabilities are \(0.40\) and \(0.50\). The odds are \(0.40/0.60=2/3\) and \(1\), so the time-2 odds ratio is \(1/(2/3)=1.5\), with log odds ratio \(\log(1.5)\approx0.405\).
A shared-effect model requires these two conditional odds ratios to be equal, so it cannot reproduce both sets of probabilities exactly. A model with a time-by-\(X\) interaction can represent the difference. A pooled shared-effect model may still be a deliberate approximation, but its adequacy must be assessed rather than presumed.
Choosing and Checking the Representation
The main alternatives answer different modeling needs. A pooled model with a shared baseline coefficient uses information across times to estimate one common association and is more parsimonious. A pooled model with selected time-by-baseline interactions allows those associations to differ while still fitting a joint model. Separate treatment models at each time allow broader time-specific modeling, but can be less stable when some times have few observations or little treatment variation. None of these choices automatically corrects an omitted confounder, a poorly measured covariate, or a violation of positivity.
Before fitting, check that baseline values are coded consistently across all of a person’s rows and that each row’s treatment is paired with covariates measured before that decision. After fitting, useful checks include:
- Compare fitted treatment probabilities across decision times and baseline-covariate strata; look for implausible patterns or estimates near zero or one.
- Compare a shared-effect specification with a plausible model allowing selected baseline effects to vary over time. Large changes in fitted probabilities can signal consequential effect heterogeneity.
- Check for empty or very small combinations of time, baseline covariate, and treatment. Such data provide little information for estimating time-specific effects and may reveal practical positivity problems.
- Verify that repeated rows have not been treated as independent people when estimating uncertainty.
A particularly common mistake is to conclude that a baseline effect must be constant because the baseline value is unchanged. The correction is to separate the covariate’s value from its conditional association with treatment: the former is fixed, while the latter can vary with time and the evolving treatment history. Another mistake is to include a baseline variable repeatedly but interpret its shared coefficient as a constant probability increase. In a logistic model, the shared coefficient gives a constant conditional odds ratio; probability differences depend on the other terms in the linear predictor.
Model flexibility also has limits. Adding many time interactions can make estimates unstable, especially with sparse treatment data, and a nonzero interaction does not establish a causal mechanism. Conversely, choosing a common coefficient for precision does not make the assumption true. The choice should reflect the scientific question, available information, and diagnostics, while recognizing that correct treatment probabilities and adequate positivity are essential for stable weighting.
Check Your Understanding
Answer each question, then compare with the solutions.
- In a pooled logistic model, what does repeating a baseline covariate’s value on each decision-time row mean, and what does it not mean?
- A shared logistic coefficient for a baseline covariate is \(0.5\). What is the conditional odds ratio for a one-unit increase, and does this imply a constant probability difference?
- At one time, a baseline covariate has a conditional odds ratio of 2; at another, it has an odds ratio of 5 within the same strata of other history. Can a shared-effect logistic model represent both exactly?
- Name one advantage and one limitation of allowing a baseline covariate’s coefficient to vary by time.
Solutions. (1) It represents the same baseline information as available at each treatment decision. It does not represent new measurements or independent people at every row. (2) The odds ratio is \(\exp(0.5)\approx1.649\). No: the probability difference depends on the other terms in the model. (3) No. A shared coefficient imposes one conditional odds ratio at all times; separate time effects or an interaction are needed to represent the two values exactly. (4) An advantage is representing genuine time variation in the treatment association. A limitation is that the added parameters can be unstable or poorly estimated when treatment data are sparse at some times.