# Kaplan-Meier survival curve of the Time until definitive deterioration
# of the score "QoL" with a minimal clinically important difference of 5 points
# as compared to the baseline score
#tudd1=TUDD(dataqol2, score="QoL", MCID=5,ref.init="baseline",ref.def="def1")
#ttd_1=merge(tudd1,unique(dataqol2[,c("id","arm")]))
## In the next graph, we added the number of patients at risk at time t
## and the result of the Log Rank Test and the Univariate Hazard Ratio
## of arm 2 vs. arm 1
#plotTTD(ttd_1$time.5.QoL,ttd_1$event.5.QoL,ttd_1$arm,nrisk=T,nevent=F,
#group.names=c("arm 1","arm 2"),t=seq(0,8,2),info=T,pos.info=c(6,0.8),
#xlab="time (months)",ylab="probability (%)")
Run the code above in your browser using DataLab