optsamplesize_iHp {itrimhoch} | R Documentation |
Compute the optimal sample size for the improved trimmed weighted Hochberg procedure
Description
Compute the optimal sample size for the improved trimmed weighted Hochberg procedure
Usage
optsamplesize_iHp(
alpha,
k,
betavec,
deltavec,
rho,
ninterval = c(2, 2000),
alphalist = seq(from = 0, to = alpha, by = 0.005)
)
Arguments
alpha |
the significance level |
k |
a pre-specified constant in the improved trimmed weighted Hochberg procedure |
betavec |
a numeric vector of two values, including one minus the desired power for rejecting H1 and one minus the desired power for rejecting H2 |
deltavec |
a numeric vector of two values representing the effect sizes for the two hypotheses |
rho |
the correlation coefficient between two test statistics |
ninterval |
a vector containing the end-points of the interval to be searched for optimal sample size |
alphalist |
a vector of discrete alpha values |
Value
the overall optimal sample size for the improved trimmed weighted Hochberg procedure
Author(s)
Jiangtao Gou
Fengqing Zhang
References
Gou, J., Chang, Y., Li, T., and Zhang, F. (2025). Improved trimmed weighted Hochberg procedures with two endpoints and sample size optimization. Technical Report.
Examples
rrr <- 2 # Allocation ratio
alpha <- 0.025
k <- 2/3
ninterval <- c(2, 1000)
betavec <- c(0.05, 0.15)
rho <- 0.3
psivec <- c(0.67, 0.73)
thetavec <- log(psivec)
deltavec <- (-thetavec)*sqrt(rrr)/(1+rrr)
result <- optsamplesize_iHp(alpha = alpha, k = k,
betavec = betavec, deltavec = deltavec,
rho = rho, ninterval = ninterval)
result$nopt