Title: | Bayesian Adaptive Randomization |
---|---|
Description: | Bayesian adaptive randomization is also called outcome adaptive randomization, which is increasingly used in clinical trials. |
Authors: | Chia-Wei Hsu [aut, cre], Haitao Pan [aut] |
Maintainer: | Chia-Wei Hsu <[email protected]> |
License: | GPL-2 |
Version: | 0.1.1 |
Built: | 2024-11-12 06:44:45 UTC |
Source: | CRAN |
Randomization is the established method for obtaining scientifically valid comparisons of competing treatments in clinical trials and other experiments. Bayesian adaptive randomization (BAR) allows changes to be made to the randomization probabilities to treatments during the trial. The aim of the procedure is to allocate a greater proportion of patients to treatments that have so far demonstrated evidence of a better performance than other arms. Binary outcomes are considered in this package
get_oc_BAR(success_prob, n_burn_in, tot_num, block_size, power_c = "n/2N", lower_bound = .05, reptime, control_arm = "", output = "", seed = 100)
get_oc_BAR(success_prob, n_burn_in, tot_num, block_size, power_c = "n/2N", lower_bound = .05, reptime, control_arm = "", output = "", seed = 100)
success_prob |
the successful probability for each arm (the first slot refers to the control arm) |
n_burn_in |
the number of burn-in for each arm |
tot_num |
the total number of patients enrolled for the trial |
block_size |
the block size |
power_c |
the power correction of allocation probability. The default value is power_c = "n/2N" and can also be numeric, e.g., power_c = .5 |
lower_bound |
the lower bound of the allocation probability. It must between 0 and |
reptime |
the number of simulated trials |
control_arm |
if this argument is "fixed", then allocation probability of control arm (the first slot)
will be fixed to |
output |
if this argument is "raw", then the function will return updated allocation probability path after burn-in for each arm for each simulated trial. The default of this argument will return the average allocation probability and the average number of patients assigned to each arm |
seed |
the seed. The default value is seed = 100 |
We show how the updated allocation probabilities for each arm are calculated.
Treatments are denoted by .
is the total sample size. If no burn-in(s), the BAR will be initiated start of a study, that is, for each enrolled patient,
the BAR will be used to assign each patient. Denoting the true unknown response rates of
treatments by
we can compute
posterior probabilities:
, here,
refers to the
-th patient and
refers to the
-th arm. We calculate the updated probabilities of the BAR algorithm according to the following steps.
Step 1: (Normalization) Normalize as
, here
.
Step 2: (Restriction) To avoid the BAR sticking to very low/high probabilities, a restriction rule to the posterior probability will be applied:
After restriction, the posterior probability is denoted as .
Step 3: (Re-normalization) Then, we can have the updated allocation probabilities by the BAR denoted as:
where is the number of patients enrolled on arm
up-to-now.
Step 4: (Re-restriction) Finally, restricts again by using
and denote as the allocation probability used in the BAR package.
get_oc_BAR()
depending on the argument "output", it returns:
default: (1) the average allocation probability (2) the average number of patients assigned to each arm
raw: (1) updated allocation probability path after burn-in for each arm for each simulated trial
Chia-Wei Hsu, Haitao Pan
Wathen JK, Thall PF. A simulation study of outcome adaptive randomization in multi-arm clinical trials. Clin Trials. 2017 Oct; 14(5): 432-440. doi: 10.1177/1740774517692302.
Xiao, Y., Liu, Z. & Hu, F. Bayesian doubly adaptive randomization in clinical trials. Sci. China Math. 60, 2503-2514 (2017). doi: 10.1007/s11425-016-0056-1.
Hu F, Zhang L X. Asymptotic properties of doubly adaptive biased coin designs for multi-treatment clinical trials. Ann Statist, 2004, 30: 268–301.
## power_c = "n/2N" get_oc_BAR(success_prob = c(.1, .5, .8), n_burn_in = 10, tot_num = 150, block_size = 1, reptime = 5) ## power_c = .5 get_oc_BAR(success_prob = c(.1, .5, .8), n_burn_in = 10, tot_num = 150, block_size = 1, power_c = .5, reptime = 5)
## power_c = "n/2N" get_oc_BAR(success_prob = c(.1, .5, .8), n_burn_in = 10, tot_num = 150, block_size = 1, reptime = 5) ## power_c = .5 get_oc_BAR(success_prob = c(.1, .5, .8), n_burn_in = 10, tot_num = 150, block_size = 1, power_c = .5, reptime = 5)
Calculate updated allocation probability for each arm based on the accumulative data with binary outcomes
next_allocation_rate_BAR(n, success_count, tot_num, power_c = "n/2N", lower_bound = .05, control_arm = "", seed = 100)
next_allocation_rate_BAR(n, success_count, tot_num, power_c = "n/2N", lower_bound = .05, control_arm = "", seed = 100)
n |
the number of patients enrolled for each arm |
success_count |
the number of responders for each arm |
tot_num |
the total number of patients enrolled for the trial. If this number cannot be pre-planned, the user can choose argument "power_c" to be numeric instead of "n/2N". In this case, even if the "tot_num" is given a number, this number will not be used |
power_c |
the power correction of allocation probability. The default value is power_c = "n/2N" and can also be numeric, e.g., power_c = .5 |
lower_bound |
the lower bound of the allocation probability. It must between 0 and |
control_arm |
if this argument is "fixed", then allocation probability of control arm (the first slot)
will be fixed to |
seed |
the seed. The default value is seed = 100 |
We show how the updated allocation probabilities for each arm are calculated.
Treatments are denoted by .
is the total sample size. If no burn-in(s), the BAR will be initiated start of a study, that is, for each enrolled patient,
the BAR will be used to assign each patient. Denoting the true unknown response rates of
treatments by
we can compute
posterior probabilities:
, here,
refers to the
-th patient and
refers to the
-th arm. We calculate the updated probabilities of the BAR algorithm according to the following steps.
Step 1: (Normalization) Normalize as
, here
.
Step 2: (Restriction) To avoid the BAR sticking to very low/high probabilities, a restriction rule to the posterior probability will be applied:
After restriction, the posterior probability is denoted as .
Step 3: (Re-normalization) Then, we can have the updated allocation probabilities by the BAR denoted as:
where is the number of patients enrolled on arm
up-to-now.
Step 4: (Re-restriction) Finally, restricts again by using
and denote as the allocation probability used in the BAR package.
next_allocation_rate_BAR()
returns the updated allocation probability for each arm
Chia-Wei Hsu, Haitao Pan
Wathen JK, Thall PF. A simulation study of outcome adaptive randomization in multi-arm clinical trials. Clin Trials. 2017 Oct; 14(5): 432-440. doi: 10.1177/1740774517692302.
Xiao, Y., Liu, Z. & Hu, F. Bayesian doubly adaptive randomization in clinical trials. Sci. China Math. 60, 2503-2514 (2017). doi: 10.1007/s11425-016-0056-1.
Hu F, Zhang L X. Asymptotic properties of doubly adaptive biased coin designs for multi-treatment clinical trials. Ann Statist, 2004, 30: 268–301.
## power_c = "n/2N" next_allocation_rate_BAR(n = c(30, 30, 30), success_count = c(5, 6, 12), tot_num = 150) ## power_c = .5 next_allocation_rate_BAR(n = c(30, 30, 30), success_count = c(5, 6, 12), tot_num = 150, power_c = .5)
## power_c = "n/2N" next_allocation_rate_BAR(n = c(30, 30, 30), success_count = c(5, 6, 12), tot_num = 150) ## power_c = .5 next_allocation_rate_BAR(n = c(30, 30, 30), success_count = c(5, 6, 12), tot_num = 150, power_c = .5)