What happened?
When using parametric tests with graph_test_closure(), it is possible that all intersection hypotheses are rejected but $rejected are all FALSE.
Session Information
No response
Reproducible Example
library(graphicalMCP)
hypotheses <- c(0.5, 0.5, 0, 0)
transitions <- rbind(
c(0, 0, 1, 0),
c(0, 0, 0, 1),
c(0, 1, 0, 0),
c(1, 0, 0, 0)
)
g <- graph_create(hypotheses, transitions)
corr_12 <- matrix(0.5, nrow = 2, ncol = 2)
diag(corr_12) <- 1
p_values <- c(0.01347867, 0.01347867, 0.0125, 0.0125)
set.seed(1234)
test_results_parametric <-
graph_test_closure(
g,
p = p_values,
alpha = 0.025,
test_groups = list(1:2, 3:4),
test_types = c("parametric", "bonferroni"),
test_corr = list(corr_12, NA),
test_values = TRUE
)
test_results_parametric$outputs$rejected
test_results_parametric$test_values