if(require(ggplot2)){
## simulate data
set.seed(10)
df.data <- simBuyseTest(1e2, n.strata = 2)
ff1 <- treatment ~ bin(toxicity) + TTE(eventtime, status = status,
restriction = 1, threshold = 0.5)
BT1 <- BuyseTest(ff1, data= df.data)
plot(BT1, type = "hist")
plot(BT1, type = "pie")
plot(BT1, type = "racetrack")
ff2 <- update(ff1, ~.+cont(score))
BT2 <- BuyseTest(ff2, data= df.data)
plot(BT2, type = "hist")
plot(BT2, type = "pie")
plot(BT2, type = "racetrack")
}
Run the code above in your browser using DataLab