optsamplesize_wHolmpm {itrimhoch} | R Documentation |
Compute the optimal sample size for the weighted Holm procedure with allowance for different data maturities
Description
Compute the optimal sample size for the weighted Holm procedure with allowance for different data maturities
Usage
optsamplesize_wHolmpm(
alpha,
betavec,
deltavec,
rho,
maturity,
ninterval = c(2, 2000),
alphalist = seq(from = 0, to = alpha, by = 0.005)
)
Arguments
alpha |
the significance level |
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 |
maturity |
a numeric vector of two values representing the data maturities for the two hypotheses |
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 weighted Holm procedure with allowance for different data maturities
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
alpha <- 0.025
k <- 0.6761
ninterval <- c(2, 1000)
betavec <- c(0.05, 0.15)
rho <- 0.4
maturity <- c(0.65, 0.70)
psivec <- c(0.67, 0.73)
thetavec <- log(psivec)
deltavec <- (-thetavec)*sqrt(rrr)/(1+rrr)
result <- optsamplesize_wHolmpm(alpha = alpha, betavec = betavec,
deltavec = deltavec , rho = rho,
maturity = maturity, ninterval = ninterval)
result$nopt