View source: R/groupRAR_functions.R
WeiUrn | R Documentation |
k > 2
)
Simulating randomized play-the-winner rule (multiple arms) with two-sided hypothesis testing in a clinical trial context.
WeiUrn(k, p, ssn, Y0 = NULL, nsim = 2000, alpha = 0.05)
k |
a positive integer. The value specifies the number of treatment groups involved in a clinical trial. ( |
p |
a positive vector of length equals to |
ssn |
a positive integer. The value specifies the total number of participants involved in each round of the simulation. |
Y0 |
A vector of length |
nsim |
a positive integer. The value specifies the total number of simulations, with a default value of 2000. |
alpha |
A number between 0 and 1. The value represents the predetermined level of significance that defines the probability threshold for rejecting the null hypothesis, with a default value of 0.05. |
Wei's urn procedure is obtained by extending the randomized play the winner rule (Wei1978) from the case k = 2
to k > 2
. Hence, It enables to conduct multi-arm clinical trials, and offers a greater range of applications.
name |
The name of procedure. |
parameter |
The true parameters used to do the simulations. |
assignment |
The randomization sequence. |
propotion |
Average allocation porpotion for each of treatment groups. |
failRate |
The proportion of individuals who do not achieve the expected outcome in each simulation, on average. |
pwClac |
The probability of the study to detect a significant difference or effect if it truly exists. |
k |
Number of arms involved in the trial. |
LJ Wei (1979). The generalized polya’s urn design for sequential medical trials. The Annals of Statistics, 7(2):291–296, 19
## a simple use
wei.res = WeiUrn(k = 3, p = c(0.7, 0.8, 0.7), ssn = 400, Y0 = NULL, nsim = 200, alpha = 0.05)
## view the output
wei.res
## view all simulation settings
wei.res$name
wei.res$parameter
wei.res$k
## View the simulations results
wei.res$propotion
wei.res$failRate
wei.res$pwCalc
wei.res$assignment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.