averageParallelStats: Average parallel statistics

View source: R/averageParallelStats.R

averageParallelStatsR Documentation

Average parallel statistics

Description

Average parallel statistics with consideration of weights and protection from missing values.

Usage

averageParallelStats(values, weights = NULL)

Arguments

values

A list of numeric vectors of the same length, containing statistics from parallel tests.

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.

Details

If weights is supplied, a weighted average is computed for each parallel set of tests. If values contains missing values, they are ignored and will not contribute to the average.

Value

A numeric vector of (weighted) averages, of length equal to the lengths of the vectors in values.

Author(s)

Aaron Lun

See Also

averageParallelStats, for the parallel counterpart.

Examples

averageParallelStats(list(1:10, 2:11))
averageParallelStats(list(1:10, 2:11), weights=c(2:1))
averageParallelStats(list(1:10, rep(NA, 10)))


LTLA/metapod documentation built on Jan. 19, 2024, 11:49 p.m.