In confirmatory clinical trials, regulatory guidelines mandate the strong control of the family-wise error rate at a prespecified level α. Many multiple comparison procedures (MCPs) have been proposed for this purpose. The graphical approaches are a general framework that include many common MCPs as special cases. In this vignette, we illustrate how to use graphicalMCP to perform some common MCPs.
To test m hypotheses using a graphical MCP, each hypothesis Hi receives a weight 0 ≤ wi ≤ 1 (called hypothesis weight), where $\sum_{i=1}^{m}w_i\leq 1$. From Hi to Hj, there could be a directed and weighted edge 0 ≤ gij ≤ 1, which means that when Hi is rejected, its hypothesis weight will be propagated (or transferred) to Hj and gij determines how much of the propagation. We also require $\sum_{j=1}^{m}g_{ij}\leq 1$ and gii = 0.
A weighted Bonferroni test splits α among hypotheses by testing every hypothesis at a significance level of wiα. Thus it rejects a hypothesis if its p-value is less than or equal to its significance level. When wi = wj for all i, j, this means an equal split and the test is the Bonferroni test. There is no propagation between any pair of hypothesis.
set.seed(1234)
alpha <- 0.025
m <- 3
bonferroni_graph <- bonferroni(rep(1 / m, m))
# transitions <- matrix(0, m, m)
# bonferroni_graph <- graph_create(rep(1 / m, m), transitions)
plot(
bonferroni_graph,
layout = igraph::layout_in_circle(
as_igraph(bonferroni_graph),
order = c(2, 1, 3)
),
vertex.size = 70
)
Holm (or Bonferroni-Holm) procedures improve over Bonferroni tests by allowing propagation (Holm 1979). In other words, transition weights between hypotheses may not be zero. So it is uniformly more powerful than Bonferroni tests.
set.seed(1234)
alpha <- 0.025
m <- 3
holm_graph <- bonferroni_holm(rep(1 / m, m))
# transitions <- matrix(1 / (m - 1), m, m)
# diag(transitions) <- 0
# holm_graph <- graph_create(rep(1 / m, m), transitions)
plot(holm_graph,
layout = igraph::layout_in_circle(
as_igraph(holm_graph),
order = c(2, 1, 3)
),
vertex.size = 70
)
Fixed sequence (or hierarchical) procedures pre-specify an order of testing [Maurer, Hothorn, and Lehmacher (1995);westfall-2001-optimally]. For example, the procedure will test H1 first. If it is rejected, it will test H2; otherwise the testing stops. If H2 is rejected, it will test H3; otherwise the testing stops. For each hypothesis, it will be tested at the full α level, when it can be tested.
Fallback procedures have one-way propagation (like fixed sequence procedures) but allow hypotheses to be tested at different significance levels (Wiens 2003).
set.seed(1234)
alpha <- 0.025
m <- 3
fallback_graph <- fallback(rep(1 / 3, 3))
# transitions <- rbind(
# c(0, 1, 0),
# c(0, 0, 1),
# c(0, 0, 0)
# )
# fallback_graph <- graph_create(rep(1 / 3, 3), transitions)
plot(fallback_graph, nrow = 1, asp = 0.05, vertex.size = 40)
p_values <- runif(m, 0, alpha)
test_results <-
graph_test_shortcut(
fallback_graph,
p = p_values,
alpha = alpha
)
test_results$outputs$rejected
#> H1 H2 H3
#> TRUE TRUE TRUE
Further they can be improved to allow propagation from later
hypotheses to earlier hypotheses, because it is possible that a later
hypothesis is rejected before an earlier hypothesis can be rejected.
There are two versions of improvement: fallback_improved_1
due to (Wiens and Dmitrienko 2005) and
fallback_improved_2
due to (Bretz et
al. 2009) respectively.
set.seed(1234)
alpha <- 0.025
m <- 3
fallback_improved_1_graph <- fallback_improved_1(rep(1 / 3, 3))
# hypotheses <- rep(1 / 3, 3)
# transitions <- rbind(
# c(0, 1, 0),
# c(0, 0, 1),
# c(hypotheses[seq_len(m - 1)] / sum(hypotheses[seq_len(m - 1)]), 0)
# )
# fallback_improved_1_graph <- graph_create(rep(1 / 3, 3), transitions)
plot(
fallback_improved_1_graph,
nrow = 1,
asp = 0.05,
vertex.size = 40,
edge_curves = c("pairs" = 7, "H3|H1" = -10)
)
epsilon <- 0.0001
fallback_improved_2_graph <- fallback_improved_2(rep(1 / 3, 3), epsilon)
# hypotheses <- rep(1 / 3, 3)
# transitions <- rbind(
# c(0, 1, 0),
# c(1 - epsilon, 0, epsilon),
# c(1, 0, 0)
# )
# fallback_improved_2_graph <- graph_create(rep(1 / 3, 3), transitions)
plot(
fallback_improved_2_graph,
nrow = 1,
asp = 0.05,
eps = 0.0001,
edge_curves = c("pairs" = 7, "H3|H1" = -10),
vertex.size = 40
)
Serial gatekeeping procedures involve ordered multiple families of hypotheses, where all hypotheses of a family of hypotheses must be rejected before proceeding in the test sequence. The example below considers a primary family consisting of two hypotheses H1 and H2 and a secondary family consisting of a single hypothesis H3. In the primary family, the Holm procedure is applied. If both H1 and H2 are rejected, H3 can be tested at level α; otherwise H3 cannot be rejected. To allow the conditional propagation to H3, an ε edge is used from H2 to H3. It has a very small transition weight so that H2 propagates most of its hypothesis weight to H1 (if not already rejected) and retains a small (non-zero) weight for H3 so that if H1 has been rejected, all hypothesis weight of H2 will be propagated to H3. Here ε is assigned to be 0.0001 and in practice, the value could be adjusted but it should be much smaller than the smallest p-value observed.
set.seed(1234)
alpha <- 0.025
m <- 3
epsilon <- 0.0001
transitions <- rbind(
c(0, 1, 0),
c(1 - epsilon, 0, epsilon),
c(0, 0, 0)
)
serial_gatekeeping_graph <- graph_create(c(0.5, 0.5, 0), transitions)
plot(
serial_gatekeeping_graph,
nrow = 1,
asp = 0.05,
eps = 0.0001,
edge_curves = c("pairs" = 7, "H3|H1" = -10),
vertex.size = 40
)
Parallel gatekeeping procedures also involve multiple ordered families of hypotheses, where any null hypotheses of a family of hypotheses must be rejected before proceeding in the test sequence (Dmitrienko, Offen, and Westfall 2003). The example below considers a primary family consisting of two hypotheses H1 and H2 and a secondary family consisting of two hypotheses H3 and H4. In the primary family, the Bonferroni test is applied. If any of H1 and H2 is rejected, H3 and H4 can be tested at level α/2 using the Holm procedure; if both H1 and H2 are rejected, H3 and H4 can be tested at level α using the Holm procedure; otherwise H3 and H4 cannot be rejected.
set.seed(1234)
alpha <- 0.025
m <- 4
transitions <- rbind(
c(0, 0, 0.5, 0.5),
c(0, 0, 0.5, 0.5),
c(0, 0, 0, 1),
c(0, 0, 1, 0)
)
parallel_gatekeeping_graph <- graph_create(c(0.5, 0.5, 0, 0), transitions)
plot(parallel_gatekeeping_graph, vertex.size = 70)
p_values <- runif(m, 0, alpha)
test_results <-
graph_test_shortcut(
parallel_gatekeeping_graph,
p = p_values,
alpha = alpha
)
test_results$outputs$rejected
#> H1 H2 H3 H4
#> TRUE FALSE FALSE FALSE
The above parallel gatekeeping procedure can be improved by adding ε edges from secondary hypotheses to primary hypotheses, because it is possible that both secondary hypotheses are rejected but there is still a remaining primary hypothesis not rejected (Bretz et al. 2009).
set.seed(1234)
alpha <- 0.025
m <- 4
epsilon <- 0.0001
transitions <- rbind(
c(0, 0, 0.5, 0.5),
c(0, 0, 0.5, 0.5),
c(epsilon, 0, 0, 1 - epsilon),
c(0, epsilon, 1 - epsilon, 0)
)
parallel_gatekeeping_improved_graph <-
graph_create(c(0.5, 0.5, 0, 0), transitions)
plot(parallel_gatekeeping_improved_graph, eps = 0.0001, vertex.size = 70)
Successive procedures incorporate successive relationships between hypotheses. For example, the secondary hypothesis is not tested until the primary hypothesis has been rejected. This is similar to using the fixed sequence procedure as a component of a graph. The example below considers two primary hypotheses H1 and H2 and two secondary hypotheses H3 and H4. Primary hypotheses H1 and H2 receive the equal hypothesis weight of 0.5; secondary hypotheses H3 and H4 receive the hypothesis weight of 0. A secondary hypothesis H3(H4) can be tested only if the corresponding primary hypothesis H1(H2) has been rejected. This represents the successive relationships between H1 and H3, and H2 and H4, respectively (Maurer, Glimm, and Bretz 2011). If both H1 and H3 are rejected, their hypothesis weights are propagated to H2 and H4, and vice versa.
set.seed(1234)
alpha <- 0.025
m <- 4
simple_successive_graph <- simple_successive_1()
# transitions <- rbind(
# c(0, 0, 1, 0),
# c(0, 0, 0, 1),
# c(0, 1, 0, 0),
# c(1, 0, 0, 0)
# )
# simple_successive_graph <- graph_create(c(0.5, 0.5, 0, 0), transitions)
plot(simple_successive_graph, layout = "grid", nrow = 2, vertex.size = 70)
p_values <- runif(m, 0, alpha)
test_results <-
graph_test_shortcut(
simple_successive_graph,
p = p_values,
alpha = alpha
)
test_results$outputs$rejected
#> H1 H2 H3 H4
#> TRUE FALSE FALSE FALSE
The above graph could be generalized to allow propagation between primary hypotheses (Maurer, Glimm, and Bretz 2011). A general successive graph is illustrate below with a variable to determine the propagation between H1 and H2.
set.seed(1234)
alpha <- 0.025
m <- 4
successive_var <- simple_successive_var <- function(gamma) {
graph_create(
c(0.5, 0.5, 0, 0),
rbind(
c(0, gamma, 1 - gamma, 0),
c(gamma, 0, 0, 1 - gamma),
c(0, 1, 0, 0),
c(1, 0, 0, 0)
)
)
}
successive_var_graph <- successive_var(0.5)
plot(successive_var_graph, layout = "grid", nrow = 2, vertex.size = 70)
Hommel procedure (Hommel 1988) is a
closed test procedure which uses Simes tests for every intersection
hypothesis. According to Xi and Bretz
(2019), the graph for Hommel procedures is the same as the graph
for Holm procedures. Thus to perform Hommel procedure, we just need to
specify test_type
to be simes
.
Step-down Dunnett procedures are a closed test procedure and an
improvement from Holm procedures by incorporating the correlation
structure between test statistics (Dunnett and
Tamhane 1991). Thus they are the same graph as Holm procedures.
Assume an equi-correlated case, where the correlation between any pair
of test statistics is the same, e.g., 0.5. Then we can perform the
step-down Dunnett procedure by specifying test_type
to be
parametric
and providing the correlation matrix.