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

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.

1 |

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

An **R** `list`

is returned.

`harmean` |
The harmonic mean with zero-value correction, |

`correction` |
The zero-value correction, |

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

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.

W.H. Asquith

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

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

```
$harmean
[1] 3.53271
$correction
[1] 0.6
$source
[1] "harmonic.mean"
```

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.