Out-of-sample time series forecasting

License: GPL v3 Lifecycle: stable codecov Build Status

Out-of-Sample time series forecasting is a common, important, and subtle task. The OOS package introduces a comprehensive and cohesive API for the out-of-sample forecasting workflow: data preparation, forecasting - including both traditional econometric time series models and modern machine learning techniques - forecast combination, model and error analysis, and forecast visualization.

See the OOS package website for examples and documentation.

Model estimation flexibility and accessibility

Users may edit any model training routine through accessing a list of function arguments. For machine learning techniques, this entails editing caret arguments including: tuning grid, control grid, method, and accuracy metric. For univariate time series forecasting, this entails passing arguments to forecast package model functions. For imputing missing variables, this entails passing arguments to imputeTS package functions.

A brief example using an Arima model to forecast univariate time series:

# 1. create the central list of univariate model training arguments, univariate.forecast.training  
forecast_univariate.control_panel = instantiate.forecast_univariate.control_panel()  

# 2. select an item to edit, for example the Arima order to create an ARMA(1,1)   
    # view default model arguments (there are none)  
    # add our own function arguments  
    forecast_univariate.control_panel$arguments[['Arima']]$order = c(1,0,1) 

A brief example using the Random Forest to combine forecasts:

# 1. create the central list of ML training arguments 
forecast_combinations.control_panel = instantiate.forecast_combinations.control_panel()  

# 2. select an item to edit, for example the random forest tuning grid   
    # view default tuning grid  
    # edit tuning grid   
    forecast_combinations.control_panel$tuning.grids[['RF']] = expand.grid(mtry = c(1:6))  


If you should have questions, concerns, or wish to collaborate, please contact Tyler J. Pike