Learn R Programming

aggutils (version 1.0.2)

geoMeanCalc: Geometric Mean

Description

Calculate the geometric mean of a vector of forecasts. We handle 0s by replacing them with the qth quantile of the non-zero forecasts.

Usage

geoMeanCalc(x, q = 0.05)

Value

(numeric) The geometric mean of the vector

Arguments

x

Vector of forecasts in 0 to 100 range (%)

q

The quantile to use for replacing 0s (between 0 and 1)