if (FALSE) {
require(ggplot2)
## simulate data
set.seed(10)
df.data <- simBuyseTest(1e2, n.strata = 2)
## with one endpoint
ff1 <- treatment ~ TTE(eventtime, status = status, threshold = 0.1)
BT1 <- BuyseTest(ff1, data= df.data)
se.BT1 <- sensitivity(BT1, threshold = seq(0,2,0.25), band = TRUE)
plot(se.BT1)
## with two endpoints
ff2 <- update(ff1, .~. + cont(score, threshold = 1))
BT2 <- BuyseTest(ff2, data= df.data)
se.BT2 <- sensitivity(BT2, threshold = list(eventtime = seq(0,2,0.25), score = 0:2),
band = TRUE)
plot(se.BT2)
plot(se.BT2, col = NA)
}
Run the code above in your browser using DataLab