# NOT RUN {
## the sample datasets
radio <- Radiationdata$radio
radioplus <- Radiationdata$radioplus
trisk <- Radiationdata$trisk
nrisk_radio <- Radiationdata$nrisk.radio
nrisk_radioplus <- Radiationdata$nrisk.radioplus
plot(radio,xlab="time",ylab="survival rates",type="l",
lty=2,col="cyan4",xlim=c(1,70),main="Curves extracted by ScanIt software")
lines(radioplus,type="l",col="red4",lty=1)
legend("topright", c("Radiotherapy", "Radiotherapy plus cetuximab"),
col = c("cyan4","red4"),lty=c(2,1),text.col = "green4",bty = "n")
text(40,80,"Reported Hazard Ratio with 95% CI:")
text(40,75,"0.68 (0.52,0.89)")
## reconstruct the IPD from the sample dataset
pre_radio <- preprocess(dat=radio, trisk=trisk,nrisk=nrisk_radio,maxy=100)
est_radio <- getIPD(prep=pre_radio,armID=0,tot.events=NULL)
pre_radio_plus <- preprocess(dat=radioplus, trisk=trisk,nrisk=nrisk_radioplus,maxy=100)
est_radio_plus <- getIPD(prep=pre_radio_plus,armID=1,tot.events=NULL)
surv2 <- survreport(ipd1=est_radio$IPD,ipd2=est_radio_plus$IPD,arms=2,
interval=8,s=c(0.75,0.5,0.25),showplots=TRUE)
print(surv2)
# }
Run the code above in your browser using DataLab