Why a Changing Covariate Can Be More Than a Predictor
In an event study, a covariate may be measured repeatedly while participants are followed for an event. The values can change over time, and those changes may contain information about a participant’s underlying health. If that latent health also predicts the event, then the covariate and the event process are connected even when the health state itself is not fully observed.
The important distinction is that time-varying describes when a covariate can change, whereas endogenous describes its dependence on other parts of the data-generating process. A covariate can vary over time without being endogenous. Conversely, a covariate measured only once can be related to unobserved event risk. Here the focus is the time-varying case: measured values that are related to latent health that also bears on the event outcome.
“Endogenous” here is a statement about statistical dependence, not a claim that a covariate causes an event. The term is also relative to what has been conditioned on: a covariate may appear unrelated to latent health after adjusting for some information, but remain related after a different adjustment. In this tutorial, \(U_i(t)\) denotes health features not fully captured by the recorded covariates, and \(T_i\) denotes the event time.
A Simple Representation of Shared Latent Health
A useful way to express the issue is to write one relationship for the repeated covariate and another for the event risk. Suppose, for illustration, that the covariate depends partly on latent health:
Here \(m_i(t)\) represents other systematic influences on the covariate, \(a\) measures how the latent health state is related to it, and \(\epsilon_i(t)\) is variation not explained by those components. Suppose also that the event hazard, the instantaneous event rate among participants still event-free at time \(t\), is represented as
In this illustration, \(Z_i\) denotes other measured covariates, \(\lambda_0(t)\) is a baseline hazard, and \(\beta\) and \(\gamma\) describe conditional associations with the hazard. The equation does not itself establish a causal interpretation. If \(a\ne 0\) and \(\gamma\ne 0\), the latent health state is related both to the measured covariate and to event risk. Consequently, a comparison across values of \(X_i(t)\) can also reflect differences in \(U_i(t)\).
This shared dependence can occur even if the covariate has no direct conditional association with the hazard in this representation, meaning \(\beta=0\). It can also occur alongside a nonzero \(\beta\). In either case, seeing a relationship between the recorded covariate and event risk does not by itself reveal which pathway produced it.
Worked Example: Is the Covariate Time-Varying, Endogenous, or Both?
In a hypothetical follow-up study, researchers record a health score at months 0, 3, and 6. They also follow participants for hospitalization. Suppose the score can change between visits, and an unrecorded aspect of current health influences both the score and the chance of hospitalization. Classify the score and state what is and is not established.
Time-varying: the score is time-varying because its value may differ at months 0, 3, and 6. For example, a participant’s recorded values could be 5, 4, and 2 points.
Endogenous in relation to the event process: under the stated hypothetical conditions, latent health is related to both the measured score and hospitalization risk. The score is therefore statistically connected to the event process through shared latent health.
What is not established: these facts alone do not show that changing the score would change hospitalization risk. The score could be a marker of latent health, could have a separate association with risk, or could reflect both. Nor does the fact that scores change prove endogeneity: the dependence on latent health is an additional premise.
Why Omitting Latent Health Can Change an Observed Risk Contrast
The consequence of latent health can be shown using the law of total expectation. At a given instant, suppose the latent health state is either high-risk or low-risk. Within each state, assume the event hazard does not depend directly on the measured covariate. The hazard among participants with a specified observed covariate value is then an average over the latent health states represented in that group.
The event-free condition \(T\ge t\) matters because the hazard is defined among those who have not yet experienced the event. If high-risk latent health is more common in one covariate group, the group hazards can differ even when the within-state hazards are identical across covariate values. This is a composition difference, not evidence on its own of a direct covariate effect.
Worked Example: An Apparent Covariate Contrast From Latent Health
Consider a hypothetical cohort at the start of a follow-up interval. Let \(U=1\) indicate high latent health risk and \(U=0\) low latent health risk. Assume the instantaneous hazards are \(0.10\) events per person-year for \(U=1\) and \(0.02\) events per person-year for \(U=0\), regardless of the recorded covariate \(X\). Suppose 75% of participants with high \(X\) have \(U=1\), whereas 25% of participants with low \(X\) have \(U=1\). For this calculation, assume those proportions describe the event-free participants at the instant considered.
For the high-\(X\) group, the mixture formula gives
events per person-year. For the low-\(X\) group,
events per person-year. The observed instantaneous hazard is twice as high in the high-\(X\) group, since \(0.080/0.040=2.00\). Yet the example specified that within each latent health state the hazard does not depend on \(X\). The contrast arises because the high-\(X\) group contains a larger proportion of high-risk participants. Thus, the observed contrast alone does not identify a direct effect of \(X\).
This calculation is an instantaneous comparison, not a claim that the same mixture proportions remain fixed throughout follow-up. If high-risk participants experience events earlier, the latent-health composition of event-free participants can change over time. That feature is one reason a simple observed association may not summarize the relationship throughout follow-up with a single constant contrast.
Endogeneity Is Not the Same as Time Variation
A changing covariate is not automatically endogenous. For example, suppose a participant’s work schedule changes over time, and—given the measured covariates and the study’s assumptions—those changes are unrelated to latent health and event risk. The schedule is time-varying, but it is not endogenous by the shared-health mechanism described here. Conversely, a time-constant measurement could still be related to latent event risk.
Worked Example: A Repeated Measure That Is Not Endogenous by Assumption
In a second hypothetical study, weekly exercise minutes are recorded during follow-up. Assume, for this example, that exercise minutes change from week to week but are generated independently of latent health and of the event process, conditional on the measured covariates. The recorded values for one participant are 90, 120, and 60 minutes in three successive weeks.
The variable is time-varying: its recorded value changes across weeks. Under the stated independence assumption, however, it is not endogenous through shared latent health. The values 90, 120, and 60 show variation, but they do not contradict the assumption that this variation is unrelated to latent health or event risk after conditioning.
The classification depends on the assumed data-generating relationship, not on how many distinct values appear. In an actual study, the independence assumption would require justification; these three observed values alone cannot establish it.
How to Think About Analyses and Their Limits
An ordinary time-dependent event model can include the observed value \(X_i(t)\) as a predictor. That approach describes an association under its modeling assumptions; it does not automatically account for an unobserved health process that influences both \(X_i(t)\) and event risk. If the dependence is important, interpreting the fitted coefficient as though the covariate were unrelated to unobserved risk can be misleading.
A baseline-only analysis answers a different question because it does not use the later covariate values. It can avoid treating those later values as predictors, but it does not remove latent-health differences already related to baseline values. A joint-modeling approach can represent a longitudinal process and an event process together, including a shared latent component. Such a model is a way to encode and estimate dependence under explicit assumptions; it does not make the latent process directly observed or prove that a particular causal explanation is correct.
Possible clues to a problematic covariate include a strong relation between its trajectory and other indicators of worsening health, changes that cluster near events, or substantial differences between analyses that do and do not use updated covariate values. These are warnings, not definitive tests. The latent state is, by definition, not fully recorded, so observed data alone generally cannot confirm that it is the source of a covariate–event association.
Common Mistakes and Diagnostics
- Wrong reasoning: “The covariate changes, so it is endogenous.” Change over time establishes time variation only. The correction is to ask whether the values are also related to latent health or event risk, conditional on the specified information.
- Wrong reasoning: “The event association proves the covariate causes the event.” The association may partly reflect shared latent health. The correction is to distinguish an observed risk contrast from a causal effect.
- Wrong reasoning: “Adjusting for recorded covariates guarantees no endogeneity.” Recorded covariates may not fully capture current health. The correction is to state what is measured and recognize the remaining dependence as an assumption or limitation.
- Diagnostic limitation: “A model fit or test can reveal the unobserved health state.” Latent health cannot be directly checked if it was not measured. The correction is to use substantive knowledge, available health indicators, and sensitivity to plausible modeling assumptions rather than treating a diagnostic as proof.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A repeated score changes from visit to visit. What additional feature would make it endogenous through the mechanism discussed here?
- Suppose \(P(U=1\mid X=\text{high},T\ge t)=0.60\) and \(P(U=1\mid X=\text{low},T\ge t)=0.20\). The hazards are \(0.08\) per person-year for \(U=1\) and \(0.03\) for \(U=0\), with no within-state dependence on \(X\). Calculate both observed group hazards.
- Does an observed association between a time-varying covariate and the event establish that changing the covariate would change event risk? Why or why not?
- Can a time-varying covariate be non-endogenous under a stated model? Give the condition that would support that classification.
- Name one useful warning sign and one limitation of diagnosing latent-health endogeneity from observed data.
Solutions. (1) Its values must also be statistically related to latent health that is associated with event risk, given the specified observed information. (2) The high-\(X\) hazard is \((0.60)(0.08)+(0.40)(0.03)=0.048+0.012=0.060\) events per person-year. The low-\(X\) hazard is \((0.20)(0.08)+(0.80)(0.03)=0.016+0.024=0.040\) events per person-year. (3) No. Shared latent health may create some or all of the association, so the observed contrast alone does not establish a causal effect. (4) Yes. It can change over time while being independent of latent health and the event process conditional on the measured covariates, under the stated assumptions. (5) A trajectory that tracks other signs of worsening health is a warning. A key limitation is that latent health is not fully observed, so observed data alone generally cannot confirm it as the source of the association.