asymprob {BinGSD} | R Documentation |
Boundary crossing probabilities computation using asymptotic test.
Description
Calculate boundary crossing probabilities of single-arm group sequential design with binary endpoint based on asymptotic test.
Usage
asymprob(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 its 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. 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. |
d |
An object of the class asymdesign. |
Details
This function calculates probabilities of crossing the upper or the lower
boundaries under null hypothesis and a set of alternative hypotheses. With K=0
(as default), d must be an object of class asymdesign. 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 arguments except for d
are required.
The computation is based on the single-arm group sequential asymptotic test
described in asymdesign
. 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 asymprob. This class contains:
p_0: As input with
d=NULL
or as ind
.p_1: As input.
K: K used in computation.
n.I: As input with
d=NULL
or as ind
.u_K: As input with
d=NULL
or as ind
.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
Alan Genz et al. (2018). mvtnorm: Multivariate Normal and t Distributions. R package version 1.0-11.
See Also
asymdesign
, asymcp
, exactprob
.
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)
asymprob(p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),d=tt1)
asymprob(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=1.65,
lowerbounds=c(-1.2,-0.5,0.2,0.8,1.65))