03 · What You Need to Know
How Changing Exposure Affects Cohort Design and Analysis
What Is a Time-Varying Exposure?
A time-varying exposure is a characteristic, behavior, condition, or intervention whose value can change during the observation period.
Examples include medication use, employment status, academic workload, access to institutional support, and participation in educational technology training.
In educational research, students may begin using an AI-assisted learning platform, reduce their usage, discontinue it, or return after a period of nonuse.
These changes can be relevant when the research question concerns how exposure at different times relates to subsequent outcomes.
Time-varying exposure should be distinguished from a variable that merely changes in the dataset because researchers use different measurement instruments or definitions. Genuine temporal variation concerns changes in the underlying exposure or its specified representation.
Why Might Baseline Exposure Classification Be Insufficient?
Baseline exposure classification describes participants according to their exposure status at a defined starting point.
That classification can be appropriate when the research question concerns the consequences of initial exposure status, regardless of subsequent changes.
However, it may be insufficient when the objective concerns actual exposure received throughout follow-up.
Suppose a student is untrained at enrollment but completes AI literacy training six months later. A baseline-only model would continue to represent the student according to the original classification, even though their subsequent experience has changed.
This is not automatically an analytical error. It becomes a problem when researchers interpret the baseline comparison as though it estimated the effect of remaining continuously exposed or unexposed.
The distinction between initial exposure and sustained exposure should be specified before selecting the analysis.
What Different Exposure Definitions Can Researchers Use?
Several exposure definitions may be scientifically appropriate, depending on the intended estimand.
| Exposure Definition |
Meaning |
Example |
| Baseline exposure |
Status at the beginning of follow-up |
Completed AI literacy training before enrollment |
| Current exposure |
Status at a particular observation time |
Currently participating in training |
| Ever exposed |
Whether exposure has occurred by a specified time |
Has initiated training at least once |
| Cumulative exposure |
Total exposure accumulated over a defined period |
Total training hours completed to date |
| Lagged exposure |
Exposure measured before the outcome risk period |
Training participation during the previous semester |
| Exposure trajectory |
Pattern of exposure across multiple periods |
Continuous, intermittent, or discontinued participation |
These definitions are not interchangeable. For example, ever receiving training differs from completing a sustained training program, and cumulative hours may not capture the timing or quality of instruction.
Researchers should select an exposure representation that corresponds to the proposed process and the available measurements.
How Should Person-Time Be Allocated When Exposure Changes?
When exposure is analyzed as a time-varying characteristic, participants may contribute observation time to different exposure categories during follow-up.
For example, a student could contribute four months of unexposed time before initiating training and eight months of exposed time afterward.
This approach differs from classifying the student as exposed for the entire year simply because training eventually occurred.
Actual person-time calculations should use the relevant event dates and a consistent time convention. If an outcome occurs, participants ordinarily stop contributing first-event time at risk at that point.
Researchers should also consider whether the exposure is assumed to act immediately or after a scientifically justified delay.
What Is Immortal Time Bias?
Immortal time bias can arise when researchers incorrectly classify or allocate a period during which participants must remain event-free to qualify for a later exposure category.
Suppose students are classified as trained if they complete an AI literacy course at any point during their first academic year.
A student who withdraws before completing the course cannot qualify as a training completer. By contrast, students classified as completers necessarily remained enrolled long enough to finish the course.
If the analysis counts all observation time from enrollment as exposed for eventual completers, the trained group receives an artificial period during which the outcome could not have occurred under its membership definition.
This can make training appear protective even when the observed difference is partly or entirely produced by the analytical design.
Correctly defining time zero and aligning exposure with follow-up is essential to avoiding this problem.
Watch Out
Do not classify participants as exposed from cohort entry solely because they eventually receive or complete an intervention. Exposure histories must be represented according to the relevant timing and causal question. Time-varying classification may address some immortal time problems, but causal identification may require additional methods.
Can a Time-Dependent Cox Model Handle Changing Exposure?
Yes. A Cox proportional hazards model can include time-dependent covariates whose values change during follow-up.
For example, students can be classified as untrained before initiating an AI literacy program and trained after initiation, provided the exposure definition and timing are appropriate.
The model then estimates associations between the time-dependent exposure and the hazard of the outcome, conditional on included covariates and model assumptions.
However, a conventional time-dependent Cox model does not automatically estimate the causal effect of a changing exposure strategy.
If time-varying confounders influence subsequent exposure and are themselves affected by earlier exposure, standard adjustment may produce biased causal estimates.
The distinction between representing exposure changes statistically and identifying causal effects should remain explicit.
What Is Time-Varying Confounding?
Time-varying confounding occurs when variables that influence both subsequent exposure and outcome change during follow-up.
For example, academic engagement may influence whether students seek additional AI literacy training. Engagement may also predict later withdrawal.
If earlier training affects engagement, then engagement becomes both a consequence of previous exposure and a predictor of future exposure.
This creates a difficult causal structure.
Failing to account for engagement may leave confounding of later training effects. Conventional adjustment for engagement may also remove part of the effect of earlier training or introduce other biases.
The appropriate analysis depends on the intended causal estimand and the assumptions that can be defended.
What Methods Can Address Time-Varying Confounding?
Longitudinal causal inference methods, often called g-methods, have been developed to address particular problems involving time-varying exposure and confounding.
These include the parametric g-formula, marginal structural models estimated using inverse probability weighting, and structural nested models.
For example, a marginal structural model may use weights based on measured exposure and confounder histories to estimate a causal contrast between specified exposure strategies.
Such methods require assumptions including appropriate exchangeability, positivity, consistency, and correct estimation of relevant models or nuisance functions.
They also require sufficiently detailed longitudinal data. No statistical method can recover exposure histories or confounders that were never adequately measured without additional assumptions.
These approaches are discussed within the broader framework of causal inference from observational cohorts.
How Does Exposure Timing Affect Reverse Causation?
Exposure changes may occur in response to early symptoms, difficulties, or developments related to the outcome.
For example, students experiencing declining engagement may be encouraged to enroll in AI literacy training. Their subsequent withdrawal risk may already be elevated before training begins.
A crude comparison might therefore suggest that training is associated with greater withdrawal risk, even if training itself is beneficial or neutral.
This phenomenon is sometimes discussed as reverse causation or confounding by indication, depending on the causal structure.
Researchers should examine why exposure changes occur and whether those reasons are related to subsequent outcomes.
Temporal ordering helps, but it does not eliminate confounding when exposure decisions respond to evolving participant circumstances.
What Are Lagged Exposure Models?
Lagged exposure models relate outcomes at a particular time to exposure measured during an earlier period.
For example, researchers might investigate whether training participation during one semester is associated with engagement during the following semester.
Lagging can help align exposure with a hypothesized delay before an outcome becomes observable.
However, selecting a lag does not automatically establish causality or remove confounding. The interval should be justified by the proposed process and measurement structure.
Different lag specifications may answer different scientific questions, particularly when exposure effects accumulate, diminish, or vary over time.
What If Exposure Is Measured Only Periodically?
When exposure is assessed at discrete intervals, its exact timing may be unknown.
Suppose AI use is measured every six months. A student reports no use in January and regular use in July. The researcher may know that exposure changed during the interval without knowing when.
Assigning the July exposure status to the entire preceding period could misclassify observation time.
Possible approaches include interval-based exposure definitions, models appropriate to the available temporal resolution, or sensitivity analyses under alternative timing assumptions.
Researchers should not invent precise exposure dates merely because the statistical software requires them.
The frequency of cohort measurements should therefore reflect how rapidly meaningful exposure changes are expected to occur.
Can Exposure Be Continuous Rather Than Binary?
Yes. Time-varying exposures may represent changing quantities rather than transitions between exposed and unexposed states.
For example, students may accumulate different numbers of AI training hours or vary in their weekly frequency of AI tool use.
Researchers may model current exposure intensity, cumulative exposure, or other theoretically meaningful summaries.
However, cumulative exposure can be affected by follow-up duration and outcome occurrence. Participants who remain under observation longer may have more opportunity to accumulate exposure.
Analyses must therefore avoid treating exposure accumulated after an outcome or during unequal observation periods as though it were a comparable baseline characteristic.
Should Researchers Always Update Exposure Status?
Not necessarily. The appropriate approach depends on the question.
If the objective is to compare participants according to their exposure status at baseline, retaining the original classification may be appropriate.
If the objective concerns the association of current exposure with subsequent outcomes, updating exposure status may be necessary.
If the objective is to estimate the effect of sustained exposure strategies, more elaborate longitudinal causal methods may be required.
Researchers should not automatically replace a baseline analysis with a time-varying model merely because exposure changes are observed. The models may estimate different quantities.
How Should Changing Exposures Be Reported?
Reports should specify how exposure was defined, when it was measured, how changes were identified, and how exposure time was allocated.
Researchers should describe the frequency of transitions, missing exposure measurements, and the relationship between exposure timing and outcome observation.
Where time-varying causal methods are used, the intervention strategies, confounder histories, assumptions, weighting or modeling procedures, and relevant diagnostics should be reported.
Clear reporting helps readers distinguish a baseline exposure comparison from an analysis of exposure histories or sustained strategies.