Re: [R] cch function and time dependent covariates

From: Terry Therneau <therneau_at_mayo.edu>
Date: Thu, 12 Jun 2008 08:25:39 -0500 (CDT)

  The cch function was added to the package by Breslow and Lumley, neither of which appears to be monitoring the list lately. Since it claims to impliment the methods in Li and Therneau, and I don't know the cch code, let me suggest an alternate way to create your fit:
  Assume that your data set has the ususal coxph variables, including time-dependent covariates as multiple observations per subject using (start, stop) style, along with 2 other variables

  	id = a unique identifier per subject
  	case = 0 if the subject is a member of the random subcohort
  	       1 if the subject is a case (an event from outside the subcohort)
  	       

Then

   coxph(Surv(time1, time2, status) ~ x1 + x2+ .... + offset(-100*case) +

   	     cluster(id), data=mydata)
   	      	       

Will fit the case-cohort model. This correctly allows for time-dependent covariates. It corresponds to the "Self" method of cch.   Why -100? It causes the case to have a relative weight of approx 0 in a particular weighted mean; exp(-100) is small enough and doesn't cause trouble for the exp function.   

          Terry Therneau



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 12 Jun 2008 - 13:43:00 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 Thu 12 Jun 2008 - 15:30:38 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.

list of date sections of archive