0

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

Backlin
  • 14,612
  • 2
  • 49
  • 81
Tom
  • 4,860
  • 7
  • 43
  • 55
  • 2
    Is there a reason you couldn't extract the formula from the cox model and use it to construct a survfit object? – BenBarnes Oct 25 '12 at 18:34

1 Answers1

1

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.

Greg Snow
  • 48,497
  • 6
  • 83
  • 110