View source: R/groupRAR_functions.R

GDLRule | R Documentation |

Simulating generalized drop-the-loser rule procedure (number of arms `> 2`

) with two-sided hypothesis testing in a clinical trial context.

```
GDLRule(k, p, ssn, aK, 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. |

`aK` |
a positive vector of length equals to |

`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. |

Consider an urn containing balls of `K+1`

types. Balls of types $1, ..., K$ represent treatments, balls of type 0 will be called immigration balls. When the subject arrived for randomizition, a ball is drawn at random. If the ball is of type 0 (i.e, 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 next subject is given treatment `k`

and the ball is not replaced. If the observed response of this subject is a success, then the ball is replaced, otherwise not replaced.

`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. |

Zhang, L. X., Chan, W. S., Cheung, S. H., & 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 = 400, aK = c(1, 1, 1), Y0 = NULL, nsim = 200, alpha = 0.05)
## view the output
gdl.res
## view all simulation settings
gdl.res$name
gdl.res$parameter
gdl.res$k
## View the simulations results
gdl.res$propotion
gdl.res$failRate
gdl.res$pwCalc
gdl.res$assignment
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.