Compute the Harmonic Mean p-Value {harmonicmeanp} | R Documentation |
Compute the Harmonic Mean p-Value
Description
The harmonic mean p-value (HMP) is defined as the inverse of the (possibly weighted) arithmetic mean of the inverse p-values. When the HMP is small (e.g. less than 0.05), it is approximately well-calibrated, meaning that it can be directly interpreted. However, the function p.hmp calculates an asymptotically exact p-value from the HMP and is preferred.
Usage
hmp.stat(p, w = NULL)
Arguments
p |
A numeric vector of one or more p-values. Missing values (NAs) will cause a missing value to be returned. |
w |
An optional numeric vector of weights that can be interpreted as prior model probabilities for each of the alternative hypotheses represented by the individual p-values. The sum of the weights cannot exceed one but may be less than one, which is interpreted as meaning that some p-values have been excluded. |
Value
The harmonic mean p-value is returned.
Author(s)
Daniel J. Wilson
References
Daniel J. Wilson (2019) The harmonic mean p-value for combining dependent tests. Proceedings of the National Academy of Sciences USA 116: 1195-1200.
See Also
p.hmp
Examples
# For detailed examples type vignette("harmonicmeanp")
p = rbeta(1000,1/1.5,1)
hmp.stat(p)
p.hmp(p,L=1000)