| adjust_weights_parametric | R Documentation |
An intersection hypothesis can be rejected if its p-values are
less than or equal to their adjusted significance levels, which are their
adjusted hypothesis weights times \alpha. For Bonferroni tests, their
adjusted hypothesis weights are their hypothesis weights of the intersection
hypothesis. Additional adjustment is needed for parametric, Simes, and
Hochberg tests:
Parametric tests for adjust_weights_parametric(),
Note that one-sided tests are required for parametric tests.
Simes tests for adjust_weights_simes(),
Hochberg tests for adjust_weights_hochberg().
adjust_weights_parametric(
matrix_weights,
matrix_intersections,
test_corr,
alpha,
test_groups,
...
)
adjust_weights_simes(matrix_weights, p, test_groups)
adjust_weights_hochberg(matrix_weights, matrix_intersections, p, test_groups)
matrix_weights |
(Optional) A matrix of hypothesis weights of all
intersection hypotheses. This can be obtained as the second half of columns
from the output of |
matrix_intersections |
(Optional) A matrix of hypothesis indicators of
all intersection hypotheses. This can be obtained as the first half of
columns from the output of |
test_corr |
(Optional) A numeric matrix of correlations between test
statistics, which is needed to perform parametric tests using
|
alpha |
(Optional) A numeric value of the overall significance level, which should be between 0 & 1. The default is 0.025 for one-sided hypothesis testing problems; another common choice is 0.05 for two-sided hypothesis testing problems. Note when parametric tests are used, only one-sided tests are supported. |
test_groups |
(Optional) A list of numeric vectors specifying hypotheses to test together. Grouping is needed to correctly perform Simes and parametric tests. |
... |
Additional arguments to perform parametric tests using the
|
p |
(Optional) A numeric vector of p-values (unadjusted, raw), whose
values should be between 0 & 1. The length should match the number of
columns of |
adjust_weights_parametric() returns a matrix with the same
dimensions as matrix_weights, whose hypothesis weights have been adjusted
according to parametric tests.
adjust_weights_simes() returns a matrix with the same
dimensions as matrix_weights, whose hypothesis weights have been adjusted
according to Simes tests.
adjust_weights_hochberg() returns a matrix with the same
dimensions as matrix_weights, whose hypothesis weights have been adjusted
according to Hochberg tests.
Lu, K. (2016). Graphical approaches using a Bonferroni mixture of weighted Simes tests. Statistics in Medicine, 35(22), 4041-4055.
Xi, D., Glimm, E., Maurer, W., and Bretz, F. (2017). A unified framework for weighted parametric multiple test procedures. Biometrical Journal, 59(5), 918-931.
Xi, D., and Bretz, F. (2019). Symmetric graphs for equally weighted tests, with application to the Hochberg procedure. Statistics in Medicine, 38(27), 5268-5282.
adjust_p_parametric() for adjusted p-values using parametric
tests, adjust_p_simes() for adjusted p-values using Simes tests,
adjust_p_hochberg() for adjusted p-values using Hochberg tests.
alpha <- 0.025
num_hyps <- 4
g <- bonferroni_holm(num_hyps)
weighting_strategy <- graph_generate_weights(g)
matrix_intersections <- weighting_strategy[, seq_len(num_hyps)]
matrix_weights <- weighting_strategy[, -seq_len(num_hyps)]
set.seed(1234)
adjust_weights_parametric(
matrix_weights = matrix_weights,
matrix_intersections = matrix_intersections,
test_corr = list(diag(2), diag(2)),
alpha = alpha,
test_groups = list(1:2, 3:4)
)
alpha <- 0.025
p <- c(0.018, 0.01, 0.105, 0.006)
num_hyps <- length(p)
g <- bonferroni_holm(num_hyps)
weighting_strategy <- graph_generate_weights(g)
matrix_intersections <- weighting_strategy[, seq_len(num_hyps)]
matrix_weights <- weighting_strategy[, -seq_len(num_hyps)]
adjust_weights_simes(
matrix_weights = matrix_weights,
p = p,
test_groups = list(1:2, 3:4)
)
alpha <- 0.025
p <- c(0.018, 0.01, 0.105, 0.006)
num_hyps <- length(p)
g <- bonferroni_holm(num_hyps)
weighting_strategy <- graph_generate_weights(g)
matrix_intersections <- weighting_strategy[, seq_len(num_hyps)]
matrix_weights <- weighting_strategy[, -seq_len(num_hyps)]
adjust_weights_hochberg(
matrix_weights = matrix_weights,
matrix_intersections = matrix_intersections,
p = p,
test_groups = list(1:2, 3:4)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.