Description Usage Arguments Details Value See Also Examples
Compute the root-mean-squared forecast error (RMSE) or mean absolute forecast error (MAE) of the direct forecast from vintage. This dataset is defined as the sequence of values that represent the latest estimate of the data at a particular moment in time.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
.vin |
List of data vintages (data frame) for each variable.
The first vintage is related to the dependent variable and
the number of columns of each data frame must be the
same as the number of the out-of-sample forecasts ( |
lags |
A integer vector defining the lags of the
regressors. If |
.H |
An integer representing the maximum horizon step. |
.K |
An integer, the number of pseudo-out-of-sample forecasts. |
ic |
Information criterion, |
.var |
A string to determine how the model will be
specificated: |
.diff |
Logical |
dev |
A string, |
wav |
Logical. If |
xreg |
Data frame. Exogeunous variable not subjected
to be lagged. The number of rows must be the same as in |
... |
Further arguments passed to |
See wavdrcast-package
and
model
.
A double vector with forecasts error (RMSE or MAE) from 1 to .H step-ahead.
1 2 3 4 5 6 7 8 9 10 11 12 13 | set.seed(1)
v1 <- tibble::tibble(v1_t1 = c(sample(100, 98, replace = TRUE), NA, NA),
v1_t2 = c(v1_t1[1:98], 500, NA),
v1_t3 = c(v1_t2[1:99], 280))
set.seed(1)
v2 <- tibble::tibble(v2_t1 = 0.4 * v1[["v1_t1"]] + rnorm(100),
v2_t2 = c(v2_t1[1:98], 500 + rnorm(1), NA),
v2_t3 = c(v2_t2[1:99], 600 + rnorm(1)))
error_vin(list(v1, v2), lags = c(2, 2), .H = 3, .K = 3)
error_vin(list(v1), lags = c(2, 2), .H = 3, .K = 3, wav = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.