View source: R/groupRAR_functions.R
DLRule | R Documentation |
Simulating drop the loser rule procedure with two-sided hypothesis testing in a clinical trial context.
DLRule(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. |
Drop the loser rule can be describe as follows: An urn contains three types of balls (A, B, 0)
initially. Balls of types A
and B
represent treatments A
and B
, balls of 0 type are immigration balls. If A
(or B
) is drawn, then treatment A
(or B
) is assigned to the subject and the response is observed. If the observed response is a failure, then the ball is not replaced, else replaced. If an immigration ball (type 0) is drawn, no treatment is assigned, and the ball is returned to the urn together with one A
and one B
ball.
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. |
Ivanova, A. (2003). A play-the-winner-type urn design with reduced variability. Metrika, 58, 1-13.
## a simple use
dl.res = DLRule(k = 2, p = c(0.7, 0.8), ssn = 400, Y0 = NULL, nsim = 200, alpha = 0.05)
## view the output
dl.res
## view all simulation settings
dl.res$name
dl.res$parameter
dl.res$k
## View the simulations results
dl.res$propotion
dl.res$failRate
dl.res$pwCalc
dl.res$assignment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.