Description Usage Arguments Details Value Author(s) References Examples

calculate optimal 2-/3-stage design given by Bob Zhong

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |

`alpha1` |
left-side overall type I error. |

`alpha2` |
right-side overall type I error. |

`beta` |
type II error |

`pc` |
a numeric vector of response rate. should be a vector with length 1 or 2. |

`pe` |
alternative hypothesis. |

`stage` |
2 or 3. default to 2 (2-stage design). |

`stop.eff` |
logical flag. default to |

`frac_n1` |
proportion of n1. for 2-stage design, default to |

`frac_n2` |
proportion of n2. Used for 3-stage design. default to |

`sf.param` |
a single real value specifying the gamma parameter for which Hwang-Shih-DeCani spending is to be computed; allowable range is [-40, 40]. Increasing this parameter implies that more error is spent early stage and less is available in late stage. For two-stage designs, default to |

`show` |
logical. If |

`nmax` |
maximum sample size. default to 100. |

`n.choice` |
stop criterion for the search of feasible designs. stop if number of designs is more than |

`...` |
not used argument. |

The two-stage design setup is: n1 patients are treated in the first stage. At the end of the first stage, either the trial continues to the second stage or inefficacy is concluded and the trial is stopped (early termination), depending on the number of responses observed at the first stage. If the trial does continue to the second stage, additional n2 patients are treated. Three-stage design is an extension of two-stage design where one stage is added between Stage 1 and 2. The left-side rejection region is response <= r_i for i = 1, 2, or 3 and right-side rejection region is response > s. Alpha-spending method is added to two-/three-stage designs. `opt.design`

supports Hwang-Shih-DeCani spending function. You can change the definition of `HSD`

function to use a different spending function.

An object of class "opt.design" is a list containing:

`bdry` |
rejection regions |

`error` |
true type 1/2 errors |

`n` |
sample size at each stage |

`complete` |
complete list of feasible designs |

`alpha1` |
input; left-side type 1 error |

`alpha2` |
input; right-side type 1 error |

`beta` |
input; type 2 error |

`pc` |
input; a vector of response rate. |

`pe` |
input; a vector of alternative response rate |

`sf` |
input; the alpha-spending function used |

`stage` |
input; two- or three- stage design is used |

Wenchuan Guo <wguo1017@gmail.com>, Jianan Hui <jiananhuistat@gmail.com>

Zhong. (2012) Single-arm Phase IIA clinical trials with go/no-go decisions. *Contemporary Clinical Trials*, **33**, 1272–1279.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
alpha1 <- 0.15
alpha2 <- 0.10
beta <- 0.15
pc <- 0.25
pe <- pc + 0.20
# calculate optimal two-stage design without using alpha-spending
opt.design(alpha1, alpha2, beta, pc, pe, stage=2)
## Not run:
# calculate optimal two-stage design with Pocock-like spending function
opt.design(alpha1, alpha2, beta, pc, pt, stage = 2, sf.param = 1)
# calculate optimal three-stage design with =Oâ€™Brien-Fleming like spending function
opt.design(alpha1, alpha2, beta, pc, pt, stage = 3, sf.param = -4)
## End(Not run)
``` |

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.