The design function to sequentially monitor sample size and stopping boundary for both futility and efficacy

1 |

`type` |
type of stopping criterion: "PostP" or "PredP". |

`a` |
the hyperparameter (shape1) of the Beta prior for the experimental drug. |

`b` |
the hyperparameter (shape2) of the Beta prior for the experimental drug. |

`nmin` |
the minimum number of patients treated by the experimental drug. |

`nmax` |
the maximum number of patients treated by the experimental drug. |

`p0` |
the pre-specified reseponse rate. |

`p1` |
the pre-specified reseponse rate. |

`theta0` |
the cutoff probability for futility: typically, |

`theta1` |
the cutoff probability for efficacy: typically, |

`theta_t` |
the cutoff probability for efficacy including future patients; typically, |

`optimize` |
logical value, if optimize=TRUE, then only output the minimal sample size for the same number of futility and efficacy boundaries. |

`boundsets` |
the boundaries sets: |

Thall, P. F., Simon, R. (1994).
Practical Bayesian guidelines for phase IIB clinical trials.
*Biometrics* **50**: 337-349.

Lee, J. J., Liu, D. D. (2008).
A predictive probability design for phase II cancer clinical trials.
*Clinical Trials* **5**: 93-106.

Yin, G. (2012).
*Clinical Trial Design: Bayesian and Frequentist Adaptive Methods.*
New York: Wiley.

1 2 3 4 5 6 7 8 9 10 | ```
## Using vague prior Unif(0,1), sequential monitor
DT.design(type = "PostP", a=1, b=1, nmin=20, nmax=60, p0=0.4, p1=0.3, theta0 = 0.05, theta1 = 0.9)
DT.design(type = "PredP", a=1, b=1, nmin=20, nmax=60, p0=0.4, p1=0.3, theta0 = 0.05, theta1 = 0.9,
theta_t = 0.9)
## Or using Jeffery prior with Beta(0.5,0.5), multi-stage monitor when sample size is
## 10, 20, ..., 80
DT.design(type = "PostP", a=0.5, b=0.5, nmin=1, nmax=85, p0=0.3, p1=0.3, theta0 = 0.05,
theta1 = 0.9)[(1:8)*10,]
DT.design(type = "PredP", a=0.5, b=0.5, nmin=1, nmax=85, p0=0.3, p1=0.3, theta0 = 0.05,
theta1 = 0.9, theta_t = 0.9)[(1:8)*10,]
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.