[R] Competing Risks Analysis

From: Kevin E. Thorpe <kevin.thorpe_at_utoronto.ca>
Date: Fri, 25 May 2007 09:04:38 -0400

I am working on a competing risks problem, specifically an analysis of cause-specific mortality. I am familiar with the cmprsk package and have used it before to create cumulative incidence plots. I also came across an old (1998) s-news post from Dr. Terry Therneau describing a way to use coxph to model competing risks. I am re-producing the post at the bottom of this message.

I would like to know if this approach is still reasonable or are there other ways to go now. I did an RSiteSearch with the term "competing risks" and found some interesting articles but nothing as specific as the post below.

It's actually quite easy.

Assume a data set with n subjects and 4 types of competing events. Then create a data set with 4n observations
First n obs: the data set you would create for an analysis of "time to event type 1", where all other event types are censored. An extra variable "etype" is =1.
Second n obs: the data set you would create for "time to event type 2", with etype=2

fit <- coxph(Surv(time,status) ~ .... + strata(etype), ....

  1. Wei, Lin, and Weissfeld apply this to data sets where the competing risks are not necessarily exclusive, i.e., time to progression and time to death for cancer patients. JASA 1989, 1065-1073. If a given subject can have more than one "event", then you need to use the sandwich estimate of variance, obtained by adding ".. + cluster(id).." to the model statement above, where "id" is variable unique to each subject. (The method of fitting found in WLW, namely to do individual fits and then glue the results together, is not necessary).
  2. If a given subject can have at most one event, then it is not clear that the sandwich estimate of variance is necessary. See Lunn and McNeil, Biometrics (year?) for an example.
  3. The covariates can be coded any way you like. WLW put in all of the strata * covariate interactions for instance (the "x" coef is different for each event type), but I never seem to have a big enough sample to justify doing this. Lunn and McNeil use a certain coding of the treatment effect, so that the betas are a contrast of interest to them; I've used similar things but never that particular one.
  4. "etype" doesn't have to be 1,2,3,... of course; etype= 'paper', 'scissors', 'stone', 'pc' would work as well.

Terry M. Therneau, Ph.D.
----- S-news Article Ends -----

Kevin E. Thorpe
Biostatistician/Trialist, Knowledge Translation Program
Assistant Professor, Department of Public Health Sciences
Faculty of Medicine, University of Toronto
email: kevin.thorpe_at_utoronto.ca  Tel: 416.864.5776  Fax: 416.864.6057

R-help_at_stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 25 May 2007 - 13:11:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 May 2007 - 14:31:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.