[R] Survfit: why different survival curves but same parameter estimates?

Denis Pelletier denis_pelletier at ncsu.edu
Fri Jan 14 17:57:36 CET 2011


I'm trying to estimate a Cox proportional hazard model with time-varying covariates using coxph. The parameter estimates are fine but there is something wrong with the survival curves I get with survfit (results are not plausible).

Let me explain why I think something's wrong.

To make sure I'm setting up my data correctly to estimate a model with time-varying covariates, I start with a model and data that only has constant covariates. I can then estimate this model with "model1 <- coxph(formula=Surv(y1, y2)~x ...)" and rearrange my data as if covariates are changing over time and estimate the model with "model2 <- coxph(formula=Surv(w1, w2, w3) ~x ...)". It works and I get the same estimates in model1 and model2. BUT, the survival curves generated by survfit(model1) and survfit(model2) are not the same. The survival curve from survfit(model2) does not decrease as quickly as the one from survfit(model1). They are quite different. Looking at my data, I would say that the results of survfit(model1) are plausible but not the results from survfit(model2).

I would very much welcome any comments or suggestions.

Denis Pelletier
Department of Economics
Poole College of Management
North Carolina State University
Box 8110
Raleigh, NC 27695-8110, USA
phone: (+1) 919 513 7408
fax: (+1) 919 515 5613

More information about the R-help mailing list