harmonic.mean: The Harmonic Mean with Zero-Value Correction

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

Compute the harmonic mean of a vector with a zero-value correction.

\check{μ} = \biggl(\frac{∑^{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{μ} 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

1

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{μ}.

correction

The zero-value correction, (N_T - N_0)/N_T.

source

An attribute identifying the computational source of the harmonic mean: “harmonic.mean”.

Note

The harmonic mean can not be computed when zero values are present. This situation is common in surface-water hydrology. As stated in the reference below, in order to calculate water-quality-based effluent limits (WQBELs) for human health protection, a harmonic mean flow is determined for all perennial streams and for streams that are intermittent with perennial pools. Sometimes these streams have days on which measured flow is zero. Because a zero flow cannot be used in the calculation of harmonic mean flow, the second term in the harmonic mean equation is an adjustment factor used to lower the harmonic mean to compensate for days on which the flow was zero. The zero-value correction is the same correction used by the EPA computer program DFLOW.

Author(s)

W.H. Asquith

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

1
2
Q <- c(0,0,5,6,7)
harmonic.mean(Q)

Example output

$harmean
[1] 3.53271

$correction
[1] 0.6

$source
[1] "harmonic.mean"

lmomco documentation built on Sept. 21, 2018, 6:40 p.m.