Rui Song
2004-Aug-19 03:20 UTC
[R] A question about external time-dependent covariates in cox model
Dear Sir or Madam: I am a graduate student in UW-Madison statistics department. I have a question about fitting a cox model with external time-dependent covariates. Say the original data is in the following format: Obs Eventtime Status Cov(time=5) Cov(time=8) Cov(time=10) Cov(time=12) 1 5 1 2 2 8 0(censored) 2 4 3 10 1 2 4 6 4 12 1 2 4 6 8 .... Notice that the time-dependent covariates are identical at the same time points for all obs since they are external to the failure process. process. Then I organized the data as the following: obs start end eventtime status cov 1 0 5 5 1 2 2 0 5 8 0 2 2 5 8 8 0 4 3 0 5 10 1 2 3 5 8 10 1 4 3 8 10 10 1 6 4 0 5 12 1 2 4 5 8 12 1 4 4 8 10 12 1 6 4 10 12 12 1 8 And fit the model using: fit<-coxph(Surv(start, end, status)~cov); When I fit the model to my data set (Which has 89 observations and 81 distinct time points, sort of large.), I always got a message that "Process R segmentation fault (core dumped)". Would you let me know if it is due to the matrix sigularity in the computation of the partial likelihood or something else? And how should I fit a cox model with external time-dependent covariates? Thanks a lot for your time and help! Sincerely, Rui Song