roll_predict | R Documentation |
The function reads data and make forecasts based on linear predictive regression with diverse methods. It incorporates both short-horizon and long-horizon forecasting.
roll_predict(
x,
y,
roll_window,
h = 1,
methods_use = c("RW", "RWwD", "OLS", "Lasso", "Lasso_Std", "ALasso", "TALasso", "bss",
"rss", "rlasso", "lad", "lad_lasso"),
train_method_las = "cv",
verb = TRUE,
ar_order = 0
)
x |
Full sample predictor |
y |
Full sample forecast target |
roll_window |
Length of the rolling window |
h |
forecast horizon |
train_method_las |
parameter tuning method for Lasso type methods. For comparison, all Lasso type methods shares the same train_method. |
verb |
boolean to control whether print information on screen |
ar_order |
0 or 1 to control whether include ar1 lag or not |
method_use |
method in use |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.