exactdesign {BinGSD}R Documentation

Compute sample size and boundaries using exact binomial distribution

Description

Compute sample size and boundaries of single-arm group sequential design with binary endpoint using exact binomial distribution

Usage

exactdesign(d)

Arguments

d

An object of the class asymdesign.

Details

Suppose X1,X2,X_{1}, X_{2}, \ldots are binary outcomes following Bernoulli distribution b(1,p)b(1,p), in which 1 stands for the case that the subject responds to the treatment and 0 otherwise. Consider a group sequential test with KK planned analyses, where the null and alternative hypotheses are H0:p=p0H_0: p=p_0 and H1:p=p1H_1: p=p_1 respectively. Note that generally p1p_1 is greater than p0p_0. For k<Kk<K, the trial stops if and only if the test statistic ZkZ_k crosses the futility boundary, that is, Zk<=lkZ_k<=l_k. The lower bound for the last analysis lKl_K is set to be equal to the last and only upper bound uKu_K to make a decision. At the last analysis, the null hypothesis will be rejected if ZK>=uKZ_K>=u_K.

The computation of lower bounds except for the last one is implemented with uKu_K fixed, thus the derived lower bounds are non-binding. Furthermore, the overall type I error will not be inflated if the trial continues after crossing any of the interim lower bounds, which is convenient for the purpose of monitoring. Let the sequence of sample sizes required at each analysis be n1,n2,,nKn_{1}, n_{2}, \ldots, n_{K}. For binomial endpoint, the Fisher information equals nk/p/(1p)n_k/p/(1-p) which is proportional to nkn_k. Accordingly, the information fraction available at each analysis is equivalent to nk/nKn_k/n_K.

With exact test, the test statistic at analysis kk is Zk=s=1nkXsZ_k=\sum_{s=1}^{n_k}X_s which follows binomial distribution b(nk,p)b(n_k,p). Actually, ZkZ_k is the total number of responses up to the kth analysis.

Under the null hypothesis, ZkZ_k follows a binomial distribution b(nk,p0)b(n_k,p_0). While under the alternative hypothesis, ZkZ_k follows b(nk,p1)b(n_k,p_1). It may involve massive computation to simultaneously find proper nKn_K and uKu_K. In fact, the sample sizes obtained from asymptotic test ought to be close to those from exact test. Thus, we adopt nKn_K from asymptotic test as the starting value. The starting value of uKu_K is computed given the nKn_K. Iteratively update uKu_K and nKn_K until errors are limited to certain amount.

Like asymdesign, the lower boundaries for the first K1K-1 analyses are sequentially determined by a search method. However, if the actual overall type II error exceeds the desired level, not only sample sizes but also all the boundaries are updated, since the binomial distribution under H0H_0 involves with sample size.

Due to the discreteness of binomial distribution, in exact test, the type I and type II error actually spent at each analysis may not approximate the designated amount. With the only one upper bound, the whole type I error is spent at the final analysis. From some simulation studies, though not presented here, we found that carrying over unused type II error has minor influence on the resulting boundaries and sample sizes. However, in an attempt to reduce the false positive rate, we decided to recycle the unspent amount of desired type II error. Thus, the elements of betaspend in an exactdesign object may be greater than the amount pre-specified by the user.

Value

An object of the class exactdesign. This class contains:

Reference

See Also

exactprob, exactcp, asymdesign.

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)

[Package BinGSD version 0.0.1 Index]