RPWRule {grouprar} | R Documentation |
Randomized Play-the-winner Rule
Description
Simulating randomized play-the-winner rule with two-sided hypothesis testing in a clinical trial context.
Usage
RPWRule(k, p, ssn, Y0 = NULL, nsim = 2000, alpha = 0.05)
Arguments
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 |
An integer 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. |
Details
The Randomized Play-the-Winner Rule allocates future subjects in a clinical trial to treatment groups based on the performance of previously treated subjects. This rule increases the likelihood of future patients being assigned to the better-performing treatment, as determined by the outcomes of previously treated subjects.
Value
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. |
References
L. J. WEI and S. DURHAM (1978) The Randomized Play-the-Winner Rule in Medical Trials. Journal of the American Statistical Association, 73, 364, 840–843.
Examples
## a simple use
RPW.res = RPWRule(k = 2, p = c(0.7, 0.8), ssn = 400, Y0 = NULL, nsim = 200, alpha = 0.05)
## view the output
RPW.res
## view all simulation settings
RPW.res$name
RPW.res$parameter
RPW.res$k
## View the simulations results
RPW.res$propotion
RPW.res$failRate
RPW.res$pwCalc
RPW.res$assignment