therneau/survival

A question about the documentation

Closed this issue · 1 comments

I'm taking a survival analysis class, and in elementary concepts, we're studing Nelson-Aalen estimator and Kaplan-Meier.

I think in the package, Kaplan-Meier estimador is give by:

survfit(Surv(time,status)~1)

And Nelson-Aalen is:

survfit(Surv(time,status)~1, stype = 2)

Am I correct? If yes, I think that should be better in documentation. I can do a PR to improve it, if my view are right.

You are incorrect. The result of survfit contains both the survival and cumulative hazard estimates. By default the survival estimate is the KM (stype=1), and the cumulative hazard estimate is the Nelson-Aalen (ctype=1). To plot the cumulative hazard see help("plot.survfit"), and look at the cumhaz argument.