[R] Plotting Cumulative Hazard Functions with Strata

j0645073 joseph.campbell1 at utsa.edu
Sat Jun 20 06:23:50 CEST 2009


Hello:

So i've fit a hazard function to a set of data using
kmfit<-survfit(Surv(int, event)~factor(cohort))

this factor variable, "cohort" has four levels so naturally the strata
variable has 4 values. 

I can use this data to estimate the hazard rate
haz<-n.event/n.risk

and calculate the cumulative hazard function by
H<--log(haz)

Now, I would like to plot this cumulative hazard function by time and
differentiate the curves by strata. For the life of me I cannot seem to do
it.

Any help would be greatly appreciated.

Regards,

j
-- 
View this message in context: http://www.nabble.com/Plotting-Cumulative-Hazard-Functions-with-Strata-tp24121979p24121979.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list