Related Experiment Video
Updated: May 8, 2026

An R-Based Landscape Validation of a Competing Risk Model
Published on: September 16, 2022
Data generation for the Cox proportional hazards model with time-dependent covariates: a method for medical
1Center for the Study of American Politics, Institution for Social and Policy Studies, Yale University, New Haven, CT 06520-8209, U.S.A.
Abstract:
The proliferation of longitudinal studies has increased the importance of statistical methods for time-to-event data that can incorporate time-dependent covariates. The Cox proportional hazards model is one such method that is widely used. As more extensions of the Cox model with time-dependent covariates are developed, simulations studies will grow in importance as well. An essential starting point for simulation studies of time-to-event models is the ability to produce simulated survival times from a known data generating process. This paper develops a method for the generation of survival times that follow a Cox proportional hazards model with time-dependent covariates. The method presented relies on a simple transformation of random variables generated according to a truncated piecewise exponential distribution and allows practitioners great flexibility and control over both the number of time-dependent covariates and the number of time periods in the duration of follow-up measurement. Within this framework, an additional argument is suggested that allows researchers to generate time-to-event data in which covariates change at integer-valued steps of the time scale. The purpose of this approach is to produce data for simulation experiments that mimic the types of data structures applied that researchers encounter when using longitudinal biomedical data. Validity is assessed in a set of simulation experiments, and results indicate that the proposed procedure performs well in producing data that conform to the assumptions of the Cox proportional hazards model.
Related Concept Videos
Assumptions of Survival Analysis
Comparing the Survival Analysis of Two or More Groups
Introduction To Survival Analysis
The primary goal of survival analysis is to estimate survival time—the time until a...
The Mantel-Cox Log-Rank Test
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Kaplan-Meier Approach

