Denis Pelletier
2011-Jan-14 16:57 UTC
[R] Survfit: why different survival curves but same parameter estimates?
Hello, 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 ------------------------------------------------ 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 http://www4.ncsu.edu/~dpellet
Terry Therneau
2011-Jan-17 14:03 UTC
[R] Survfit: why different survival curves but same parameter estimates?
----begin included message -------- 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). -- end inclusion ---- This sounds wrong to me also. Could you give more information so that I can verify the issue? (See the posting guide). What version of R and of the survival package? Is is possible to send me a copy of the example that fails? Terry Therneau