asymcp: Conditional power computation using asymptotic test.

Description Usage Arguments Details Value Reference See Also Examples

View source: R/asymcp.r

Description

Compute conditional power of single-arm group sequential design with binary endpoint based on asymptotic test, given the interim result.

Usage

1
asymcp(d, p_1, i, z_i)

Arguments

d

An object of the class asymdesign or asymprob.

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).

i

Index of the analysis at which the interim statistic is given. Should be an integer ranges from 1 to K-1. i will be rounded to its nearest whole value if it is not an integer.

z_i

The interim statistic at analysis i.

Details

Conditional power quantifies the conditional probability of crossing the upper bound given the interim result z_i, 1≤ i<K. Having inherited sample sizes and boundaries from asymdesign or asymprob, given the interim statistic at ith analysis z_i, the conditional power is defined as

α _{i,K}(p|z_i)=P_{p}(Z_K≥ u_K, Z_{K-1}>l_{K-1}, …, Z_{i+1}>l_{i+1}|Z_i=z_i)

With asymptotic test, the test statistic at analysis k is Z_k=\hat{θ}_k√{n_k/p/(1-p)}=(∑_{s=1}^{n_k}X_s/n_k-p_0)√{n_k/p/(1-p)}, which follows the normal distribution N(θ √{n_k/p/(1-p)},1) with θ=p-p_0. In practice, p in Z_k can be substituted with the sample response rate ∑_{s=1}^{n_k}X_s/n_k.

The increment statistic Z_k√{n_k/p/(1-p)}-Z_{k-1}√{n_{k-1}/p/(1-p)} also follows a normal distribution independently of Z_{1}, …, Z_{k-1}. Then the conditional power can be easily obtained using a procedure similar to that for unconditional boundary crossing probabilities.

Value

A list with the elements as follows:

Reference

See Also

asymprob, asymdesign, exactcp.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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=asymprob(p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),d=tt1)
asymcp(tt1,p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),1,2)
asymcp(tt2,p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),3,2.2)

BinGSD documentation built on Oct. 30, 2019, 5:07 p.m.