roll_predict: Rolling window forecast

View source: R/roll_predict.R

roll_predictR Documentation

Rolling window forecast

Description

The function reads data and make forecasts based on linear predictive regression with diverse methods. It incorporates both short-horizon and long-horizon forecasting.

Usage

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
)

Arguments

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


zhan-gao/LasForecast documentation built on Sept. 18, 2024, 9:40 p.m.