prob_better | R Documentation |
Used internally. This function takes a matrix
as calculated by the
get_draws_binom()
, get_draws_norm()
or a corresponding custom function
(as specified using the fun_draws
argument in setup_trial()
; see
get_draws_generic()
) and a single character specifying the control
arm,
and calculates the probabilities of each arm being better than a common
control
(defined as either higher or lower than the control
, as specified
by the highest_is_best
argument in setup_trial()
, setup_trial_binom()
or setup_trial_norm()
). This function also calculates equivalence and
futility probabilities compared to the common control
arm, as specified in
setup_trial()
, setup_trial_binom()
or setup_trial_norm()
, unless
equivalence_diff
or futility_diff
, respectively, are set to NULL
(the default).
prob_better(
m,
control = NULL,
highest_is_best = FALSE,
equivalence_diff = NULL,
futility_diff = NULL
)
m |
a matrix with one column per trial arm (named as the |
control |
a single character string specifying the common |
highest_is_best |
single logical, specifies whether larger estimates of
the outcome are favourable or not; defaults to |
equivalence_diff |
single numeric value ( |
futility_diff |
single numeric value ( |
A named (row names corresponding to the trial arms
) matrix
containing 1-3 columns: probs_better
, probs_equivalence
(if
equivalence_diff
is specified), and probs_futile
(if futility_diff
is
specified). All columns will contain NA
for the control arm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.