Type: Package
Title: Improved Trimmed Weighted Hochberg Procedures and Sample Size Optimization
Version: 1.0.0
Description: The improved trimmed weighted Hochberg procedure provides increased statistical power and relaxes the dependence assumptions for familywise error rate control compared to the original weighted Hochberg procedure. This package computes the boundaries required for implementing the proposed methodology and includes sample size optimization methods. See Gou, J., Chang, Y., Li, T., and Zhang, F.(2025). Improved trimmed weighted Hochberg procedures with two endpoints and sample size optimization. Technical Report.
License: GPL-3
Encoding: UTF-8
Depends: R (≥ 4.2.0)
Imports: mvtnorm (≥ 1.2), stats (≥ 4.0.0)
RoxygenNote: 7.3.2.9000
NeedsCompilation: no
Packaged: 2025-04-23 04:32:38 UTC; psystat
Author: Jiangtao Gou [aut, cre], Fengqing (Zoe) Zhang [aut], Yizhuo Chang [ctb], Tianqi Li [ctb]
Maintainer: Jiangtao Gou <gouRpackage@gmail.com>
Repository: CRAN
Date/Publication: 2025-04-24 17:40:09 UTC

Find the difference between the error rate when k and rho are both given and the prespecified alpha level

Description

Find the difference between the error rate when k and rho are both given and the prespecified alpha level

Usage

find_k_given_rho_target_mvtnorm(k, rho, alpha, alphavec = c(alpha/2, alpha/2))

Arguments

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

rho

the correlation coefficient between two test statistics

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the difference between the error rate when k is specified and rho is optimal and the prespecified alpha level

Author(s)

Jiangtao Gou

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.


Find the difference between the error rate when k is specified and rho is optimal and the prespecified alpha level

Description

Find the difference between the error rate when k is specified and rho is optimal and the prespecified alpha level

Usage

find_k_target_mvtnorm(k, alpha, alphavec = c(alpha/2, alpha/2))

Arguments

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the difference between the error rate when k is specified and rho is optimal and the prespecified alpha level

Author(s)

Jiangtao Gou

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.


Find the partial derivative of the error rate with respect to the correlation coefficient rho when k and rho are given

Description

Find the partial derivative of the error rate with respect to the correlation coefficient rho when k and rho are given

Usage

find_rho_target_mvtnorm(rho, k, alpha, alphavec = c(alpha/2, alpha/2))

Arguments

rho

the correlation coefficient between two test statistics

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the partial derivative of the error rate with respect to the correlation coefficient rho

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H1 using the improved trimmed or truncated weighted Hochberg procedure

Description

Find the difference between the achieved power and the desired power for rejecting H1 using the improved trimmed or truncated weighted Hochberg procedure

Usage

