When I use summary()
for a survfit
object, I get a nice data.frame with columns for
time n.risk n.event survival std.err lower 95% CI upper 95% CI
But summary()
on a coxph
object gives a different result. I realize functions work differently on different object classes, but is there a command that works on coxph
in a similar way that summary()
works on survfit
? I haven't been able to find answers so far in the documentation.
Thanks! Tom
To expand a bit on @BenBarnes comment.
You can pass a coxph
object (the result of fitting the model) to the survfit
function and it will return the information similar to using survfit directly. By default it will give a single table (or plotted line if you plot the result) corresponding to all the covariates at their mean, but you can also give it a newdata
data frame with the covariate values you want to use and it will give you a table (plotted line) for each row of the data frame.