asymdesign {BinGSD}R Documentation

Boundary and sample size computation using asymptotic test.

Description

Calculate boundaries and sample sizes of single-arm group sequential design with binary endpoint based on asymptotic test.

Usage

asymdesign(I, beta = 0.3, betaspend, alpha = 0.05, p_0, p_1, K,
  tol = 1e-06)

Arguments

I

The information fractions at each analysis. For binary endpoints, the information fraction for analysis k is equal to n_k/n_K, where n_k is the sample size available at analysis k and n_K is the sample size available at the last analysis or the maximum sample size. Should be a positive increasing vector of length K or K-1. If I has K elements among which the last one is not 1, then I will be standardized so that the last information fraction is 1. If I has K-1 elements, the last element in I must be less than 1.

beta

The desired overall type II error level. Should be a scalar within the interval (0,0.5]. Default value is 0.3, that is, power=0.7.

betaspend

The proportions of beta spent at each analysis. Should be a vector of length K with all elements belong to [0,1]. If the sum of all elements in betaspend is not equal to 1, betaspend will be standardized.

alpha

The desired overall type I error level. Should be a scalar within the interval (0,0.3]. Default is 0.05.

p_0

The response rate or the probability of success under null hypothesis. Should be a scalar within (0,1).

p_1

The response rate or the probability of success under alternative hypothesis. Should be a scalar within (p_0,1).

K

The maximum number of analyses, including the interim and the final. Should be an integer within (1,20]. K will be rounded to its nearest whole number if it is not an integer.

tol

The tolerance level which is essentially the maximum acceptable difference between the desired type II error spending and the actual type II error spending, when computing the boundaries using asymptotic test. Should be a positive scalar no more than 0.01. The default value is 1e-6.

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.

For a p0p_0 not close to 1 or 0, with a large sample size, the test statistic at analysis kk is Zk=θ^knk/p/(1p)=(s=1nkXs/nkp0)nk/p/(1p)Z_k=\hat{\theta}_k\sqrt{n_k/p/(1-p)}=(\sum_{s=1}^{n_k}X_s/n_k-p_0)\sqrt{n_k/p/(1-p)}, which follows the normal distribution N(θnk/p/(1p),1)N(\theta \sqrt{n_k/p/(1-p)},1) with θ=pp0\theta=p-p_0. In practice, pp in ZkZ_k can be substituted with the sample response rate s=1nkXs/nk\sum_{s=1}^{n_k}X_s/n_k.

Under the null hypothesis, θ=0\theta=0 and ZkZ_k follows a standard normal distribution. During the calculation, the only upper bound uKu_K is firstly derived under H0H_0, without given nKn_K. Thus, there is no need to adjust uKu_K for different levels of nKn_K. Following East, given uKu_K, compute the maximum sample size nKn_K under H1H_1. The rest sample sizes can be obtained by multiplying information fractions and nKn_K. The lower boundaries for the first K1K-1 analyses are sequentially determined by a search method. The whole searching procedure stops if the overall type II error does not excess the desired level or the times of iteration excess 30. Otherwise, increase the sample sizes until the type II error meets user's requirement.

The multiple integrals of multivariate normal density functions are conducted with pmvnorm in R package mvtnorm. Through a few transformations of the integral variables, pmvnorm turns the multiple integral to the product of several univariate integrals, which greatly reduces the computational burden of sequentially searching for appropriate boundaries.

Value

An object of the class asymdesign. This class contains:

Reference

See Also

asymprob, asymcp, exactdesign.

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)


[Package BinGSD version 0.0.1 Index]