[R-sig-Epi] cox model with time-dependent covariates

raphaëlle métras metras.raphaelle at choisyclub.org
Mon Jan 17 13:22:47 CET 2011


Dear all,

I am planning to run a cox model with time-dependent covariates. I would
like to use the 'fold' function (Fox, 2002:
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf)
to create the dataset, with one observation per subject & time-window, and
then  use the 'coxph' function of the survival package to run the model.

However, I had a couple of questions, and I can't find the answer on the
internet:

1. In the document writtent by Fox, the new dataset created for the
purpose of the time-dependent covariates model (Rossi.2) numbers the
observations 1.1, 1.2, 1.3, 1.4, 1.5, etc. which corresponds to the
measurements in the different time-windows for subject 1. My question is
the following: if I run a cox model on such a dataset, is the model
accounting for the fact that 1.1, 1.2, 1.3, ... belongs to the same
subject?

2. I will have a big dataset, i.e. 40,000 subjects and 36 time-windows,
i.e. 1,440,000 lines, and about 20 covariates. I was wondering if I should
expect some big troubles to run my analysis, or can the software handle so
many rows?

Many thanks for your help and your time,

Regards,

Raphaelle



More information about the R-sig-Epi mailing list