Used internally. This function takes a matrix
as calculated by the
get_draws_binom()
, get_draws_norm()
or a corresponding custom function
(specified using the fun_draws
argument in setup_trial()
; see
get_draws_generic()
), and an equivalence difference, and calculates the
probability of all arms being equivalent (absolute differences between
highest and lowest value in the same set of posterior draws being less than
the difference considered practically equivalent).
prob_all_equi(m, equivalence_diff = NULL)
A single numeric value corresponding to the probability of all arms being practically equivalent.
a matrix with one column per trial arm (named as the arms
) and one
row for each draw from the posterior distributions.
single numeric value (> 0
) or NULL
(default,
corresponding to no equivalence assessment). If a numeric value is
specified, estimated absolute differences smaller than this threshold will
be considered equivalent. For designs with a common control
arm, the
differences between each non-control arm and the control
arm is used, and
for trials without a common control
arm, the difference between the
highest and lowest estimated outcome rates are used and the trial is only
stopped for equivalence if all remaining arms are equivalent.