Concept Architecture
Concept
Theoretically, a Time-Varying Covariate is an explanatory variable whose value changes during an individual's follow-up period and whose changing value may influence the risk of experiencing the event of interest. Time-varying covariates extend conventional survival models by allowing predictor values to evolve over time rather than remaining fixed at baseline. They are fundamental in survival analysis when treatment status, biomarkers, disease severity or other clinical characteristics change during follow-up.
Mathematically, a time-varying covariate is incorporated into the hazard function as a function of time, allowing the hazard at any time point to depend upon the current value of the covariate. Regression coefficients are estimated using partial likelihood in Cox proportional hazards models or maximum likelihood estimation in parametric survival models. The resulting model accommodates changes in covariate values throughout the observation period.
In practice, time-varying covariates are implemented by restructuring patient-level data into multiple observation intervals, each containing the current value of the changing covariate. They are widely applied in clinical trials, observational studies and health economic evaluations where treatment exposure, disease progression or laboratory measurements vary over time.
Purpose
Used to model predictors that change during follow-up, improve estimation of treatment effects, account for dynamic patient characteristics and enhance survival modelling in health economic evaluation.
Mathematical Formulae
Primary Formula
h(t|X(t)) = h?(t)exp(?X(t))
Where:
h(t|X(t)) = hazard at time t
h?(t) = baseline hazard
X(t) = time-varying covariate
? = regression coefficient
Supporting Formulae
Linear predictor:
?(t) = ?X(t)
Hazard ratio associated with the current covariate value:
HR(t) = exp(?X(t))
Related Mathematical Methods
- Cox proportional hazards regression
- Extended Cox model
- Counting process formulation
- Maximum partial likelihood estimation
- Parametric survival modelling
- Joint modelling of longitudinal and survival data
Example
A cancer patient begins immunotherapy six months after diagnosis. Before treatment, the treatment covariate equals 0; after initiation it changes to 1. The survival model updates the patient's hazard according to the current treatment status, allowing the estimated treatment effect to begin only after therapy commences rather than assuming treatment was received throughout follow-up.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| IF | =IF(A2>=TreatmentStart,1,0) | Creates a time-varying treatment indicator. |
| LOOKUP | =XLOOKUP(A2,TimePoints,CovariateValues) | Retrieves the current value of a changing covariate. |
| EXP | =EXP(B2*C2) | Calculates the proportional hazards component for the current covariate value. |
| INDEX/MATCH | =INDEX(ValueRange,MATCH(A2,TimeRange,1)) | Assigns interval-specific covariate values during follow-up. |
VBA (Optional)
VBA can automate interval splitting, update time-varying covariate values and prepare patient-level datasets for extended survival models.
Sources
Therneau TM, Grambsch PM. Modeling Survival Data: Extending the Cox Model. Springer; 2000.
Kalbfleisch JD, Prentice RL. The Statistical Analysis of Failure Time Data. 2nd ed. Wiley; 2002.
Collett D. Modelling Survival Data in Medical Research. 3rd ed. Chapman & Hall/CRC; 2015.
Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press; 2006.
NICE. Health Technology Evaluations: The Manual. National Institute for Health and Care Excellence; 2022.
Related Concepts (2)
Library
Tools & Resources
1
survHE — Survival Analysis for Health Economic Evaluation (R package) — Gianluca Baio, R package ed., 2023 (CRAN)
An R package for fitting and comparing parametric survival models for health economic evaluation, including Bayesian estimation, and for extrapolating time-to-event data to inform cost-effectiveness models.
Software (R package)View source →
Frequently Asked Questions (7)
What is a time varying covariate?
A patient characteristic in a survival model allowed to change value over follow-up, such as a repeatedly measured biomarker.
Source: Fisher & Lin 1999
What changing predictor variable is a time-varying covariate?
A time-varying covariate is an explanatory variable in a survival analysis whose value can change during follow-up. Examples include a laboratory measurement taken repeatedly or a treatment that starts partway through observation. Including such covariates lets a model reflect how a person's risk shifts as their circumstances change, rather than fixing it at baseline. Handling them correctly requires care, since using future information to explain earlier events can bias results. Special data structures and estimation methods are used to incorporate them properly.
Source: Collett 2015
What is a time-varying covariate?
A time-varying covariate is a patient characteristic in a survival model that is allowed to change value over follow-up, such as a repeatedly measured biomarker, a changing treatment, or an evolving clinical status. Unlike a time-fixed covariate, its value can update during observation, so its effect on the hazard reflects its current value at each time. Time-varying covariates, discussed by Fisher and Lin, require methods that incorporate the changing values, extending survival models to handle predictors that are not constant.
Source: Fisher & Lin 1999
How are time-varying covariates handled in survival models?
Time-varying covariates are handled by extending the Cox model so that the covariate's value at each event time enters the risk-set comparison, using the value applicable then rather than a single baseline value. This is often implemented by splitting each individual's follow-up into intervals over which the covariate is constant, with the current value used in each. The model then estimates the effect of the time-varying covariate on the hazard based on its value at each moment, correctly reflecting its changes.
Source: Fisher & Lin 1999
What are examples of time-varying covariates?
Examples of time-varying covariates include a repeatedly measured biomarker whose value changes over follow-up; a treatment that starts, stops, or changes during observation; an evolving disease status or performance score; and cumulative exposure that accumulates over time. These contrast with time-fixed covariates, such as baseline age or sex. Time-varying covariates capture characteristics that change during follow-up, so their effect on risk must be assessed using their value at each time rather than a fixed baseline value.
Source: Fisher & Lin 1999
Why use time-varying covariates?
Time-varying covariates are used because some predictors of risk genuinely change over time, and using only their baseline value would ignore this, misrepresenting their effect. For example, a biomarker's current level may predict risk better than its baseline, or a treatment starting partway through affects risk only from then. Incorporating the changing values gives a more accurate model of how the covariate influences the hazard over time. Time-varying covariates thus capture dynamic predictors that fixed covariates cannot.
Source: Fisher & Lin 1999
What pitfalls arise with time-varying covariates?
Pitfalls with time-varying covariates include the risk of using future information, since a covariate value must reflect only what is known up to each time, not later; and the danger of adjusting for a covariate on the causal pathway between treatment and outcome, which can bias the treatment effect. Internal time-varying covariates, measured on the individual, also require care, as they may be affected by the impending event. These issues mean time-varying covariates are used with attention to timing and causal interpretation.
Source: Fisher & Lin 1999
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 24 Oct 2025
Content version: 1.0.0
Canonical Identity
- Term code
- HE-EM-SM-087
Stable URI · Machine-readable · Resolvable · CC BY 4.0