# Solved – Cox regression with time varying covariates

I am looking for resources on Cox proportional hazards model with time varying covariates. I'm new to survival analysis so I'm looking for something not overly mathematical. I would also appreciate any information about software implementations that can deal with this problem.

Contents

I might be able to give you some tips:

Recommended books…

Kleinbaum, Klein: Survival analysis – A Self-Learning text http://www.springer.com/statistics/life+sciences,+medicine+%26+health/book/978-1-4419-6645-2 In my opinion the best book on this matter and it includes time-varying covariates and also how to program the computations in SAS and R.

Also look at: http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf Which is John Fox explanation and he uses R to calculate, which is great.

Second: what type of time-varying covariates do you have? – Multiple observations per individual? – Multiple endpoints per individual?

In general, if you have 1 endpoint of interest and multiple observations per individual, you usually set up the data frame in a format which means that each observation corresponds to one row (therefore one individual may have several rows of data) and you create a start variable and a stop variable, which is simply the start and stop intervals for each observation.

The usual Cox model:

``coxph(Surv(survival, event) ~ predictors, data = df) ``

The time-dependent Cox model (if data is set up as described above):

``coxph(Surv(star, stopp, event) ~ predictors, data = df) ``

A very well written manual can be found here: http://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf

Rate this post