Description Usage Arguments Value Examples
Simulation for binomial counts for block design for response-adaptive randomization with time as a confounding
1 2 3 4 5 | binomialfreq(p_control, p_treatment, N_total, block_number = 4,
drift = 0, simulation = 10000, conf_int = 0.95,
alternative = "greater", correct = FALSE, replace = TRUE,
early_stop = FALSE, 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. |
conf_int |
scalar. Confidence level of the interval. |
alternative |
character. A string specifying the alternative hypothesis, must be one of "less" or "greater" (default). |
correct |
logical. A logical indicating whether to apply continuity correction when computing the test statistic: one half is subtracted from all |O - E| differences; however, the correction will not be bigger than the differences themselves. |
replace |
logical. should sampling be with replacement? If replace is set to FALSE (default), the 0 for control, 1 for treatment is replicated to the closest integer and this vector is sampled with no replacement. If replace is set to TRUE, the sampling is done based on randomization ratio provided with replacement. |
early_stop |
logical. A logical indicating whether the trials are stopped early for success or futility. |
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 3 4 | binomialfreq(p_control = 0.7, p_treatment = 0.65, N_total = 200,
block_number = 2, simulation = 100)
binomialfreq(p_control = 0.5, p_treatment = 0.40, N_total = 200,
block_number = 2, simulation = 100, drift = -0.15)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.