# to obtain 95% CIs for n = 30 and X = 0 to 30
blyth.still.casella(n = 30, alpha = 0.05, digits = 4)
# to obtain 90% CIs, endpoint types, indices of coincidental endpoints (if any),
# and range of each endpoint for n = 30 and X = 23
blyth.still.casella(n = 30, X = 23, alpha = 0.05, digits = 4, additional.info = TRUE)
# use initial confidence intervals defined by the user instead of Clopper-Pearson CIs
# CIs.input needs to be a (n + 1) x 2 matrix with sufficient coverage
CIs.input <- matrix(c(0,1), nrow = 11, ncol = 2, byrow = TRUE) # start with [0,1] intervals
blyth.still.casella(n = 10, alpha = 0.05, digits = 4, CIs.init = CIs.input, additional.info = TRUE)
Run the code above in your browser using DataLab