efa {utsf} | R Documentation |
Estimate the forecast accuracy of a model on a time series
Description
It uses an object of class utsf
to asses the forecasting accuracy of its
associated model on its associated time series applying a rolling origin
evaluation.
Usage
efa(model, h, type = c("normal", "minimum"), size = NULL, prop = NULL)
Arguments
model |
An object of class |
h |
A positive integer. The forecasting horizon. |
type |
A string. Possible values are |
size |
An integer. It is the size of the test set (how many of the last
observations of the time series are used as test set). It can only be used
when the type parameter is |
prop |
A numeric value in the range (0, 1). It is the proportion of the
time series used as test set. It can only be used when the type parameter is
|
Value
A list with four components:
per_horizon |
A matrix with the estimated forecast accuracy per forecasting horizon using several forecasting accuracy measures. |
global |
The average estimated forecast accuracy for all the horizons. It is computed as the mean
of the different rows of the |
test_sets |
A matrix with the test sets used in the evaluation. Each row of the matrix is a test set. |
predictions |
The predictions for the test sets. |
Examples
m <- create_model(UKgas, lags = 1:4, method = "rt")
efa(m, h = 4, type = "normal", size = 8)