Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2012 Dec 20;31(29):3946-58.
doi: 10.1002/sim.5452. Epub 2012 Jul 4.

Generating survival times to simulate Cox proportional hazards models with time-varying covariates

Affiliations
Free PMC article

Generating survival times to simulate Cox proportional hazards models with time-varying covariates

Peter C Austin. Stat Med. .
Free PMC article

Erratum in

  • Stat Med. 2013 Mar 15;32(6):1078

Abstract

Simulations and Monte Carlo methods serve an important role in modern statistical research. They allow for an examination of the performance of statistical procedures in settings in which analytic and mathematical derivations may not be feasible. A key element in any statistical simulation is the existence of an appropriate data-generating process: one must be able to simulate data from a specified statistical model. We describe data-generating processes for the Cox proportional hazards model with time-varying covariates when event times follow an exponential, Weibull, or Gompertz distribution. We consider three types of time-varying covariates: first, a dichotomous time-varying covariate that can change at most once from untreated to treated (e.g., organ transplant); second, a continuous time-varying covariate such as cumulative exposure at a constant dose to radiation or to a pharmaceutical agent used for a chronic condition; third, a dichotomous time-varying covariate with a subject being able to move repeatedly between treatment states (e.g., current compliance or use of a medication). In each setting, we derive closed-form expressions that allow one to simulate survival times so that survival times are related to a vector of fixed or time-invariant covariates and to a single time-varying covariate. We illustrate the utility of our closed-form expressions for simulating event times by using Monte Carlo simulations to estimate the statistical power to detect as statistically significant the effect of different types of binary time-varying covariates. This is compared with the statistical power to detect as statistically significant a binary time-invariant covariate.

PubMed Disclaimer

Figures

Figure 1
Figure 1
Statistical power to detect a binary treatment as statistically significant.

Comment in

Similar articles

Cited by

References

    1. Leemis LM. Variate generation for accelerated life and proportional hazards models. Operations Research. 1987;35:892–894.
    1. Bender R, Augustin T, Blettner M. Generating survival times to simulate Cox proportional hazards models. Statistics in Medicine. 2005;24(11):1713–1723. - PubMed
    1. Cox D. Regression models and life tables (with discussion) Journal of the Royal Statistical Society - Series B. 1972;34:187–220.
    1. Therneau TM, Grambsch PM. Modeling Survival Data: Extending the Cox Model. New York: Springer-Verlag; 2000.
    1. Suissa S. Immortal time bias in pharmacoepidemiology. American Journal of Epidemiology. 2007;167(4):492–499. - PubMed

Publication types