koshihaku
2011-Sep-27 12:51 UTC
[R] How does the survfit.coxph calculate the survival value?
Sorry for a long question. I am in an urgent using R to fit the cox proportional model. My data is a data frame including 100 individuals which are software stress tests. There are time-to-failure and six covariates meaning the system resource (every 4 minutes). Is it possible to use R to fit the Cox model? I used "*coxph*" to estimated the coefficients for both time-independent and time-dependent covariates. And next I need to calculated the survival and hazard rate for cox model with time-independent and that with time-dependent covariates. I see many people use *survfit.coxph *to get the survival. Could anybody please tell me how is the survival value calculated? For example, what kind of procedure. Any suggestion is a great help! -- View this message in context: http://r.789695.n4.nabble.com/How-does-the-survfit-coxph-calculate-the-survival-value-tp3847179p3847179.html Sent from the R help mailing list archive at Nabble.com.
Terry Therneau
2011-Sep-28 13:56 UTC
[R] How does the survfit.coxph calculate the survival value?
The answers to your questions consume an entire chapter of my book, so it is difficult to write a reasonable email response. When there are time dependent covariates, the creation and interpretation of a survival curve is particularly subtle. The survfit.coxph routine calculates the usual estimates: Breslow, Fleming-Harrington, or Kalbfleisch-Prentice; these differ in how they handle ties but the numerical results are usually very close. A treatise on the formulas, theory, and derivation of these is beyond the scope of this message. Terry Therneau --- begin included message --- I am in an urgent using R to fit the cox proportional model. My data is a data frame including 100 individuals which are software stress tests. There are time-to-failure and six covariates meaning the system resource (every 4 minutes). Is it possible to use R to fit the Cox model? I used "*coxph*" to estimated the coefficients for both time-independent and time-dependent covariates. And next I need to calculated the survival and hazard rate for cox model with time-independent and that with time-dependent covariates. I see many people use *survfit.coxph *to get the survival. Could anybody please tell me how is the survival value calculated? For example, what kind of procedure.
koshihaku
2011-Sep-29 00:54 UTC
[R] How does the survfit.coxph calculate the survival value?
Thank you very much! I am analyzing software stress test data using R, and fiting data by coxph. I think the survfit.coxph can give the estimated baseline survival S_0(t_i), and we can calculated the survival S(t_i) by using S_0(t_i) and the x(t_i). Then can I use the function lambda={S(t_(i-1))-S(t_i)}/S(t_(i-1)) to calculate the hazard at time t_i ? Koshihaku -- View this message in context: http://r.789695.n4.nabble.com/How-does-the-survfit-coxph-calculate-the-survival-value-tp3847179p3853923.html Sent from the R help mailing list archive at Nabble.com.
koshihaku
2011-Sep-29 01:23 UTC
[R] How does the survfit.coxph calculate the survival value?
Dear Professor Terry Therneau, Sorry for another naive question about R. Some one suggested me to use mathematica to analyze Cox proportional hazard model. For example estimate the coefficients, and calculate the survival and hazard function. But I think that may be not possible, especially that all the six covariates in my model are time-dependent. Could you please give me any opinion on this? Koshihaku -- View this message in context: http://r.789695.n4.nabble.com/How-does-the-survfit-coxph-calculate-the-survival-value-tp3847179p3853994.html Sent from the R help mailing list archive at Nabble.com.