Type: | Package |
Title: | Adaptive Enrichment Designs with Sample Size Re-Estimation |
Version: | 1.0.3 |
Date: | 2021-07-13 |
Author: | Zhao Yang, Ruitao Lin, Guosheng Yin and Ying Yuan |
Maintainer: | Zhao Yang <yangz98@connect.hku.hk> |
Description: | Software of 'esDesign' is developed to implement the adaptive enrichment designs with sample size re-estimation presented in Lin et al. (2021) <doi:10.1016/j.cct.2020.106216>. In details, three-proposed trial designs are provided, including the AED1-SSR (or ES1-SSR), AED2-SSR (or ES2-SSR) and AED3-SSR (or ES3-SSR). In addition, this package also contains several widely used adaptive designs, such as the Marker Sequential Test (MaST) design proposed Freidlin et al. (2014) <doi:10.1177/1740774513503739>, the adaptive enrichment designs without early stopping (AED or ES), the sample size re-estimation procedure (SSR) based on the conditional power proposed by Proschan and Hunsberger (1995), and some useful functions. In details, we can calculate the futility and/or efficacy stopping boundaries, the sample size required, calibrate the value of the threshold of the difference between subgroup-specific test statistics, conduct the simulation studies in AED, SSR, AED1-SSR, AED2-SSR and AED3-SSR. |
Depends: | R (≥ 3.2.0) |
Imports: | stats |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | false |
RoxygenNote: | 7.1.1 |
Suggests: | knitr, rmarkdown |
NeedsCompilation: | no |
Packaged: | 2021-07-13 05:38:25 UTC; Yang Zhao |
Repository: | CRAN |
Date/Publication: | 2021-07-13 05:50:02 UTC |
Calculate the critical value used at the final analysis in AED
Description
AED.boundary()
is used to calculate the critical value
used at the final analysis in AED design, meanwhile preserving the overall
type I error rate at \alpha
level
Usage
AED.boundary(rho, alpha, Info, epsilon)
Arguments
rho |
The proportion of subgroup 1 |
alpha |
The overall type I error rate |
Info |
The infromation fraction |
epsilon |
The threshold of difference between the subgroup-specific test statistics |
Value
The critical value used at the final analysis
References
Lin, R., Yang, Z., Yuan, Y. and Yin, G., 2021. Sample size re-estimation in adaptive enrichment design. Contemporary Clinical Trials, 100, p.106216. <doi: 10.1016/j.cct.2020.106216>
Examples
AED.boundary(rho = 0.5, alpha = 0.05, Info = 0.5, epsilon = 0.5)
Conduct the simulation studies of the Adaptive Enrichment Design without early stopping boundary
Description
The AED.sim()
is used to conduct the simulation studies
of the Adaptive Enrichment Design without early stopping boundary. The AED
design is quite similar with the AED1_SSR design. But, in the AED design,
the futility stopping boundary and the Sample Size Re-estimation Procedure
are removed. On the contrary, a fixed sample size is used to replace the
sample size re-estimated procedure. In addition, an \epsilon
-rule is
also introduced to select the subgroup with larger subgroup-specific test
statistic.
Usage
AED.sim(
N1,
N2,
rho,
alpha,
beta,
theta,
theta0,
K,
Info,
epsilon,
sigma0,
nSim,
Seed
)
Arguments
N1 |
The sample size used at the first stage |
N2 |
The sample size used at the second stage |
rho |
The proportion of the subgroup 1 |
alpha |
The overall Type I error rate |
beta |
The (1 - Power) |
theta |
The sizes of treatment effects in subgroups 1 and 2 among the experimental arm |
theta0 |
The size of treatment effect in standard arm |
K |
The number of subgroups |
Info |
The observed information |
epsilon |
The threshold of difference between the subgroup-specific test statistics |
sigma0 |
The variance of the treatment effect |
nSim |
The number of simulated studies |
Seed |
The random Seed |
Value
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H_{00}
H01 The probability of rejecting the null hypothesis of
H_{01}
H02 The probability of rejecting the null hypothesis of
H_{02}
H0 The probabilities of rejecting at least one of the null hypothesis
Enrich01 The prevalence of adaptive enrichment of subgroup 1
Enrich02 The prevalence of adaptive enrichment of subgroup 2
References
Lin, R., Yang, Z., Yuan, Y. and Yin, G., 2021. Sample size re-estimation in adaptive enrichment design. Contemporary Clinical Trials, 100, p.106216. <doi: 10.1016/j.cct.2020.106216>
Examples
N1 <- 310
N2 <- 310
rho <- 0.5
alpha <- 0.05
beta <- 0.20
theta <- c(0,0)
theta0 <- 0
K <- 2
Info <- 0.5
epsilon <- 0.5
sigma0 <- 1
nSim <- 1000
Seed <- 6
AED.sim(N1 = N1, N2 = N2, rho = rho, alpha = alpha,
beta = beta, theta = theta, theta0 = theta0,
K = K, Info = Info, epsilon = epsilon,
sigma0 = sigma0, nSim = nSim, Seed = Seed)
Calculate the conditional power of the Adaptive Enrichment Design with (Strategy 1) Sample Size Re-estimation Procedure
Description
The AED1_SSR.CP()
is used to calculate the conditional
power of the Adaptive Enrichment Design (Strategy 1) with sample size
re-estimation procedure
Usage
AED1_SSR.CP(c, Z1, N1, N2)
Arguments
c |
The critical value used at the final analysis |
Z1 |
The test statistic obtained at the interim analysis |
N1 |
The sample size used at the first stage |
N2 |
The sample size used at the second stage |
Value
A list contains
Critical.Value The critical value used at the final analysis
Conditional.Power The value of conditional power given the observed data
References
Lin, R., Yang, Z., Yuan, Y. and Yin, G., 2021. Sample size re-estimation in adaptive enrichment design. Contemporary Clinical Trials, 100, p.106216. <doi: 10.1016/j.cct.2020.106216>
Examples
c <- 2.258
Z1 <- 1.975
N1 <- 248
N2 <- 200
AED1_SSR.CP(c = 2.258, Z1 = 1.974, N1 = 248, N2 = 200)
Calculate the sample size required at the second stage of the adaptive enrichment design (Strategy1) with Sample Size Re-estimation Procedure
Description
The AED1_SSR.N2()
is used to calculated the sample size
required at the second stage of the Adaptive Enrichment Design (Strategy 1)
with Sample Size Re-estimation Procedure.
Usage
AED1_SSR.N2(c, z1, N1, beta)
Arguments
c |
The critical value used at the final analysis |
z1 |
The test statistic obtained at the interim analysis |
N1 |
The sample size used at the first stage |
beta |
The (1 - power) |
Value
The Value of the re-estimated sample size
References
Lin, R., Yang, Z., Yuan, Y. and Yin, G., 2021. Sample size re-estimation in adaptive enrichment design. Contemporary Clinical Trials, 100, p.106216. <doi: 10.1016/j.cct.2020.106216>
Examples
c <- 2.258
z1 <- 1.974
N1 <- 248
beta <- 0.2
AED1_SSR.N2(c = c, z1 = z1, N1 = N1, beta = beta)
Calculate the critical value used at the final analysis of the Adaptive Enrichment Design (Strategy 1) with Sample Size Re-estimation Procedure
Description
The AED1_SSR.boundary()
is used to calculate the critical
value required at the final analysis of the Adaptive Enrichment Design
(Strategy 1) with sample size
re-estimation procedure. In the AED1-SSR design, the adaptive enrichment
strategy is guided by a pre-specified futility stopping boundary and a
threshold of the difference between the subgroup-specific test statistics.
Usage
AED1_SSR.boundary(rho, alpha, pstar, Info, epsilon)
Arguments
rho |
The proportion of subgroup 1. |
alpha |
The overall Type I error rate. |
pstar |
The |
Info |
The observation information, which is commonly calculated through the sample size used at each stage of the trial. |
epsilon |
The threshold of the difference between subgroup-specific test statistics. |
References
Lin, R., Yang, Z., Yuan, Y. and Yin, G., 2021. Sample size re-estimation in adaptive enrichment design. Contemporary Clinical Trials, 100, p.106216. <doi: 10.1016/j.cct.2020.106216>
Examples
AED1_SSR.boundary(rho = 0.5, alpha = 0.05, pstar = 0.2, Info = 0.5, epsilon = 0.5)
Conduct the simulation studies of the Adaptive Enrichment Design (Strategy 1) with Sample Size Re-estimation Procedure
Description
The AED1_SSR.sim()
is used to conduct the simulation study
of the Adaptive Enrichment Design (Strategy 1) with Sample Size Re-estimation
procedure
Usage
AED1_SSR.sim(
N1,
rho,
alpha,
beta,
pstar,
theta,
theta0,
Info,
K = 2,
epsilon,
sigma0,
nSim,
Seed
)
Arguments
N1 |
The sample size used at the first stage |
rho |
The proportion of subgroup 1 among the overall patients |
alpha |
The overall Type I error rate |
beta |
The (1 - Power) |
pstar |
The |
theta |
The sizes of the treatment effect in subgroups 1 and 2 with the experimental arm |
theta0 |
The size of the treatment effect in standard arm |
Info |
The observation information |
K |
The number of subgroups. The default value is |
epsilon |
The threshold of the difference between the subgroup-specific test statistic |
sigma0 |
The variance of the treatment effect |
nSim |
The number of simulated studies |
Seed |
The random seed |
Value
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H_{00}
H01 The probability of rejecting the null hypothesis of
H_{01}
H02 The probability of rejecting the null hypothesis of
H_{02}
H0 The probabilities of rejecting at least one of the null hypothesis
ESF The probability of early stopping for futility
ESE The probability of early stopping for efficacy
Enrich01 The prevalence of adaptive enrichment of subgroup 1
Enrich02 The prevalence of adaptive enrichment of subgroup 2
References
Lin, R., Yang, Z., Yuan, Y. and Yin, G., 2021. Sample size re-estimation in adaptive enrichment design. Contemporary Clinical Trials, 100, p.106216. <doi: 10.1016/j.cct.2020.106216>
Examples
res <- AED1_SSR.sim(
N1 = 310, rho = 0.5,
alpha = 0.05, beta = 0.2, pstar = 0.2,
theta = c(0,0), theta0 = 0, Info = 0.5,
epsilon = 0.5, sigma0 = 1, nSim = 1000, Seed = 6)
Calculate the N2
and the critical value C
in the Adaptive
Enrichment Design (Strategy 2) with Sample Size Re-estimation Procedure
Description
The AED2_SSR.CP()
is used to calculate the sample size required
at the second stage and the critical value used at the final analysis in the
Adaptive Enrichment Design with Sample Size Re-estimation Procedure. In
addition, this function can also used to conduct the conditional power
analysis in terms of N2
Usage
AED2_SSR.CP(
Z1 = NULL,
delta = NULL,
N1 = NULL,
pstar,
rho,
epsilon,
alpha,
beta,
N2 = NULL
)
Arguments
Z1 |
The test statistic obtained at the interim analysis |
delta |
The standardized size of treatment effect, which can be estimated
by using |
N1 |
The sample size used at the first stage |
pstar |
The |
rho |
The proportion of subgroup 1 |
epsilon |
The threshold of the difference between subgroup-specific test statistics. |
alpha |
The overall Type I error rate |
beta |
The |
N2 |
The pre-specified sample size used at the second stage, which is used to conduct the conditional power analysis |
Value
A list contains
upper.boundary The efficacy stopping boundary
lower.boundary The futility stopping boundary
N2 The pre-specified sample size used at the second stage, which is used to implement the conditional power analysis
Conditional.Power The value of conditional power given the value of
N2
in the conditional power analysisP.Value The corresponding P-Value used at the final analysis in the conditional power analysis
N2.CP The re-estimated sample size of
N2
to ensure an adequate conditional powerc.CP The estimated the critical value used at the final analysis based the conditional power
Examples
Z1 <- 1.974
delta <- 0.355
N1 <- 248
pstar <- 0.15
alpha <- 0.05
rho <- 0.5
epsilon <- 0.5
beta <- 0.20
N2 <- 104
res <- AED2_SSR.CP(Z1 = Z1, delta = delta, N1 = N1, pstar = pstar,
alpha = alpha, rho = rho, epsilon = epsilon,
beta = beta, N2 = N2)
Calculate the futility and efficacy stopping boundaries of the Adaptive Enrichment Design (Strategy 2) with Sample Size Re-estimation Procedure
Description
The AED2_SSR.boundary()
is used to calculate the futility
and efficacy stopping boundaries of the Adaptive Enrichment Design (strategy 2)
with Sample Size Re-estimation Procedure. In the AED2-SSR design, an
\epsilon
-rule is introduced to select the subgroup with larger test
statistic. In practice, the value of \epsilon
should be calibrated to
fit the requirement of the trial.
Usage
AED2_SSR.boundary(rho, alpha, pstar, epsilon)
Arguments
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
pstar |
The |
epsilon |
The threshold of difference between the subgroup-specific test statistics |
Value
A list contains
upper.boundary The upper and efficacy stopping boundary
lower.boundary The lower and futility stopping boundary
Examples
rho <- 0.5
alpha <- 0.05
pstar <- 0.15
epsilon <- 0.5
AED2_SSR.boundary(rho = rho, alpha = alpha, pstar = pstar, epsilon = epsilon)
Conduct the simulation studies of the Adaptive Enrichment Design (Strategy 2) with Sample Size Re-estimation Procedure
Description
The AED2_SSR.sim()
is used to conduct the simulation studies
of the Adaptive Enrichment Design (Strategy) with sample size re-estimation
procedure. The AED2-SSR is different from the AED3-SSR, in which an
\epsilon
-rule is introduced to select the subgroup with larger
subgroup-specific test statistic.
Usage
AED2_SSR.sim(
N1,
rho,
alpha,
beta,
pstar,
theta,
theta0,
sigma0,
epsilon,
nSim,
Seed
)
Arguments
N1 |
The sample size used in the first stage |
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
beta |
The (1 - power) |
pstar |
The |
theta |
The sizes of treatment effect in subgroups 1 and 2 with the experimental treatment |
theta0 |
The size of treatment effect with the standard treatment |
sigma0 |
The variance of the treatment effect |
epsilon |
The threshold of the difference between subgroup-specific test statistics |
nSim |
The number of simulated studies |
Seed |
The random seed |
Value
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H_{00}
H01 The probability of rejecting the null hypothesis of
H_{01}
H02 The probability of rejecting the null hypothesis of
H_{02}
H0 The probabilities of rejecting at least one of the null hypothesis
ESF The probability of early stopping for futility
ESE The probability of early stopping for efficacy
Enrich01 The prevalence of adaptive enrichment of subgroup 1
Enrich02 The prevalence of adaptive enrichment of subgroup 2
Trigger03 The prevalence of no enrichment
Examples
N <- 310
rho <- 0.5
alpha <- 0.05
beta <- 0.2
theta <- c(0,0)
theta0 <- 0
sigma0 <- 1
epsilon <- 0.5
pstar <- 0.20
nSim <- 1000
Seed <- 6
res <- AED2_SSR.sim(N1 = N, rho = rho, alpha = alpha,
beta = beta, theta = theta, theta0 = theta0,
sigma0 = sigma0, pstar = pstar, epsilon = epsilon,
nSim = nSim, Seed = Seed)
Calculate the N2
and the critical value C
in the Adaptive
Enrichment Design (Strategy 3) with Sample Size Re-estimation Procedure
Description
The AED3_SSR.CP()
is used to calculate the sample size required
at the second stage and the critical value used at the final analysis in the
Adaptive Enrichment Design with Sample Size Re-estimation Procedure. In
addition, this function can also used to conduct the conditional power
analysis in terms of N2
Usage
AED3_SSR.CP(
Z1 = NULL,
delta = NULL,
N1 = NULL,
pstar,
rho,
alpha,
beta,
N2 = NULL
)
Arguments
Z1 |
The test statistic obtained at the interim analysis |
delta |
The standardized size of treatment effect, which can be estimated
by using |
N1 |
The sample size used at the first stage |
pstar |
The |
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
beta |
The |
N2 |
The pre-specified sample size used at the second stage, which is used to conduct the conditional power analysis |
Value
A list contains
N2 The pre-specified sample size used at the second stage, which is used to implement the conditional power analysis
Conditional.Power The value of conditional power given the value of
N2
in the conditional power analysisP.Value The corresponding P-Value used at the final analysis in the conditional power analysis
N2.CP The re-estimated sample size of
N2
to ensure an adequate conditional powerc.CP The estimated the critical value used at the final analysis based the conditional power
Examples
Z1 <- 1.974
delta <- 0.355
N1 <- 248
pstar <- 0.15
alpha <- 0.05
rho <- 0.5
beta <- 0.20
N2 <- 108
AED3_SSR.CP(Z1 = Z1, delta = delta, N1 = N1, pstar = pstar,
alpha = alpha, rho = rho, beta = beta, N2 = N2)
Calculate the futility and efficacy stopping boundaries in Adaptive enrichment design (Strategy 3) with Sample Size Re-estimation Procedure for the continuous endpoint
Description
The AED3_SSR.boundary()
is used to calculate the futility
and efficacy stopping boundaries in the Adaptive Enrichment Design with
Sample Size Re-estimation Procedure.
Usage
AED3_SSR.boundary(rho, alpha, pstar)
Arguments
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
pstar |
The |
Value
A list contains
upper.boundary The upper or the efficacy stopping boundary
lower.boundary The lower or the futility stopping boundary
Examples
rho <- 0.5
alpha <- 0.05
pstar <- 0.15
res <- AED3_SSR.boundary(rho = rho, alpha = alpha, pstar = pstar)
Conduct the simulation studies of the Adaptive Enrichment Design (Strategy 3) with Sample Size Re-estimation Procedure based on Futility and Efficacy Stopping Boundaries for the continuous endpoint
Description
The AED3_SSR.sim()
is used to conduct the adaptive enrichment
design with Sample Size Re-estimation, in which futility and efficacy stopping
boundaries are used to guide the adaptive enrichment process. For the
adaptively enriched subgroup, we re-estimate the sample size to maintain an
adequate conditional power meanwhile protect the overall Type I error rate.
Usage
AED3_SSR.sim(N1, rho, alpha, beta, theta, theta0, sigma0, pstar, nSim, Seed)
Arguments
N1 |
The sample size used at the first stage |
rho |
The proportion of subgroup 1 among the overall patients |
alpha |
The overall Type I error rate |
beta |
The |
theta |
The sizes of treatment effect in subgroups 1 and 2 with experimental treatment |
theta0 |
The size of treatment effect in standard treatment |
sigma0 |
The known variance of the treatment effect |
pstar |
The |
nSim |
The number of simulated studies. |
Seed |
The random seed |
Value
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H_{00}
H01 The probability of rejecting the null hypothesis of
H_{01}
H02 The probability of rejecting the null hypothesis of
H_{02}
H0 The probabilities of rejecting at least one of the null hypothesis
Enrich01 The prevalence of adaptive enrichment of subgroup 1
Enrich02 The prevalence of adaptive enrichment of subgroup 2
Trigger03 The prevalence of early stopping for the situation, in which the treatment effect in subgroup 1 is superiority, while the treatment effect in subgroup 2 is inconclusive
Trigger04 The prevalence of early stopping for the situation, in which the treatment effect in subgroup 2 is superiority, while the treatment effect in subgroup 2 is inconclusive
ESF The probability of early stopping for futility
ESE The probability of early stopping for efficacy
Examples
N <- 310
rho <- 0.5
alpha <- 0.05
beta <- 0.2
theta <- c(0,0)
theta0 <- 0
sigma0 <- 1
pstar <- 0.20
nSim <- 100
Seed <- 6
res <- AED3_SSR.sim(N1 = N, rho = rho, alpha = alpha,
beta = beta, theta = theta, theta0 = theta0,
sigma0 = sigma0, pstar = pstar, nSim = nSim,
Seed = Seed)
Conduct the simulation studies of the Marker Sequential Test design
Description
The MaST.sim()
is used to conduct the simulation studies
of the marker sequential test design (MaST).
Usage
MaST.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
Arguments
N |
The total sample size used at the trial |
rho |
The proportion of subgroup 1 among the overall patients |
alpha |
The overall Type I error rate |
beta |
The (1 - Power) |
theta |
The sizes of treatment effect in subgroups 1 and 2 with the experimental arm |
theta0 |
The size of treatment effect in the standard arm |
sigma0 |
The variance of the treatment effect |
nSim |
The number of simulated studies |
Seed |
The random seed |
Value
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H_{00}
H01 The probability of rejecting the null hypothesis of
H_{01}
H02 The probability of rejecting the null hypothesis of
H_{02}
H0 The probabilities of rejecting at least one of the null hypothesis
References
Freidlin, B., Korn, E. L., and Gray, R. (2014). Marker sequential test (MaST) design. Clinical trials, 11(1), 19-27. <doi:10.1177/1740774513503739>
Examples
N <- 310
rho <- 0.5
alpha <- 0.05
beta <- 0.20
theta <- c(0,0)
theta0 <- 0
sigma0 <- 1
nSim <- 1000
Seed <- 6
MaST.sim(N = N, rho = rho, alpha = alpha, beta = beta,
theta = theta, theta0 = theta0, sigma0 = sigma0,
nSim = nSim, Seed = Seed)
Conduct the simulation studies of the standard design
Description
The SD.sim()
is used to implement the simulation studies
of the standard design.
Usage
SD.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
Arguments
N |
The total sample size required |
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
beta |
The |
theta |
The sizes of treatment effects for subgroups 1 and 2 in experimental arm |
theta0 |
The size of treatment effect for the control arm |
sigma0 |
The variance of the treatment effect |
nSim |
The number of simulated studies |
Seed |
The random seed |
Value
A list contains,
nTotal the total sample used
The power of the specified trial. Here, the power is defined as the probability of rejecting the null hypothesis.
Examples
N <- 620
rho <- 0.5
alpha <- 0.05
beta <- 0.2
theta <- c(0.2,0.0)
theta0 <- 0
sigma0 <- 1
nSim <- 1000
Seed <- 6
SD.sim(N = N, rho = rho,
alpha = alpha, beta = beta, theta = theta, theta0 = theta0,
sigma0 = sigma0, nSim = nSim, Seed = Seed)
Calculate the N2
and the critical value C
in Sample Size
Re-estimation Procedure
Description
The SSR.CP()
is used to calculate the sample size required
at the second stage and the critical value used at the final analysis. In
addition, this function can also used to conduct the conditional power
analysis in terms of N2
Usage
SSR.CP(Z1 = NULL, delta = NULL, N1 = NULL, pstar, alpha, beta, N2 = NULL)
Arguments
Z1 |
The test statistic obtained at the interim analysis |
delta |
The standardized size of treatment effect, which can be estimated
by using |
N1 |
The sample size used at the first stage |
pstar |
The |
alpha |
The overall Type I error rate |
beta |
The |
N2 |
The pre-specified sample size used at the second stage, which is used to conduct the conditional power analysis |
Value
A list contains
N2 The pre-specified sample size used at the second stage, which is used to implement the conditional power analysis
Conditional.Power The value of conditional power given the value of
N2
in the conditional power analysisP.Value The corresponding P-Value used at the final analysis in the conditional power analysis
N2.CP The re-estimated sample size of
N2
to ensure an adequate conditional powerc.CP The estimated the critical value used at the final analysis based the conditional power
References
Proschan MA, Hunsberger SA. Designed extension of studies based on conditional power. Biometrics 1995:1315-1324. <doi:10.2307/2533262>
Examples
Z1 <- 1.527
delta <- 0.137
N1 <- 248
pstar <- 0.15
alpha <- 0.05
beta <- 0.2
res <- SSR.CP(Z1 = Z1, delta = delta, N1 = N1,
pstar = pstar, alpha = alpha, beta = beta)
Calculate the futility and efficacy stopping boundaries for Sample Size Re-estimation Procedure based on the conditional error function
Description
The SSD.boundary()
is used to calculate the futility
and efficacy stopping boundaries, meanwhile protect the overall Type I
error rate at the pre-specified level.
Usage
SSR.boundary(alpha, pstar)
Arguments
alpha |
The overall Type I error rate |
pstar |
The |
Value
A list contain
upper.boundary The efficacy stopping boundary at the interim analysis
lower.boundary The futility stopping boundary at the interim analysis
References
Proschan MA, Hunsberger SA. Designed extension of studies based on conditional power. Biometrics 1995:1315-24. <doi:10.2307/2533262>
Examples
alpha <- 0.05
pstar <- 0.2
res <- SSR.boundary(alpha = alpha, pstar = pstar)
Conduct the simulation studies using SSR
Description
The SSR.sim()
is used to implement the simulation studies
based on the Sample Size Re-estimation Procedure.
Usage
SSR.sim(N, rho, alpha, beta, theta, theta0, sigma0, pstar, nSim, Seed)
Arguments
N |
The sample size used at the first stage. Note that this |
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
beta |
The |
theta |
The sizes of treatment effects for subgroups 1 and 2 in the experimental arm |
theta0 |
The size of treatment effect in the control arm |
sigma0 |
The variance of the treatment effect |
pstar |
The |
nSim |
The number of simulated studies |
Seed |
The random seed |
Value
A list contains
nTotal The average total sample size used in SSR
H0 The power of SSR under the specific trial design. Here, the power is defined as the probability of rejecting the null hypothesis
ESF The percentage of early stopping for futility
ESE The percentage of early stopping for efficacy
References
Proschan MA, Hunsberger SA. Designed extension of studies based on conditional power. Biometrics 1995:1315-1324. <doi:10.2307/2533262>
Examples
N <- 310
rho <- 0.5
alpha <- 0.05
beta <- 0.2
pstar <- 0.2
theta <- c(0.2,0)
theta0 <- 0
sigma0 <- 1.0
nSim <- 1000
Seed <- 6
res <- SSR.sim(N = N, rho = rho, alpha = alpha, beta = beta, theta = theta,
theta0 = theta0, sigma0 = sigma0, pstar = pstar,
nSim = nSim, Seed = Seed)
Commonly used \alpha
-spending functions
Description
The SigP()
is used to calculate the reduced significant
level based on several widely used \alpha
-spending functions, such as
the "Pocock", "Lan-DeMets", "O'Brein-Fleming" and "Power" functions.
Usage
SigP(alpha, Info, esFunction = "Pocock", gamma = 1)
Arguments
alpha |
The overall Type I error rate |
Info |
The fraction of the observed information |
esFunction |
The specific |
gamma |
The parameter used in the Power method. The default value is
|
Value
The reduced significant level
Examples
alpha <- 0.05
Info <- 0.5
esFunction = "OF"
SigP(alpha = alpha, Info = Info, esFunction = esFunction)
Sample size calculation for the standard design with continuous endpoint
Description
The sSize.norm()
is used to calculate the sample size
used in the standard design with continuous endpoint.
Usage
sSize.norm(alpha, beta, theta, side, r, sigma2)
Arguments
alpha |
The Type I error rate or the significant level |
beta |
beta The |
theta |
The size of treatment effect |
side |
One-sided or two-sided Test |
r |
The ratio of sample size between the experimental and control arms |
sigma2 |
The variance of the treatment effect |
Value
A list contains the total sample size, and the sample sizes required for the experimental and control arms.
Examples
alpha <- 0.05
beta <- 0.2
theta <- 0.2
side <- 1
r <- 1
sigma2 <- 0.8
sSize.norm(alpha = alpha, beta = beta, theta = theta,
side = side, r = r, sigma2 = sigma2)