Learn R Programming

lmomco (version 1.7.3)

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 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.
  • harmeanThe harmonic mean with zero-value correction, $\check{\mu}$.
  • correctionThe zero-value correction, $(N_T - N_0)/N_T$.
  • sourceAn 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
Q <- c(0,0,5,6,7)
harmonic.mean(Q)

Run the code above in your browser using DataLab