optsamplesize_tHp | R Documentation |
Compute the optimal sample size for the weighted trimmed or truncated Hochberg procedure
optsamplesize_tHp(
alpha,
betavec,
deltavec,
rho,
ninterval = c(2, 2000),
alphalist = seq(from = 0, to = alpha, by = 0.005)
)
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 |
ninterval |
a vector containing the end-points of the interval to be searched for optimal sample size |
alphalist |
a vector of discrete alpha values |
the overall optimal sample size for the weighted trimmed or truncated Hochberg procedure
Jiangtao Gou
Fengqing Zhang
Gou, J., Chang, Y., Li, T., and Zhang, F. (2025). Improved trimmed weighted Hochberg procedures with two endpoints and sample size optimization. Technical Report.
psivec <- c(0.76, 0.72)
thetavec <- log(psivec)
deltavec <- (-thetavec)/2
result <- optsamplesize_tHp(alpha = 0.05, betavec = c(0.20, 0.10),
deltavec = deltavec , rho = -0.1)
result$nopt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.