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}$.