Format a search for the sample size
Usage
# S3 method for class 'qdm_n_search'
format(x, digits = 4L, ...)Examples
des <- design_binary(
n_t = 12, n_c = 12,
prior_t = prior_beta(0.5, 0.5), prior_c = prior_beta(0.5, 0.5),
criterion = criterion_posterior(theta_tv = 0.2, theta_mav = 0.1,
gamma_go = 0.5, gamma_nogo = 0.8)
)
res <- qdm_find_n(des, data.frame(pi_t = 0.4, pi_c = 0.4),
data.frame(pi_t = 0.7, pi_c = 0.4), target_go = 0.1,
target_nogo = 0.1, n_t = seq(6, 20, by = 2))
format(res)
#> [1] "Search for the sample size (exact enumeration of the outcomes)"
#> [2] " Targets: P(Go criterion met | scenario_go) <= 0.1 and P(NoGo criterion met | scenario_nogo) <= 0.1"
#> [3] " Smallest candidate that meets the targets: n_t = 20, n_c = 20"
#> [4] " P(Go criterion met | scenario_go) = 0.07267"
#> [5] " P(NoGo criterion met | scenario_nogo) = 0.01676"
