forecast_roll {bvhar} | R Documentation |
Out-of-sample Forecasting based on Rolling Window
Description
This function conducts rolling window forecasting.
Usage
forecast_roll(
object,
n_ahead,
y_test,
level = 0.05,
newxreg = NULL,
num_thread = 1,
...
)
## S3 method for class 'bvharcv'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
is.bvharcv(x)
## S3 method for class 'bvharcv'
knit_print(x, ...)
## S3 method for class 'olsmod'
forecast_roll(
object,
n_ahead,
y_test,
level = 0.05,
newxreg = NULL,
num_thread = 1,
...
)
## S3 method for class 'normaliw'
forecast_roll(
object,
n_ahead,
y_test,
level = 0.05,
newxreg = NULL,
num_thread = 1,
use_fit = TRUE,
...
)
## S3 method for class 'ldltmod'
forecast_roll(
object,
n_ahead,
y_test,
level = 0.05,
newxreg = NULL,
num_thread = 1,
stable = FALSE,
sparse = FALSE,
med = FALSE,
lpl = FALSE,
mcmc = TRUE,
use_fit = TRUE,
verbose = FALSE,
...
)
## S3 method for class 'svmod'
forecast_roll(
object,
n_ahead,
y_test,
level = 0.05,
newxreg = NULL,
num_thread = 1,
use_sv = TRUE,
stable = FALSE,
sparse = FALSE,
med = FALSE,
lpl = FALSE,
mcmc = TRUE,
use_fit = TRUE,
verbose = FALSE,
...
)
Arguments
object |
Model object |
n_ahead |
Step to forecast in rolling window scheme |
y_test |
Test data to be compared. Use |
level |
Specify alpha of confidence interval level 100(1 - alpha) percentage. By default, .05. |
newxreg |
New values for exogenous variables.
Should have the same row numbers as |
num_thread |
|
... |
not used |
x |
Any object |
digits |
digit option to print |
use_fit |
|
stable |
|
sparse |
|
med |
|
lpl |
|
mcmc |
|
verbose |
Print the progress bar in the console. By default, |
use_sv |
Use SV term |
Details
Rolling windows forecasting fixes window size.
It moves the window ahead and forecast h-ahead in y_test
set.
Value
predbvhar_roll
class
References
Hyndman, R. J., & Athanasopoulos, G. (2021). Forecasting: Principles and practice (3rd ed.). OTEXTS.