The problem will be fixed in the next resease of the survival code. (That is, it is fixed on our local version of R). The summary.survfit result now includes an element 'table' containing the matrix that is shown by print.survfit. Terry
Getting estimates from survfit.coxph
3 messages · Terry Therneau, Mark Wardle, Peter Dalgaard
Can't ask for more than that! Many many thanks for making all these tools available. I wince when I see my colleagues struggling with SPSS or SAS! R and the bundled and third-party libraries have saved me an inordinate amount of time and effort! Best wishes, Mark
On 10/12/2007, Terry Therneau <therneau at mayo.edu> wrote:
The problem will be fixed in the next resease of the survival code. (That is,
it is fixed on our local version of R). The summary.survfit result now includes
an element 'table' containing the matrix that is shown by print.survfit.
Terry
______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK
Terry Therneau wrote:
The problem will be fixed in the next resease of the survival code. (That is, it is fixed on our local version of R). The summary.survfit result now includes an element 'table' containing the matrix that is shown by print.survfit. Terry
Hi Terry, Speaking of coxph... I noticed a silly inconsistency between summary.coxph and other modeling functions: > m <- summary( coxph( Surv(start, stop, event) ~ x, test2)) > coef(m) NULL > m$coef coef exp(coef) se(coef) z p x -0.02110521 0.979116 0.7951769 -0.02654153 0.98 > coef(summary(lm.D9)) Estimate Std. Error t value Pr(>|t|) (Intercept) 5.032 0.2202177 22.850117 9.547128e-15 groupTrt -0.371 0.3114349 -1.191260 2.490232e-01 > summary(lm.D9)$coef Estimate Std. Error t value Pr(>|t|) (Intercept) 5.032 0.2202177 22.850117 9.547128e-15 groupTrt -0.371 0.3114349 -1.191260 2.490232e-01 the problem being that stats:::coef.default is looking for object$coefficients but summary.coxph uses rval$coef. And while we're at it, if your "p" column was renamed "Pr(>|z|)" or so, then printCoefmat could have been used. Apart from significance stars (which you might well dislike), this also provides a nicer display of the p values themselves: > printCoefmat(summary(lm.D9)$coef) Estimate Std. Error t value Pr(>|t|) (Intercept) 5.03200 0.22022 22.8501 9.547e-15 *** groupTrt -0.37100 0.31143 -1.1913 0.249 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907