# \donttest{
## Breast Cosmesis Data
bcos=cosmesis
bcos2<-data.frame(bcos[,1:2], x=1*(bcos$treat=="RCT"))
g<-0.41 #Hanson and Johnson 2004, JCGS,
res1<-maple.aft(cbind(left, right)~x, data=bcos2, M=c(1,30), g=g, tau=100, x0=1)
op<-par(mfrow=c(1,2), lwd=1.5)
plot(x=res1, which="likelihood")
plot(x=res1, y=data.frame(x=0), which="survival", model='aft', type="l", col=1,
add=FALSE, main="Survival Function")
plot(x=res1, y=data.frame(x=1), which="survival", model='aft', lty=2, col=1)
legend("bottomleft", bty="n", lty=1:2, col=1, c("Radiation Only", "Radiation and Chemotherapy"))
par(op)
# }
Run the code above in your browser using DataLab