# There are 3 arms each of which receives 25 patients.
# The observed response rates are 40%, 28% and 60%, respectively.
# The following command returns the number of arm that the next patient will
# be assigned to.
DBCD_BINARY(S_RK = c(0.4, 0.28, 0.6),
N_RK = c(25, 25, 25),
rho_func_index = 3, alpha=2)
# Urn allocation
DBCD_BINARY(S_RK = c(0.4, 0.3),
N_RK = c(25, 25),
group_allo = 1,
rho_func_index = NULL,
rho_func = function(x) rev(1-x)/sum(1-x),
alpha=2)
Run the code above in your browser using DataLab