Description Usage Arguments Value Examples
View source: R/binomialbayes.R
Simulation for binomial counts for block design for response-adaptive randomization with time as a confounding
1 2 3 4 5 6 | binomialbayes(p_control, p_treatment, N_total, block_number = 4,
drift = 0, simulation = 10000, a0 = 0.5, b0 = 0.5, p = 0.5,
number_mcmc = 10000, prob_accept_ha = 0.95,
early_success_prob = 0.99, futility_prob = 0.01,
alternative = "greater", size_equal_randomization = 20,
min_patient_earlystop = 20, max_prob = 0.8)
|
p_control |
scalar. Proportion of events under the control arm. |
p_treatment |
scalar. Proportion of events under the treatment arm. |
N_total |
scalar. Total sample size. |
block_number |
scalar. Number of blocks or time levels. The default is set to 4.
If |
drift |
scalar. The increase or decrease in proportion of event over time. In this case, the proportion of failure changes in each block by the number of patient accured over the total sample size. The full drift effect is seen in the final block. |
simulation |
scalar. Number of simulation to be ran. The default is set to 10000. |
a0 |
scalar. Prior value for the beta rate |
b0 |
scalar. Prior value for the beta rate |
p |
scalar. Power for randomization ratio. |
number_mcmc |
scalar. Number of Monte Carlo Markov Chain draws in sampling posterior. |
prob_accept_ha |
scalar. Probability of accepting alternative hypothesis. |
early_success_prob |
scalar. Probability of stopping early for success. |
futility_prob |
scalar. Probability of stopping early for futility. |
alternative |
character. A string specifying the alternative hypothesis, must be one of "less" or "greater" (default). |
size_equal_randomization |
scalar. The number of run in patients because adaptive randomization is applied. |
min_patient_earlystop |
scalar. Minimum number of patients before early stopping rule is applied. |
max_prob |
scalar. The maximum probability for assigning to treatment/control group is 0.8. |
a list with details on the simulation.
power
scalar. The power of the trial, ie. the proportion of success over the number of simulation ran.
p_control_estimate
scalar. The estimated proportion of events under the control group.
p_treatment_estimate
scalar. The estimated proportion of events under the treatment group.
N_enrolled
vector. The number of patients enrolled in the trial (sum of control and experimental group for each simulation. )
N_control
vector. The number of patients enrolled in the control group for each simulation.
N_control
vector. The number of patients enrolled in the experimental group for each simulation.
randomization_ratio
matrix. The randomization ratio allocated for each block.
1 2 | binomialbayes(p_control = 0.20, p_treatment = 0.30, N_total = 100, simulation = 10)
binomialbayes(p_control = 0.50, p_treatment = 0.30, N_total = 100, simulation = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.