validate_trial | R Documentation |
Used internally. Validates the inputs common to all trial specifications, as
specified in setup_trial()
, setup_trial_binom()
and setup_trial_norm()
.
validate_trial(
arms,
true_ys,
start_probs = NULL,
fixed_probs = NULL,
min_probs = rep(NA, length(arms)),
max_probs = rep(NA, length(arms)),
rescale_probs = NULL,
data_looks = NULL,
max_n = NULL,
look_after_every = NULL,
randomised_at_looks = NULL,
control = NULL,
control_prob_fixed = NULL,
inferiority = 0.01,
superiority = 0.99,
equivalence_prob = NULL,
equivalence_diff = NULL,
equivalence_only_first = NULL,
futility_prob = NULL,
futility_diff = NULL,
futility_only_first = NULL,
highest_is_best = FALSE,
soften_power = 1,
cri_width = 0.95,
n_draws = 5000,
robust = FALSE,
description = NULL,
add_info = NULL,
fun_y_gen,
fun_draws,
fun_raw_est
)
arms |
character vector with unique names for the trial arms. |
true_ys |
numeric vector specifying true outcomes (e.g., event
probabilities, mean values, etc.) for all trial |
start_probs |
numeric vector, allocation probabilities for each arm at
the beginning of the trial. The default ( |
fixed_probs |
numeric vector, fixed allocation probabilities for each
arm. Must be either a numeric vector with |
min_probs |
numeric vector, lower threshold for adaptive allocation
probabilities; lower probabilities will be rounded up to these values. Must
be |
max_probs |
numeric vector, upper threshold for adaptive allocation
probabilities; higher probabilities will be rounded down to these values.
Must be |
rescale_probs |
|
data_looks |
vector of increasing integers, specifies when to conduct
adaptive analyses (= the total number of patients with available outcome
data at each adaptive analysis). The last number in the vector represents
the final adaptive analysis, i.e., the final analysis where superiority,
inferiority, practical equivalence, or futility can be claimed.
Instead of specifying |
max_n |
single integer, number of patients with available outcome data
at the last possible adaptive analysis (defaults to |
look_after_every |
single integer, specified together with |
randomised_at_looks |
vector of increasing integers or |
control |
single character string, name of one of the |
control_prob_fixed |
if a common |
inferiority |
single numeric value or vector of numeric values of the
same length as the maximum number of possible adaptive analyses, specifying
the probability threshold(s) for inferiority (default is |
superiority |
single numeric value or vector of numeric values of the
same length as the maximum number of possible adaptive analyses, specifying
the probability threshold(s) for superiority (default is |
equivalence_prob |
single numeric value, vector of numeric values of the
same length as the maximum number of possible adaptive analyses or |
equivalence_diff |
single numeric value ( |
equivalence_only_first |
single logical in trial specifications where
|
futility_prob |
single numeric value, vector of numeric values of the
same length as the maximum number of possible adaptive analyses or |
futility_diff |
single numeric value ( |
futility_only_first |
single logical in trial specifications designs
where |
highest_is_best |
single logical, specifies whether larger estimates of
the outcome are favourable or not; defaults to |
soften_power |
either a single numeric value or a numeric vector of
exactly the same length as the maximum number of looks/adaptive analyses.
Values must be between |
cri_width |
single numeric |
n_draws |
single integer, the number of draws from the posterior
distributions for each arm used when running the trial. Defaults to
|
robust |
single logical, if |
description |
optional single character string describing the trial
design, will only be used in print functions if not |
add_info |
optional single string containing additional information
regarding the trial design or specifications, will only be used in print
functions if not |
fun_y_gen |
function, generates outcomes. See |
fun_draws |
function, generates posterior draws. See |
fun_raw_est |
function that takes a numeric vector and returns a
single numeric value, used to calculate a raw summary estimate of the
outcomes in each |
An object of class trial_spec
containing the validated trial
specification.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.