solveAlphaXsampleSize {triggerstrategy} | R Documentation |
Sample size calculation
Description
This function computes the sample size and the error rate pre-assigned to the primary endpoint using methods of trigger
, holm
, maurer-bretz
, bonferroni
.
Usage
solveAlphaXsampleSize(
alpha,
beta0,
beta1,
effsz0,
effsz1,
szratio = 1,
t0 = 1,
t1 = 1,
tc0 = t0,
tc1 = t1,
rho = 0,
iuse0 = 1,
iuse1 = 1,
phi0 = rep(1, length(alpha)),
phi1 = rep(1, length(alpha)),
usingRhoForBoundary = FALSE,
method = "trigger",
myinit
)
Arguments
alpha |
a number of overall type I error rate |
beta0 |
a number of type II error rate for H0 |
beta1 |
a number of type II error rate for H1 |
effsz0 |
a number of the effect size of testing H0 |
effsz1 |
a number of the effect size of testing H1 |
szratio |
a number of the ratio of sample size of testing H0 to that of testing H1 |
t0 |
a vector of information times for H0 |
t1 |
a vector of information times for H1 |
tc0 |
a vector of calendar times for H0 |
tc1 |
a vector of calendar times for H1 |
rho |
a value of correlation coefficient between H0 and H1 |
iuse0 |
an integer shows the type of group sequential boundaries used for the primary endpoint |
iuse1 |
an integer shows the type of group sequential boundaries used for the secondary endpoint |
phi0 |
a parameter for the power family or the HSD gamma family for the primary endpoint |
phi1 |
a parameter for the power family or the HSD gamma family for the secondary endpoint |
usingRhoForBoundary |
an indicator whether using the informaiton of rho to calculate the boundary, default is FALSE (not using) |
method |
a text of method, including |
myinit |
a vector of two starting points for alpha0 and sample size. |
Value
a list of two values, alpha0
and groupsize
References
Gou, J. (2023). Trigger strategy in repeated tests on multiple hypotheses. Statistics in Biopharmaceutical Research, 15(1), 133-140. Gou, J. (2022). Sample size optimization and initial allocation of the significance levels in group sequential trials with multiple endpoints. Biometrical Journal, 64(2), 301-311.
Examples
# Single Stage Example
alpha <- 0.025
effsz0 <- 0.4
effsz1 <- 0.30
szratio <- 1
beta0 <- 0.10
beta1 <- 0.20
solveAlphaXsampleSize(alpha, beta0, beta1,
effsz0, effsz1, szratio)
# Multi-stage example
alpha <- 0.025
beta0 <- 0.10
beta1 <- 0.20
effsz0 <- 0.33
effsz1 <- 0.30
szratio <- 1
t0 <- c(0.5,0.9,1)
t1 <- c(0.6,1)
tc0 <- c(1,2)
tc1 <- c(1,2,3)
rho <- 0
iuse0 <- 1
iuse1 <- 2
phi0 <- -4
phi1 <- 1
usingRhoForBoundary <- FALSE
myinit <- c(300,alpha/2)
myinit <- c(200,alpha/10)
method="trigger"
method="bonferroni"
method="holm"
method="maurer-bretz"
solveAlphaXsampleSize(alpha=alpha,
beta0=beta0, beta1=beta1,
effsz0=effsz0, effsz1=effsz1,
szratio=szratio,
t0=t0, t1=t1, tc0=tc0, tc1=tc1,
rho=rho, iuse0=iuse0, iuse1=iuse1,
phi0=phi0, phi1=phi1,
usingRhoForBoundary=usingRhoForBoundary,
method=method,
myinit=myinit)