combineParallelPValues {metapod} | R Documentation

## Combine parallel p-values

### Description

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.

### Usage

    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
    )

### Arguments

`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 `...`. Each weight is applied to all entries of itscorresponding vector, i.e., all p-values in that vector receive the same weight. Alternatively, a list of numeric vectors of weights with the same structure as `p.values`. Each p-value is then assigned the weight in the corresponding entry of `weights`. Alternatively `NULL`, in which case all p-values are assigned equal weight.
`log.p` | Logical scalar indicating whether the p-values in `p.values` are log-transformed.
`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.

### Details

`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"`.

### Value

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.

### Author(s)

Aaron Lun

### Examples

    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)

[Package metapod version 1.2.0 Index]