loss | R Documentation |
This function computes various loss functions for given realized values of time-series and a collection of forecasts.
loss(realized,evaluated,loss.type)
realized |
|
evaluated |
|
loss.type |
method to compute the loss function, |
matrix
with columns corresponding to time index and rows to different models
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.
data(MDMforecasts)
ts <- MDMforecasts$ts
forecasts <- MDMforecasts$forecasts
l <- loss(realized=ts,evaluated=forecasts,loss.type="SE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.