lmomco (version 2.3.1)

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)

Arguments

x

A vector of data values that will be reduced to non-missing values.

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”.

References

Texas Commission on Environmental Quality, 2003, Procedures to implement the Texas surface-water-quality standards: TCEQ RG--194, p. 47

See Also

pmoms

Examples

Run this code
# NOT RUN {
Q <- c(0,0,5,6,7)
harmonic.mean(Q)
# }

Run the code above in your browser using DataLab