- n_successes
integer/numeric vector of length 1 (for 1 population) or
2 (for 2 populations) providing the number of "successes"
- n_failures
Similar to n_successes, but for failures. Only provide this
OR n_total.
- n_total
Similar to n_successes, but for total number of trials. Only provide this
OR n_failures.
- p
optional. If provided and inference is being made for
a single population, prop_test_b will return the posterior
probability that the population proportion is less than this value.
- predict_for_n
Number in a future trial. If missing, prop_test_b
will use the observed number of trials.
- ROPE
ROPE for odds ratio if inference is being made for two populations.
Provide either a single value or a vector of length two. If the former,
the ROPE will be taken as (1/ROPE,ROPE). If the latter, these will be
the bounds of the ROPE.
- prior
Either "jeffreys" (Beta(1/2,1/2)) or "uniform" (Beta(1,1)).
This is ignored if prior_shapes is provided.
- prior_shapes
Vector of length two, giving the shape parameters
for the beta distribution that will act as the prior on the population
proportions.
- CI_level, PI_level
The posterior probability to be contained in the
credible and prediction intervals respectively.
- plot
logical. Should a plot be shown?
- seed
Always set your seed! (Unused for a single population proportion.)
- mc_error
The number of posterior draws will ensure that with 99%
probability the bounds of the credible intervals of \(p_1 - p_2\) will be
within \(\pm\) mc_error. (Ignored for a single population proportion.)