Time-Varying Environmental Exposures in Time-to-Event Analysis

Suggested citation

Kayleigh P. Keller, Meredith Pedde, Emma Nichols, and Sara D. Adar. 2026. Time-Varying Environmental Exposures in Time-to-Event Analysis. GECC Guidance Series. Version 1.0 (November 2026). Funded by the US National Institute on Aging, grant U24 AG088894. Los Angeles: University of Southern California, November. https://doi.org/10.25553/gecc.102

Download the PDF Download citation: BibTeX · RIS · EndNote Version 1.0 · November 2026

Overview

TemperatureTime12-month averagemonthly exposure, cool → hot

Illustrative example of exposure with seasonality and a time drift – exposure should be calculated from the window just before each event, not from one fixed date.

This guidance provides best practices for incorporating time-varying environmental exposures into time-to-event analyses.

Time-varying, moving-average exposures require particular care to ensure they are appropriately included in statistical models. Due to temporal trends in the exposure, exposure data cannot be linked to observation times in the same manner as non-environmental time-varying covariates.

Use the interactive guidance tool below to learn how to tackle this issue.

First, choose a topic:

  • PH Regression with Time-Constant Predictors introduces the proportional hazards (PH) regression model and risk sets.
  • PH Regression with Time-Varying Predictors discusses in detail the challenges of using time-varying environmental exposure data and how to assign variables from different time points.
  • R Walkthrough provides a walkthrough of key steps in R, which you can run in your browser using a toy dataset and see the guidance in action.

PH Regression with Time-Constant Predictors

Time-to-event analyses are commonly used to model disease incidence and mortality, with the Cox proportional hazards regression (PH regression) model being the most common.

Here we provide a brief overview of the PH regression model, with a focus on the aspects most relevant to dealing with time-varying environmental exposures. A comprehensive overview of the PH regression model and its applications is available in Hosmer, Lemeshow, and May (2008) and many other sources.

Proportional Hazards Regression with Time-Constant Predictors

The basic version of the PH regression model takes the form:

λi(t)=λ0(t)exp(βXXi+𝜷zT𝐙i)(1)

Here, λi(t) is the The instantaneous risk of the event at time t for someone who has not yet had the event. for individual i, Xi is the exposure of interest with corresponding coefficient βX, and Zi are adjustment variables. The hazard λi(t) is the instantaneous risk of disease onset (or other event) occurring at time t. The advantage of the proportional hazards model is that the hazard function is decomposed into two components: the baseline hazard, λ0(t), and the covariate term, exp(βXXi + βzTZi). The baseline hazard is a time-varying baseline risk of disease and is not directly estimated in the model. Thus, the model can account for variation in risk over time without having to parametrically specify its form. The covariate term allows for the baseline hazard to be scaled by effects of different predictor variables. Here, we consider a linear exposure-response relationship (βXXi), but the principles apply to non-linear functions of exposure and other more complex settings.

Further, it is common to have the proportional hazards model stratified by additional categorical variable(s). Each stratum has its own baseline hazard. Letting m index the discrete levels of the stratifying variable, the model becomes:

λi,m(t)=λ0,m(t)exp(βXXi+𝜷zT𝐙i)(2)

Including the strata allows for non-parametric adjustment for the stratifying variable(s). In studies related to aging, stratifying by age (e.g., in two-year ranges) is a useful way to account for the complex relationship age has with disease risk (Zhang et al. 2023).

In models (1) and (2), the value βX is the log hazard ratio for the exposure of interest. It is more commonly interpreted on an exponentiated scale, where exp(βX) is the hazard ratio (HR) for a one-unit difference in exposure. As a ratio, the HR quantifies the relative (multiplicative) difference in risk of incident disease, conditional on the other variables adjusted for in the model. The HR can take any value between 0 and positive infinity. An HR greater than 1 indicates increased risk of disease (or other event) and an HR less than 1 indicates lower risk of disease.

↑ Back to section menu

Risk Sets

A key attribute of the PH regression model is that the information for estimating the model parameters comes from comparing the exposure status of those individuals who have an event with those who have not yet had an event, at every time point when someone has an event. The set of individuals who have not yet had an event up to that point is called the The individuals who have not yet had the event and have not been censored at a given time, so are still at risk of the outcome., as it encompasses all individuals currently at risk for the outcome.

Timeline of five individuals over study time 0 to 20. Individual 001 is censored at time 20, 002 has an event at 4, 003 has an event at 13, 004 is censored at 17, and 005 is censored at 6. Dashed vertical lines mark times 4 and 13.
Figure 1: Schematic of event times for a study with five individuals. At study time 4, the active risk set includes individuals 001, 002, 003, 004, and 005. At study time 13, the active risk set is individuals 001, 003, and 004.

How to read Figure 1. Each horizontal line is one individual’s follow-up over study time.

  • ▲ Triangle = event. The individual had the outcome at that time.
  • ● Circle = Follow-up ended without the event being observed, for example through death, drop out, or some other mechanism.. Follow-up ended without an event.
  • Dashed vertical lines mark the two example times discussed below (4 and 13). Everyone whose line reaches a dashed line is in the risk set at that time.

At time 4, a risk set is formed because person 002 experiences the event. At this time, all people contribute information to the risk set (001, 002, 003, 004, and 005).

At time 13, in contrast, only persons 001, 003, and 004 are informing the risk of an event. Person 003 has the event; person 002 had theirs at time 4, and person 005 was censored at time 6.

Risk sets change when individuals have an event or because an individual is censored (through death, drop out, or some other mechanism). When there are no time-varying predictor variables, most software for fitting PH regression models will calculate risk sets automatically based on the event times.

↑ Back to section menu

References

  • Adar, Sara D., Yeh-Hsin Chen, Jennifer C. D’Souza, Marie S. O’Neill, Adam A. Szpiro, Amy H. Auchincloss, Sung Kyun Park, Martha L. Daviglus, Ana V. Diez Roux, and Joel D. Kaufman. 2018. “Longitudinal Analysis of Long-Term Air Pollution Levels and Blood Pressure: A Cautionary Tale from the Multi-Ethnic Study of Atherosclerosis.” Environmental Health Perspectives 126, no. 10 (October): 107003. https://doi.org/10.1289/EHP2966.
  • Hosmer, David W., Stanley Lemeshow, and Susanne May. 2008. Applied Survival Analysis: Regression Modeling of Time-to-Event Data. 2nd. Wiley. https://doi.org/10.1002/9780470258019.
  • Therneau, Terry, Cynthia Crowson, and Elizabeth Atkinson. 2026. Using Time Dependent Covariates and Time Dependent Coefficients in the Cox Model. R package vignette, survival. https://www.icesi.edu.co/CRAN/web/packages/survival/vignettes/timedep.pdf.
  • Zhang, Boya, Jennifer Weuve, Kenneth M. Langa, Jennifer D’Souza, Adam Szpiro, Jessica Faul, Carlos Mendes de Leon, et al. 2023. “Comparison of Particulate Air Pollution from Different Emission Sources and Incident Dementia in the US.” JAMA Internal Medicine 183, no. 10 (October): 1080–1089. https://doi.org/10.1001/jamainternmed.2023.3300.

The Gateway Exposome Coordinating Center is funded by the US National Institute on Aging, U24 AG088894. Feedback or questions: contact@gatewayexposome.org.

Version Information

Current Version: 1.0 (November 2026)

Version History: 1.0 (November 2026): First version.