iHpTarget1(n, alpha1, alpha, k, beta1, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

beta1

one minus the desired power for rejecting H1

deltavec

a numeric vector of two values representing the effect sizes for the two hypotheses

rho

the correlation coefficient between two test statistics

Value

the difference between the achieved power and the desired power for rejecting H1 using the improved trimmed or truncated weighted Hochberg procedure

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H1 using the improved trimmed or truncated weighted Hochberg procedure with allowance for different data maturities

Description

Find the difference between the achieved power and the desired power for rejecting H1 using the improved trimmed or truncated weighted Hochberg procedure with allowance for different data maturities

Usage

iHpTarget1m(n, alpha1, alpha, k, beta1, deltavec, rho, maturity)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

beta1

one minus the desired power for rejecting H1

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

Value

the difference between the achieved power and the desired power for rejecting H1

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H2 using the improved trimmed or truncated weighted Hochberg procedure

Description

Find the difference between the achieved power and the desired power for rejecting H2 using the improved trimmed or truncated weighted Hochberg procedure

Usage

iHpTarget2(n, alpha1, alpha, k, beta2, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

beta2

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

Value

the difference between the achieved power and the desired power for rejecting H2 using the improved trimmed or truncated weighted Hochberg procedure

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H2 using the improved trimmed or truncated weighted Hochberg procedure with allowance for different data maturities

Description

Find the difference between the achieved power and the desired power for rejecting H2 using the improved trimmed or truncated weighted Hochberg procedure with allowance for different data maturities

Usage

iHpTarget2m(n, alpha1, alpha, k, beta2, deltavec, rho, maturity)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

beta2

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

Value

the difference between the achieved power and the desired power for rejecting H2

Author(s)

Jiangtao Gou

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.


Calculate the x-coordinates of a function where zero crossings occur

Description

Calculate the x-coordinates of a function where zero crossings occur

Usage

interpolate_zero(values, x = NULL)

Arguments

values

a numeric vector representing the function's output at specific points

x

Aa vector of x-coordinates corresponding to the values. If not provided, it defaults to 1:length(values)

Value

the x-coordinates where zero crossings occur. If no crossings are found, it returns NA


Power for rejecting H1 using various types of the Hochberg Procedure

Description

Power for rejecting H1 using various types of the Hochberg Procedure

Usage

itwcHochPower(n, alpha1, alpha, deltavec, rho, proctype = "i", k = 0)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

deltavec

a numeric vector of two values representing the effect sizes for the two hypotheses

rho

the correlation coefficient between two test statistics

proctype

the improved trimmed weighted Hochberg procedure is denoted by i, the trimmed weighted Hochberg procedure is denoted by t , the weighted Hochberg procedure is denoted by w, and the conservative weighted Hochberg procedure is denoted by c

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

Value

the power for rejecting H1 is denoted by pwr1, the power for rejecting H2 is denoted by pwr2, and the power for rejecting both H1 and H2 is denoted by pwr12

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

itwcHochPower(n = 100,
alpha1 = 0.0125, alpha = 0.025,
deltavec = c(0.2, 0.25), rho = 0.2,
proctype = "i", k = 0)
itwcHochPower(n = 100,
alpha1 = 0.0125, alpha = 0.025,
deltavec = c(0, 0), rho = 0,
proctype = "w", k = 0)

The two-step algorithm to calculate the best k value for the improved trimmed Hochberg method to ensure that the maximum type I error rate reaches alpha exactly when rho is arbitrary

Description

The two-step algorithm to calculate the best k value for the improved trimmed Hochberg method to ensure that the maximum type I error rate reaches alpha exactly when rho is arbitrary

Usage

optk(alpha, alphavec = c(alpha/2, alpha/2))

Arguments

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the best k value k_opt and the rho value that makes the type I error rate reaches the maximum value rho_opt

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

optk(alpha = 0.025)

Calculate the rho value that reaches the maximum type I error rate in the improved trimmed Hochberg method when k value is given

Description

Calculate the rho value that reaches the maximum type I error rate in the improved trimmed Hochberg method when k value is given

Usage

optrho(k, alpha, alphavec = c(alpha/2, alpha/2))

Arguments

k

a pre-specified constant in the improved trimmed weighted Hochberg procedure

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the rho value that makes the type I error rate reaches the maximum value rho_opt and the type I error rate errorrate

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

optrho(k = 2/3, alpha = 0.025)

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

Compute the optimal sample size for the improved trimmed weighted Hochberg procedure with allowance for different data maturities

Description

Compute the optimal sample size for the improved trimmed weighted Hochberg procedure with allowance for different data maturities

Usage

optsamplesize_iHpm(
  alpha,
  k,
  betavec,
  deltavec,
  rho,
  maturity,
  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

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 improved trimmed weighted Hochberg 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.10, 0.10)
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_iHpm(alpha = alpha, k = k,
betavec = betavec, deltavec = deltavec,
rho = rho, maturity = maturity,
ninterval = ninterval)
result$nopt

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

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

Compute the optimal sample size for the weighted Hochberg procedure

Description

Compute the optimal sample size for the weighted Hochberg procedure

Usage

optsamplesize_wHp(
  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 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_wHp(alpha = 0.05, betavec = c(0.20, 0.10),
deltavec = deltavec , rho = -0.1)
result$nopt

Find the difference between the achieved power and the desired power for rejecting H1 using the weighted trimmed or truncated Hochberg procedure

Description

Find the difference between the achieved power and the desired power for rejecting H1 using the weighted trimmed or truncated Hochberg procedure

Usage

tHpTarget1(n, alpha1, alpha, beta1, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta1

one minus the desired power for rejecting H1

deltavec

a numeric vector of two values representing the effect sizes for the two hypotheses

rho

the correlation coefficient between two test statistics

Value

the difference between the achieved power and the desired power for rejecting H1 using the weighted trimmed or truncated Hochberg procedure

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H2 using the weighted trimmed or truncated Hochberg procedure

Description

Find the difference between the achieved power and the desired power for rejecting H2 using the weighted trimmed or truncated Hochberg procedure

Usage

tHpTarget2(n, alpha1, alpha, beta2, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta2

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

Value

the difference between the achieved power and the desired power for rejecting H2 using the weighted trimmed or truncated Hochberg procedure

Author(s)

Jiangtao Gou

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.


Calculate the type I error rate of the weighted Simes test

Description

Calculate the type I error rate of the weighted Simes test

Usage

typeIerror_Simes_mvtnorm(
  rho,
  adjFct = 0,
  alpha,
  alphavec = c(alpha/2, alpha/2)
)

Arguments

rho

the correlation coefficient between two test statistics

adjFct

a pre-specified constant in the improved weighted Hochberg procedure, called the adjustment factor or k value

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the type I error rate

Author(s)

Jiangtao Gou

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

typeIerror_trimSimes_mvtnorm(rho = 0, adjFct = 0, alpha = 0.05)

Calculate the type I error rate of the trimmed weighted Simes test

Description

Calculate the type I error rate of the trimmed weighted Simes test

Usage

typeIerror_trimSimes_mvtnorm(
  rho,
  adjFct,
  alpha,
  alphavec = c(alpha/2, alpha/2)
)

Arguments

rho

the correlation coefficient between two test statistics

adjFct

a pre-specified constant in the improved trimmed weighted Hochberg procedure, called the adjustment factor or k value

alpha

the significance level

alphavec

a numeric vector of two values representing the weighted significance levels assigned to the two hypotheses

Value

the type I error rate

Author(s)

Jiangtao Gou

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

typeIerror_trimSimes_mvtnorm(rho = 0, adjFct = 0, alpha = 0.05)

Find the difference between the achieved power and the desired power for rejecting H1 using the weighted Holm procedure

Description

Find the difference between the achieved power and the desired power for rejecting H1 using the weighted Holm procedure

Usage

wHolmTarget1(n, alpha1, alpha, beta1, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta1

one minus the desired power for rejecting H1

deltavec

a numeric vector of two values representing the effect sizes for the two hypotheses

rho

the correlation coefficient between two test statistics

Value

the difference between the achieved power and the desired power for rejecting H1

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H1 using the weighted Holm procedure with allowance for different data maturities

Description

Find the difference between the achieved power and the desired power for rejecting H1 using the weighted Holm procedure with allowance for different data maturities

Usage

wHolmTarget1m(n, alpha1, alpha, beta1, deltavec, rho, maturity)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta1

one minus the desired power for rejecting H1

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

Value

the difference between the achieved power and the desired power for rejecting H1

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H2 using the weighted Holm procedure

Description

Find the difference between the achieved power and the desired power for rejecting H2 using the weighted Holm procedure

Usage

wHolmTarget2(n, alpha1, alpha, beta2, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta2

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

Value

the difference between the achieved power and the desired power for rejecting H2

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H2 using the weighted Holm procedure with allowance for different data maturities

Description

Find the difference between the achieved power and the desired power for rejecting H2 using the weighted Holm procedure with allowance for different data maturities

Usage

wHolmTarget2m(n, alpha1, alpha, beta2, deltavec, rho, maturity)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta2

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

Value

the difference between the achieved power and the desired power for rejecting H2

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H1 using the weighted Hochberg procedure

Description

Find the difference between the achieved power and the desired power for rejecting H1 using the weighted Hochberg procedure

Usage

wHpTarget1(n, alpha1, alpha, beta1, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta1

one minus the desired power for rejecting H1

deltavec

a numeric vector of two values representing the effect sizes for the two hypotheses

rho

the correlation coefficient between two test statistics

Value

the difference between the achieved power and the desired power for rejecting H1 using the weighted Hochberg procedure

Author(s)

Jiangtao Gou

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.


Find the difference between the achieved power and the desired power for rejecting H2 using the weighted Hochberg procedure

Description

Find the difference between the achieved power and the desired power for rejecting H2 using the weighted Hochberg procedure

Usage

wHpTarget2(n, alpha1, alpha, beta2, deltavec, rho)

Arguments

n

the sample size

alpha1

the weighted significance levels assigned to H1

alpha

the significance level

beta2

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

Value

the difference between the achieved power and the desired power for rejecting H2 using the weighted Hochberg procedure

Author(s)

Jiangtao Gou

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.