bayes_adcock | R Documentation |
Returns the Bayesian assurance of observing that the absolute difference between the true underlying population parameter and the sample estimate falls within a margin of error no greater than a fixed precision level, d.
bayes_adcock( n, d, mu_beta_a, mu_beta_d, n_a, n_d, sig_sq, alpha, mc_iter = 1000 )
n |
sample size (either vector or scalar). |
d |
fixed precision level |
mu_beta_a |
analysis stage mean |
mu_beta_d |
design stage mean |
n_a |
sample size at analysis stage. Also quantifies the amount of prior information we have for parameter μ. |
n_d |
sample size at design stage. Also quantifies the amount of prior information we have for where the data is being generated from. |
sig_sq |
known variance σ^2. |
alpha |
significance level |
mc_iter |
number of MC samples evaluated under the analysis objective |
approximate Bayesian assurance under precision-based conditions
n <- seq(20, 145, 5) out <- bayes_adcock(n = n, d = 0.20, mu_beta_a = 0.64, mu_beta_d = 0.9, n_a = 20, n_d = 10, sig_sq = 0.265, alpha = 0.05, mc_iter = 1000) head(out$assurance_table) out$assurance_plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.