Obtains the adjusted p-values for possibly truncated Holm, Hochberg, and Hommel procedures.

ftrunc(p, test = "hommel", gamma = 1)

Arguments

p

The raw p-values for elementary hypotheses.

test

The test to use, e.g., "holm", "hochberg", or "hommel" (default).

gamma

The value of the truncation parameter. Defaults to 1 for the regular Holm, Hochberg, or Hommel procedure.

Value

A list with the following components:

  • inthyp: The indicator matrix for the intersection hypotheses.

  • pinter: The local p-values for the intersection hypotheses.

  • padj: The adjusted p-values for the elementary hypotheses.

References

Alex Dmitrienko, Ajit C. Tamhane, and Brian L. Wiens. General multistage gatekeeping procedures. Biometrical Journal. 2008; 5:667-677.

Author

Kaifeng Lu, kaifenglu@gmail.com

Examples


pvalues <- matrix(c(0.01,0.005,0.015,0.022, 0.02,0.015,0.010,0.023),
                  nrow=2, ncol=4, byrow=TRUE)
ftrunc(pvalues, "hochberg")
#> $inthyp
#>       [,1] [,2] [,3] [,4]
#>  [1,]    1    1    1    1
#>  [2,]    1    1    1    0
#>  [3,]    1    1    0    1
#>  [4,]    1    1    0    0
#>  [5,]    1    0    1    1
#>  [6,]    1    0    1    0
#>  [7,]    1    0    0    1
#>  [8,]    1    0    0    0
#>  [9,]    0    1    1    1
#> [10,]    0    1    1    0
#> [11,]    0    1    0    1
#> [12,]    0    1    0    0
#> [13,]    0    0    1    1
#> [14,]    0    0    1    0
#> [15,]    0    0    0    1
#> 
#> $pinter
#>       [,1]  [,2]  [,3] [,4]  [,5]  [,6]  [,7] [,8]  [,9] [,10] [,11] [,12]
#> [1,] 0.020 0.015 0.015 0.01 0.022 0.015 0.020 0.01 0.015 0.010 0.010 0.005
#> [2,] 0.023 0.020 0.023 0.02 0.023 0.020 0.023 0.02 0.023 0.015 0.023 0.015
#>      [,13] [,14] [,15]
#> [1,] 0.022 0.015 0.022
#> [2,] 0.020 0.010 0.023
#> 
#> $padj
#>       [,1]  [,2]  [,3]  [,4]
#> [1,] 0.022 0.020 0.022 0.022
#> [2,] 0.023 0.023 0.023 0.023
#>