exactprob {BinGSD} R Documentation

## Boundary crossing probabilities computation using exact test.

### Description

Calculate boundary crossing probabilities of single-arm group sequential design with binary endpoint using binomial distribution

### Usage

```exactprob(K = 0, p_0, p_1, n.I, u_K, lowerbounds, d = NULL)
```

### Arguments

 `K` The maximum number of analyses, including the interim and the final. Should be an integer within (1,20]. K will be rounded to the nearest whole number if it is not an integer. The default is 0. `p_0` The response rate or the probability of success under null hypothesis. Should be a scalar within (0,1). `p_1` A scalar or vector representing response rate or probability of success under the alternative hypothesis. The value(s) should be within (p_0,1). It is a mandatory input. `n.I` A vector of length K which contains sample sizes required at each analysis. Should be a positive and increasing sequence. `u_K` The upper boundary for the last analysis. `lowerbounds` Non-decreasing lower boundaries for each analysis, in which each element is no less than -1 (no lower bound). With length K, the last lower bound must be identical to u_K. With length K-1, the last element must be no greater than u_K and u_K will be automatically added into the sequence. Note the lower bound must be less than the corresponding sample size. `d` An object of the class exactdesign.

### Details

This function is similar to `asymprob` except that the former uses binomial distribution and the latter uses the normal asymptotic distribution. With `K=0` (as default), `d` must be an object of class exactdesign. Meanwhile, other arguments except for `p_1` will be inherited from `d` and the input values will be ignored. With `K!=0`, the probabilities are derived from the input arguments. In this circumstance, all the arguments except for `d` are required.

The computation is based on the single-arm group sequential exact test described in `exactdesign`. Therefore, for the output matrix of upper bound crossing probabilities, the values for the first K-1 analyses are zero since there is only one upper bound for the last analysis.

### Value

An object of the class exactprob. This class contains:

• p_0: As input with `d=NULL` or as in `d`.

• p_1: As input.

• K: K used in computation.

• n.I: As input with `d=NULL` or as in `d`.

• u_K: As input with `d=NULL` or as in `d`.

• lowerbounds: lowerbounds used in computation.

• problow: Probabilities of crossing the lower bounds at each analysis.

• probhi: Probability of crossing the upper bounds at each analysis.

### Reference

• Christopher Jennison, Bruce W. Turnbull. Group Sequential Methods with Applications to Clinical Trials. Chapman and Hall/CRC, Boca Raton, FL, 2000.

• Keaven M. Anderson, Dan (Jennifer) Sun, Zhongxin (John) Zhang. gsDesign: An R Package for Designing Group Sequential Clinical Trials. R package version 3.0-1.

### Note

The calculation of boundary crossing probabilities here borrowed strength from the source code of function `gsBinomialExact` in package gsDesign and we really appreciate their work.

`exactdesign`, `exactcp`, `asymprob`.

### Examples

```I=c(0.2,0.4,0.6,0.8,0.99)
beta=0.2
betaspend=c(0.1,0.2,0.3,0.3,0.2)
alpha=0.05
p_0=0.3
p_1=0.5
K=4.6
tol=1e-6
tt1=asymdesign(I,beta,betaspend,alpha,p_0,p_1,K,tol)
tt2=exactdesign(tt1)
tt3=exactprob(p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),d=tt2)
tt3=exactprob(K=5,p_0=0.4,p_1=c(0.5,0.6,0.7,0.8),n.I=c(15,20,25,30,35),u_K=15,
lowerbounds=c(3,5,10,12,15))
```

[Package BinGSD version 0.0.1 Index]