From: Peter Dalgaard BSA (p.dalgaard@pubhealth.ku.dk)
Date: Fri 23 Feb 2001 - 09:13:17 EST
Message-ID: <x23dd61fci.fsf@blueberry.kubism.ku.dk>
Meles MELES <meles@free.fr> writes:
> And here is my first question.
> I'm actually trying to model a survival curve using a cox model.
> But I need the baseline cumulative hazard. I've been looking around on
> the web and the archives, and I found that it as to do with the
> nelson-aalen estimation.
> But I must not understand all the doc very well, because I can't get
> the baseline hazard.
> Could you help me, please.
survfit(coxph(...)) gives you the baseline survival function, which by
default (type="aalen") is calculated as S(t) = exp(-Lambda(t))
where Lambda(t) is the cumulative hazard. So all you have to do is to
reverse the formula as Lambda(t) = -log(S(t))
The estimated S(t) is in the $surv component of the object returned by
survfit().
e.g.
example(survfit)
s <- survfit(fit)
plot(c(0,s$time),c(0,-log(s$surv)),type='s')
-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:33 EST