Skip to content

Bug: graph_test_closure() provides inconsistent results between rejections and closed tests #90

@xidongdxi

Description

@xidongdxi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions