[R] Fold function with several time varying covariates

Jenkins, Helen h.jenkins05 at imperial.ac.uk
Sun Jun 28 19:02:24 CEST 2009


Hi

I'm trying to use the fold function as described here:
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf Page9

It does say that you can use this when you have more than one time varying covariate: in the description of the argument cov it says:
"cov: A vector giving the column numbers of the time-dependent covariate in data, or a list of vectors
if there is more than one time-dependent covariate."

But I'm struggling with the syntax to list these vectors (I have 3 time varying covariates). I've tried "cov=list(10:20,21:31,32:42)"
But this just gives me an error message. 

Does anyone know how I can list my vectors in the context?

Thanks
Helen




More information about the R-help mailing list