View source: R/groupRAR_functions.R
| GDLRule | R Documentation |
Simulating the generalized drop-the-loser rule (number of arms \ge 2) with two-sided hypothesis testing in a clinical trial context.
GDLRule(k, p, ssn, aK, Y0 = NULL, nsim = 2000, alpha = 0.05, test.fun = NULL,
typeI = FALSE, seed = NULL)
k |
A positive integer. The number of treatment groups in the trial ( |
p |
A vector of length |
ssn |
A positive integer. The total number of participants in each simulated trial. |
aK |
A positive vector of length |
Y0 |
A vector of length |
nsim |
A positive integer. The number of simulated trials, with a default value of 2000. |
alpha |
A number between 0 and 1. The significance level of the two-sided test, with a default value of 0.05. |
test.fun |
An optional function |
typeI |
Logical. If |
seed |
An optional integer passed to |
Consider an urn containing balls of K+1 types. Balls of types 1, \ldots, K represent treatments, and balls of type 0 are called immigration balls. When a subject arrives for randomization, a ball is drawn at random. If the ball is of type 0 (an immigration ball), no subject is treated, and the ball is returned to the urn together with A=a_1+\cdots+a_K additional balls, a_k of treatment type k, k=1, \ldots, K. If a treatment ball is drawn (say, of type k, for some k=1, \ldots, K), the subject is given treatment k. If the observed response of this subject is a success, the ball is replaced, otherwise it is not replaced.
An object of class "grouprar", a list that is printed as a short summary (see print.grouprar), with the following elements.
method |
The name of the procedure. |
sample size |
The total sample size. |
parameter |
The true success rates used in the simulations, named |
propotion |
The mean allocation proportion of each arm over the simulations, named |
sd of propotion |
The standard deviation of the allocation proportion of each arm over the simulations. |
failure rate |
The mean failure rate over the simulations. |
sd of failure rate |
The standard deviation of the failure rate (or mean response) over the simulations. |
power |
The proportion of simulated trials that reject the null hypothesis of equal success rates. Simulations in which the test cannot be computed are dropped. |
data: failureRate |
The failure rate (or mean response) of each simulated trial. |
data: test |
The test decision of each simulated trial (1 = reject). |
data: assignment |
The treatment assignments of the last simulated trial. |
data: propotion |
A data frame with the allocation proportions of each simulated trial. |
data: allocation |
An |
type I error |
Only if |
Zhang, L. X., Chan, W. S., Cheung, S. H. and Hu, F. (2007). A generalized drop-the-loser urn for clinical trials with delayed responses. Statistica Sinica, 17(1), 387-409.
## a simple use
gdl.res <- GDLRule(k = 3, p = c(0.6, 0.7, 0.6),
ssn = 200, aK = c(1, 1, 1), Y0 = NULL, nsim = 100, alpha = 0.05)
## view the output
gdl.res
## view all simulation settings
gdl.res[["method"]]
gdl.res[["parameter"]]
## view the simulation results
gdl.res[["propotion"]]
gdl.res[["failure rate"]]
gdl.res[["power"]]
gdl.res[["data: assignment"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.