a numeric vector containing weighting data to compute the weighted arithmetic mean (instead of the non-weighted)
output
argument to specify the output (output = "mean" returns the arithmetic mean, output = "geom" returns the geometric mean)
na.rm
logical argument that whether NA values should be extracted or not
Value
Single numeric value. If output = "mean" and weighting is specified, the function returns a weighted arithmetic mean. If output = "geom", the geometric mean is returned.
Details
This function uses the formula for the weighted arithmetic mean from Sheret (1984).
References
Bahrenberg, G./Giese, E./Mevenkamp, N./Nipper, J. (2010): “Statistische Methoden in der Geographie. Band 1: Univariate und bivariate Statistik”. Stuttgart: Borntraeger.
Sheret, M. (1984): “The Coefficient of Variation: Weighting Considerations”. In: Social Indicators Research, 15, 3, p. 289-295.