Hostname: page-component-74656f9884-rdgjk Total loading time: 0 Render date: 2026-11-08T04:57:50.622Z Has data issue: false hasContentIssue false

Simulating Duration Data for the Cox Model

Published online by Cambridge University Press:  24 May 2018

Rights & Permissions [Opens in a new window]

Abstract

The Cox proportional hazards model is a popular method for duration analysis that is frequently the subject of simulation studies. However, no standard method exists for simulating durations directly from its data generating process because it does not assume a distributional form for the baseline hazard function. Instead, simulation studies typically rely on parametric survival distributions, which contradicts the primary motivation for employing the Cox model. We propose a method that generates a baseline hazard function at random by fitting a cubic spline to randomly drawn points. Durations drawn from this function match the Cox model’s inherent flexibility and improve the simulation’s generalizability. The method can be extended to include time-varying covariates and non-proportional hazards.

Information

Type
Research Notes
Copyright
© The European Political Science Association 2018 
Figure 0

Fig. 1 Generating a baseline hazard function via the random spline method Note: (a) An example of the randomly-drawn time points. (b) The cubic spline fit to those points to create the failure cumulative distribution function (CDF). (c) The transformation from the failure CDF to a failure probability density function (PDF). (d) Plots the survivor function and (e) graphs the baseline hazard function.

Figure 1

Fig. 2 Drawing a duration for an observation from the simulated survivor function Note: The solid line is the baseline survivor function, which represents the survival probability for an observation with a 0 for every covariate. The dashed line is the survivor function for an observation whose exponentiated linear predictor is 1.5. This observation has a risk of failure at time t conditional on survival through time t that is 50 percent higher than the baseline.

Figure 2

Fig. 3 Example output from the random spline method Note: The graphs illustrate output from one iteration of the random spline method. (a) The hazard function and (b) a sample of durations generated from the hazard function.

Figure 3

Table 1 Coefficient Estimate Means and Root Mean Squared Error (RMSE) From Data Simulated Via the Random Spline Method

Supplementary material: Link

Harden and Kropko Dataset

Link
Supplementary material: PDF

Harden and Kropko supplementary material

Harden and Kropko supplementary material

Download Harden and Kropko supplementary material(PDF)
PDF 143.1 KB