loss {multDM} | R Documentation |
Computes Loss Function.
Description
This function computes various loss functions for given realized values of time-series and a collection of forecasts.
Usage
loss(realized,evaluated,loss.type)
Arguments
realized |
|
evaluated |
|
loss.type |
method to compute the loss function, |
Value
matrix
with columns corresponding to time index and rows to different models
References
Hyndman, R.J., Koehler, A.B. 2006. Another look at measures of forecast accuracy. International Journal of Forecasting 22, 679–688.
Taylor, S. J., 2005. Asset Price Dynamics, Volatility, and Prediction, Princeton University Press.
Triacca, U., 2018. Comparing Predictive Accuracy of Two Forecasts, https://www.lem.sssup.it/phd/documents/Lesson19.pdf.
Examples
data(MDMforecasts)
ts <- MDMforecasts$ts
forecasts <- MDMforecasts$forecasts
l <- loss(realized=ts,evaluated=forecasts,loss.type="SE")