optsamplesize_tHp {itrimhoch}R Documentation

Compute the optimal sample size for the weighted trimmed or truncated Hochberg procedure

Description

Compute the optimal sample size for the weighted trimmed or truncated Hochberg procedure

Usage

optsamplesize_tHp(
  alpha,
  betavec,
  deltavec,
  rho,
  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

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 trimmed or truncated 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

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

[Package itrimhoch version 1.0.0 Index]