harmonic.mean: The Harmonic Mean with Zero-Value Correction
Description
Compute the harmonic mean of a vector with a zero-value correction.
$$\check{\mu} =
\biggl(\frac{\sum^{N_T - N_0}_{i=1} 1/x_i}
{N_T - N_0}\biggr)^{-1} \times \frac{N_T - N_0}
{N_T} \mbox{,}$$
where \(\check{\mu}\) is harmonic mean, \(x_i\) is a nonzero value of the data vector, \(N_T\) is the (total) sample size, \(N_0\) is the number of zero values.
Usage
harmonic.mean(x)
Value
An R
list is returned.
harmean
The harmonic mean with zero-value correction, \(\check{\mu}\).
correction
The zero-value correction, \((N_T - N_0)/N_T\).
source
An attribute identifying the computational source of the harmonic mean: “harmonic.mean”.
Arguments
x
A vector of data values that will be reduced to non-missing values.
Author
W.H. Asquith
References
Texas Commission on Environmental Quality, 2003, Procedures to implement the Texas surface-water-quality standards: TCEQ RG--194, p. 47