# NOT RUN {
require(survival)
data(leukemia)
time<-leukemia$time
status<-leukemia$status
# One group
res<-km(time,status)
res$fit.km
# Two groups
group<-leukemia$x
res<-km(time,status,group)
res<-km(time,status,group,title="Kaplan Meier curve")
res<-km(time,status,group,title="Kaplan Meier curve",pdfname="My survival curve")
res<-km(time,status,group,pdfname="My survival curve",pdfwidth=11.69,pdfheight=8.27)
res$fit.km
names(res$fit.km)
res$lr
names(res$lr)
res$p.lr
# }
Run the code above in your browser using DataLab