mae: Calculate mean absolute error between actual and forecast.
Description
mae takes actual and forecast numeric vectors and returns a
numeric vector where forecast is subtracted from the actual, the
absolute value is taken of those errors, and lastly, the mean is
taken of those absolute erros.
Usage
mae(actual, forecast, na.rm = TRUE, ...)
Arguments
actual
a numeric vector of actuals.
forecast
a numeric vector of forecasts.
na.rm
a logical value indicating whether NA values should be stripped before the computation proceeds.
...
additional arguments to be passed to mean()
Value
a numeric vector of length one representing the mean of absolute errors.