# EXERCISE 3.1 # ============= # Read leukemia data: leukemia=read.table("http://folk.uio.no/borgan/abg-2008/data/leukemia.txt",header=T) # We compute Nelson-Aalen estimates and plot them in one figure # (using the default "efron" method for handling tied failure times): fit=coxph(Surv(time,status)~strata(treat),data=leukemia) surv=survfit(fit) plot(surv,fun="cumhaz", mark.time=F,xlim=c(0,25),ylim=c(0,4), xlab="Weeks",ylab="Cumulative hazard",lty=1:2) legend("topleft",c("Placebo","6-MP"),lty=1:2)