Generate draws from posterior beta-binomial distributions
Source:R/get_ys_and_draws.R
get_draws_binom.Rd
Used internally. This function generates draws from posterior distributions
using separate beta-binomial models (binomial outcome, conjugate beta prior)
for each arm, with flat (beta(1, 1)
) priors.
Arguments
- arms
character vector, currently active
arms
as specified insetup_trial()
/setup_trial_binom()
/setup_trial_norm()
.- allocs
character vector, allocations of all patients (including allocations to currently inactive
arms
).- ys
numeric vector, outcomes of all patients in the same order as
alloc
(including outcomes of patients in currently inactivearms
).- control
unused argument in the built-in functions for
setup_trial_binom()
and setup_trial_norm, but required as this argument is supplied by therun_trial()
function, and may be used in user-defined functions used to generate posterior draws.- n_draws
single integer, number of posterior draws.