# NOT RUN {
## IE when there are no ties in phat:
# }
# NOT RUN {
resp <- c(1, 1, 0, 0, 0, 0, 0, 1, 0, 0)
prob <- (10:1) * 0.1
IE(y = resp, phat = prob, cutoff = 3)
# expect answer: (2/3) / (3/10)
## IE when there are ties
resp <- c(1, 1, 0, 0, 0, 0, 0, 1, 0, 0)
prob <- c(1, 1, 1, 0.4, 0.4, 0.3, 0.2, 0.15, 0.1, 0)
IE(y = resp, phat = prob, cutoff = 3)
# }
# NOT RUN {
# expect answer: same as above
# }
Run the code above in your browser using DataLab