Learn R Programming

BinGSD (version 1.1)

asymcp: Conditional power computation using asymptotic test.

Description

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

Usage

asymcp(d, p_1, i, z_i)

Value

A list with the elements as follows:

  • K: As in d.

  • n.I: As in d.

  • u_K: As in d.

  • lowerbounds: As in d.

  • i: i used in computation.

  • z_i: As input.

  • cp: A matrix of conditional powers under different response rates.

  • p_1: As input.

  • p_0: As input.

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.

Reference

  • Alan Genz et al. (2018). mvtnorm: Multivariate Normal and t Distributions. R package version 1.0-11.

Details

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

\(\alpha _{i,K}(p|z_i)=P_{p}(Z_K\ge u_K, Z_{K-1}>l_{K-1}, \ldots, Z_{i+1}>l_{i+1}|Z_i=z_i)\)

With asymptotic test, the test statistic at analysis \(k\) is \(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(\theta \sqrt{n_k/p/(1-p)},1)\) with \(\theta=p-p_0\). In practice, \(p\) in \(Z_k\) can be substituted with the sample response rate \(\sum_{s=1}^{n_k}X_s/n_k\).

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

See Also

asymprob, asymdesign, exactcp.

Examples

Run this code
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)

Run the code above in your browser using DataLab