This function takes in the p-values tibble that mvmapit returned. It then computes the combined p-values grouped by variant id.
harmonic_combined(pvalues, group_col = "id", p_col = "p")
A Tibble with the combined p-values.
set.seed(837)
p <- 200
n <- 100
d <- 2
X <- matrix(
runif(p * n),
ncol = p
)
Y <- matrix(
runif(d * n),
ncol = d
)
mapit <- mvmapit(
t(X),
t(Y),
test = "normal", cores = 1, logLevel = "INFO"
)
#> 2024-10-21 17:56:45.565575 INFO:mvmapit:Running normal C++ routine.
harmonic <- harmonic_combined(mapit$pvalues)