forecast_expand {bvhar} | R Documentation |
Out-of-sample Forecasting based on Expanding Window
Description
This function conducts expanding window forecasting.
Usage
forecast_expand(object, n_ahead, y_test, num_thread = 1, ...)
## S3 method for class 'olsmod'
forecast_expand(object, n_ahead, y_test, num_thread = 1, ...)
## S3 method for class 'normaliw'
forecast_expand(object, n_ahead, y_test, num_thread = 1, use_fit = TRUE, ...)
## S3 method for class 'ldltmod'
forecast_expand(
object,
n_ahead,
y_test,
num_thread = 1,
sparse = FALSE,
lpl = FALSE,
use_fit = TRUE,
...
)
## S3 method for class 'svmod'
forecast_expand(
object,
n_ahead,
y_test,
num_thread = 1,
use_sv = TRUE,
sparse = FALSE,
lpl = FALSE,
use_fit = TRUE,
...
)
Arguments
object |
Model object |
n_ahead |
Step to forecast in rolling window scheme |
y_test |
Test data to be compared. Use |
num_thread |
|
... |
Additional arguments. |
use_fit |
|
sparse |
|
lpl |
|
use_sv |
Use SV term |
Details
Expanding windows forecasting fixes the starting period.
It moves the window ahead and forecast h-ahead in y_test
set.
Value
predbvhar_expand
class
References
Hyndman, R. J., & Athanasopoulos, G. (2021). Forecasting: Principles and practice (3rd ed.). OTEXTS. https://otexts.com/fpp3/
[Package bvhar version 2.1.0 Index]