# Read data (directly from web-page): leukemia=read.table("http://www.math.uio.no/~borgan/abg-2008/data/leukemia.txt", header=T) # Attach the library with commands for survival analysis: library(survival) # Compute and make separate plots for the two treatments: fit.leuk=survfit(Surv(time,status)~treat, data=leukemia, type="fl", conf.type="none") plot(fit.leuk, fun="cumhaz", mark.time=F, lty=c(1,2), xlab="Weeks", ylab="Cumulative hazard")