Print a search for the sample size
Usage
# S3 method for class 'qdm_n_search'
print(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)
)
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))
#> Search for the sample size (exact enumeration of the outcomes)
#> Targets: P(Go criterion met | scenario_go) <= 0.1 and P(NoGo criterion met | scenario_nogo) <= 0.1
#> Smallest candidate that meets the targets: n_t = 20, n_c = 20
#> P(Go criterion met | scenario_go) = 0.07267
#> P(NoGo criterion met | scenario_nogo) = 0.01676
#> Probabilities for the candidate sample sizes
#> n_t n_c prob_go prob_nogo met
#> 6 6 0.18844 0.08387 FALSE
#> 8 8 0.22223 0.06595 FALSE
#> 10 10 0.12644 0.05214 FALSE
#> 12 12 0.14854 0.04137 FALSE
#> 14 14 0.16612 0.03288 FALSE
#> 16 16 0.10285 0.02621 FALSE
#> 18 18 0.11655 0.02093 FALSE
#> 20 20 0.07267 0.01676 TRUE
#> Decision probabilities with the chosen sample size
#> scenario pi_t pi_c Go NoGo Gray Miss
#> scenario_go 0.4 0.4 0.07267 0.43615 0.4912 0
#> scenario_nogo 0.7 0.4 0.69555 0.01676 0.2877 0
