Title: | Adaptive Enrichment Designs with Sample Size Re-Estimation |
---|---|
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. |
Authors: | Zhao Yang, Ruitao Lin, Guosheng Yin and Ying Yuan |
Maintainer: | Zhao Yang <[email protected]> |
License: | GPL-2 |
Version: | 1.0.3 |
Built: | 2025-03-13 03:15:35 UTC |
Source: | https://github.com/cran/esDesign |
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 level
AED.boundary(rho, alpha, Info, epsilon)
AED.boundary(rho, alpha, Info, epsilon)
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 |
The critical value used at the final analysis
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>
AED.boundary(rho = 0.5, alpha = 0.05, Info = 0.5, epsilon = 0.5)
AED.boundary(rho = 0.5, alpha = 0.05, Info = 0.5, epsilon = 0.5)
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 -rule is
also introduced to select the subgroup with larger subgroup-specific test
statistic.
AED.sim( N1, N2, rho, alpha, beta, theta, theta0, K, Info, epsilon, sigma0, nSim, Seed )
AED.sim( N1, N2, rho, alpha, beta, theta, theta0, K, Info, epsilon, sigma0, nSim, Seed )
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 |
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H01 The probability of rejecting the null hypothesis of
H02 The probability of rejecting the null hypothesis of
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
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>
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)
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)
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.
AED1_SSR.boundary(rho, alpha, pstar, Info, epsilon)
AED1_SSR.boundary(rho, alpha, pstar, Info, epsilon)
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. |
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>
AED1_SSR.boundary(rho = 0.5, alpha = 0.05, pstar = 0.2, Info = 0.5, epsilon = 0.5)
AED1_SSR.boundary(rho = 0.5, alpha = 0.05, pstar = 0.2, Info = 0.5, epsilon = 0.5)
The AED1_SSR.CP()
is used to calculate the conditional
power of the Adaptive Enrichment Design (Strategy 1) with sample size
re-estimation procedure
AED1_SSR.CP(c, Z1, N1, N2)
AED1_SSR.CP(c, Z1, N1, N2)
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 |
A list contains
Critical.Value The critical value used at the final analysis
Conditional.Power The value of conditional power given the observed data
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>
c <- 2.258 Z1 <- 1.975 N1 <- 248 N2 <- 200 AED1_SSR.CP(c = 2.258, Z1 = 1.974, N1 = 248, N2 = 200)
c <- 2.258 Z1 <- 1.975 N1 <- 248 N2 <- 200 AED1_SSR.CP(c = 2.258, Z1 = 1.974, N1 = 248, N2 = 200)
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.
AED1_SSR.N2(c, z1, N1, beta)
AED1_SSR.N2(c, z1, N1, beta)
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) |
The Value of the re-estimated sample size
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>
c <- 2.258 z1 <- 1.974 N1 <- 248 beta <- 0.2 AED1_SSR.N2(c = c, z1 = z1, N1 = N1, beta = beta)
c <- 2.258 z1 <- 1.974 N1 <- 248 beta <- 0.2 AED1_SSR.N2(c = c, z1 = z1, N1 = N1, beta = beta)
The AED1_SSR.sim()
is used to conduct the simulation study
of the Adaptive Enrichment Design (Strategy 1) with Sample Size Re-estimation
procedure
AED1_SSR.sim( N1, rho, alpha, beta, pstar, theta, theta0, Info, K = 2, epsilon, sigma0, nSim, Seed )
AED1_SSR.sim( N1, rho, alpha, beta, pstar, theta, theta0, Info, K = 2, epsilon, sigma0, nSim, Seed )
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 |
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H01 The probability of rejecting the null hypothesis of
H02 The probability of rejecting the null hypothesis of
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
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>
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)
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)
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
-rule is introduced to select the subgroup with larger test
statistic. In practice, the value of
should be calibrated to
fit the requirement of the trial.
AED2_SSR.boundary(rho, alpha, pstar, epsilon)
AED2_SSR.boundary(rho, alpha, pstar, epsilon)
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 |
A list contains
upper.boundary The upper and efficacy stopping boundary
lower.boundary The lower and futility stopping boundary
rho <- 0.5 alpha <- 0.05 pstar <- 0.15 epsilon <- 0.5 AED2_SSR.boundary(rho = rho, alpha = alpha, pstar = pstar, epsilon = epsilon)
rho <- 0.5 alpha <- 0.05 pstar <- 0.15 epsilon <- 0.5 AED2_SSR.boundary(rho = rho, alpha = alpha, pstar = pstar, epsilon = epsilon)
and the critical value
in the Adaptive
Enrichment Design (Strategy 2) with Sample Size Re-estimation ProcedureThe 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
AED2_SSR.CP( Z1 = NULL, delta = NULL, N1 = NULL, pstar, rho, epsilon, alpha, beta, N2 = NULL )
AED2_SSR.CP( Z1 = NULL, delta = NULL, N1 = NULL, pstar, rho, epsilon, alpha, beta, N2 = NULL )
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 |
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 analysis
P.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 power
c.CP The estimated the critical value used at the final analysis based the conditional power
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)
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)
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
-rule is introduced to select the subgroup with larger
subgroup-specific test statistic.
AED2_SSR.sim( N1, rho, alpha, beta, pstar, theta, theta0, sigma0, epsilon, nSim, Seed )
AED2_SSR.sim( N1, rho, alpha, beta, pstar, theta, theta0, sigma0, epsilon, nSim, Seed )
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 |
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H01 The probability of rejecting the null hypothesis of
H02 The probability of rejecting the null hypothesis of
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
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)
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)
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.
AED3_SSR.boundary(rho, alpha, pstar)
AED3_SSR.boundary(rho, alpha, pstar)
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
pstar |
The |
A list contains
upper.boundary The upper or the efficacy stopping boundary
lower.boundary The lower or the futility stopping boundary
rho <- 0.5 alpha <- 0.05 pstar <- 0.15 res <- AED3_SSR.boundary(rho = rho, alpha = alpha, pstar = pstar)
rho <- 0.5 alpha <- 0.05 pstar <- 0.15 res <- AED3_SSR.boundary(rho = rho, alpha = alpha, pstar = pstar)
and the critical value
in the Adaptive
Enrichment Design (Strategy 3) with Sample Size Re-estimation ProcedureThe 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
AED3_SSR.CP( Z1 = NULL, delta = NULL, N1 = NULL, pstar, rho, alpha, beta, N2 = NULL )
AED3_SSR.CP( Z1 = NULL, delta = NULL, N1 = NULL, pstar, rho, alpha, beta, N2 = NULL )
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 |
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 analysis
P.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 power
c.CP The estimated the critical value used at the final analysis based the conditional power
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)
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)
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.
AED3_SSR.sim(N1, rho, alpha, beta, theta, theta0, sigma0, pstar, nSim, Seed)
AED3_SSR.sim(N1, rho, alpha, beta, theta, theta0, sigma0, pstar, nSim, Seed)
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 |
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H01 The probability of rejecting the null hypothesis of
H02 The probability of rejecting the null hypothesis of
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
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)
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)
The MaST.sim()
is used to conduct the simulation studies
of the marker sequential test design (MaST).
MaST.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
MaST.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
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 |
A list contains
nTotal The average expected sample size
H00 The probability of rejecting the null hypothesis of
H01 The probability of rejecting the null hypothesis of
H02 The probability of rejecting the null hypothesis of
H0 The probabilities of rejecting at least one of the null hypothesis
Freidlin, B., Korn, E. L., and Gray, R. (2014). Marker sequential test (MaST) design. Clinical trials, 11(1), 19-27. <doi:10.1177/1740774513503739>
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)
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)
The SD.sim()
is used to implement the simulation studies
of the standard design.
SD.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
SD.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
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 |
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.
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)
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)
-spending functionsThe SigP()
is used to calculate the reduced significant
level based on several widely used -spending functions, such as
the "Pocock", "Lan-DeMets", "O'Brein-Fleming" and "Power" functions.
SigP(alpha, Info, esFunction = "Pocock", gamma = 1)
SigP(alpha, Info, esFunction = "Pocock", gamma = 1)
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
|
The reduced significant level
alpha <- 0.05 Info <- 0.5 esFunction = "OF" SigP(alpha = alpha, Info = Info, esFunction = esFunction)
alpha <- 0.05 Info <- 0.5 esFunction = "OF" SigP(alpha = alpha, Info = Info, esFunction = esFunction)
The sSize.norm()
is used to calculate the sample size
used in the standard design with continuous endpoint.
sSize.norm(alpha, beta, theta, side, r, sigma2)
sSize.norm(alpha, beta, theta, side, r, sigma2)
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 |
A list contains the total sample size, and the sample sizes required for the experimental and control arms.
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)
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)
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.
SSR.boundary(alpha, pstar)
SSR.boundary(alpha, pstar)
alpha |
The overall Type I error rate |
pstar |
The |
A list contain
upper.boundary The efficacy stopping boundary at the interim analysis
lower.boundary The futility stopping boundary at the interim analysis
Proschan MA, Hunsberger SA. Designed extension of studies based on conditional power. Biometrics 1995:1315-24. <doi:10.2307/2533262>
alpha <- 0.05 pstar <- 0.2 res <- SSR.boundary(alpha = alpha, pstar = pstar)
alpha <- 0.05 pstar <- 0.2 res <- SSR.boundary(alpha = alpha, pstar = pstar)
and the critical value
in Sample Size
Re-estimation ProcedureThe 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
SSR.CP(Z1 = NULL, delta = NULL, N1 = NULL, pstar, alpha, beta, N2 = NULL)
SSR.CP(Z1 = NULL, delta = NULL, N1 = NULL, pstar, alpha, beta, N2 = NULL)
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 |
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 analysis
P.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 power
c.CP The estimated the critical value used at the final analysis based the conditional power
Proschan MA, Hunsberger SA. Designed extension of studies based on conditional power. Biometrics 1995:1315-1324. <doi:10.2307/2533262>
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)
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)
The SSR.sim()
is used to implement the simulation studies
based on the Sample Size Re-estimation Procedure.
SSR.sim(N, rho, alpha, beta, theta, theta0, sigma0, pstar, nSim, Seed)
SSR.sim(N, rho, alpha, beta, theta, theta0, sigma0, pstar, nSim, Seed)
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 |
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
Proschan MA, Hunsberger SA. Designed extension of studies based on conditional power. Biometrics 1995:1315-1324. <doi:10.2307/2533262>
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)
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)