Obtains the adjusted p-values for graphical approaches using weighted Dunnett tests.
fadjpdun(p, wgtmat = NULL, family = NULL, corr = NULL, nthreads = 0)The raw p-values for elementary hypotheses.
A list containing the weight matrix and the indicator matrix
for intersection hypotheses. If NULL, equal weights are assigned
within each intersection hypothesis.
The matrix of family indicators for elementary hypotheses. Defaults to one family containing all elementary hypotheses.
The correlation matrix that should be used for the parametric test. Can contain NAs for unknown correlations between families. By default, within-family correlations are 0.5 and between-family correlations are missing.
The number of threads to use in simulations (0 means the default RcppParallel behavior).
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.
Frank Bretz, Martin Posch, Ekkehard Glimm, Florian Klinglmueller, Willi Maurer, and Kornelius Rohmeyer. Graphical approach for multiple comparison procedures using weighted Bonferroni, Simes, or parameter tests. Biometrical Journal. 2011; 53:894-913.
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)
w <- c(0.5,0.5,0,0)
G <- matrix(c(0,0,1,0,0,0,0,1,0,1,0,0,1,0,0,0),
nrow=4, ncol=4, byrow=TRUE)
wgtmat <- fwgtmat(w,G)
family <- matrix(c(1,1,0,0,0,0,1,1), nrow=2, ncol=4, byrow=TRUE)
corr <- matrix(c(1,0.5,NA,NA, 0.5,1,NA,NA,
NA,NA,1,0.5, NA,NA,0.5,1),
nrow = 4, byrow = TRUE)
fadjpdun(pvalues, wgtmat, family, corr, nthreads = 1)
#> $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]
#> [1,] 0.009503704 0.009503704 0.009503704 0.009503704 0.02 0.01 0.02 0.01 0.01
#> [2,] 0.027729372 0.027729372 0.027729372 0.027729372 0.04 0.02 0.04 0.02 0.02
#> [,10] [,11] [,12] [,13] [,14] [,15]
#> [1,] 0.01 0.005 0.005 0.02772937 0.015 0.022
#> [2,] 0.02 0.015 0.015 0.01870608 0.010 0.023
#>
#> $padj
#> [,1] [,2] [,3] [,4]
#> [1,] 0.02 0.01000000 0.02772937 0.02772937
#> [2,] 0.04 0.02772937 0.04000000 0.04000000
#>