View source: R/combineParallelPValues.R
combineParallelPValues | R Documentation |
Combine p-values from parallel hypothesis tests using a variety of meta-analysis methods. Each group of p-values is defined from the corresponding entries across all vectors. The function processes all vectors “in parallel” - hence the name.
combineParallelPValues(
p.values,
method = c("simes", "holm-min", "berger", "fisher", "pearson", "wilkinson",
"stouffer"),
weights = NULL,
log.p = FALSE,
min.n = 1,
min.prop = 0.5
)
p.values |
A list of numeric vectors of the same length, containing the p-values to be combined. |
method |
String specifying the method to use to combine p-values. |
weights |
A numeric vector of positive weights, with one value per vector in Alternatively, a list of numeric vectors of weights with the same structure as Alternatively |
log.p |
Logical scalar indicating whether the p-values in |
min.n |
Integer scalar specifying the minimum number of individual nulls to reject when testing the joint null. |
min.prop |
Numeric scalar in [0, 1], specifying the minimum proportion of individual nulls to reject when testing the joint null. |
min.prop
and min.n
only have an effect for method="wilkinson"
and "holm-min"
.
weights
only has an effect for method="simes"
, "holm-min"
and "stouffer"
.
A list containing:
p.value
, a numeric vector of length equal to the length of each vector in p.values
.
This contains the Simes p-value for each group, log-transformed if log.p=TRUE
.
representative
, an integer scalar specifying the representative test in each group.
Specifically, this refers to the index of the vector of p.values
containing the representative test.
influential
, a list of logical vectors mirroring the structure of p.values
.
Entries are TRUE
for any p-value that is deemed “influential” to the final combined p-value.
Aaron Lun
p1 <- runif(10000)
p2 <- runif(10000)
p3 <- runif(10000)
fish <- combineParallelPValues(list(p1, p2, p3), method="fisher")
hist(fish$p.value)
z <- combineParallelPValues(list(p1, p2, p3), method="stouffer", weights=1:3)
hist(z$p.value)
simes <- combineParallelPValues(list(p1, p2, p3), method="simes")
hist(simes$p.value)
berger <- combineParallelPValues(list(p1, p2, p3), method="berger")
hist(berger$p.value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.