Introduction

The OOS package creates a paradigm to provide a structured and automated approach to out-of-sample time series forecasting, a common, important, and subtle task. In many ways, this package is merely a wrapper for the excellent extant time series forecasting routines on CRAN - including both traditional econometric time series models and modern machine learning techniques. However, this package additionally provides a modern and comprehensive set of forecast combination tools and forecast comparison metrics.

Why use OOS?

It is a simple fact that in-sample time series forecasting overstates model accuracy. Moreover, standard data cleaning routines and cross-validation techniques do not respect and avoid look-ahead bias, infecting the information set of study.

As it stands (as of Feb. 2021), most would agree that the closest package or collection of packages to a comprehensive and cohesive time series forecasting workflow in R is the maturing TidyModels. While TidyModels provides a flexible framework for data cleaning, model estimation, and prediction, it has not been built with out-of-sample time series forecasting in mind. That is, one still needs to write for-loop, apply function, or map routine to re-estimate their desired forecasting workflow each time step, and then collect, clean, and deliver the mess of output that comes out of such a practice.

In an answer to R’s lack of out-of-sample time series forecasting frameworks, OOS provides a clean, comprehensive, and robust workflow for out-of-sample forecasting.

In addition to systematizing and democratizing out-of-sample time series forecasting with traditional econometric tools and modern machine learning methods, OOS also: 1. plays nicely with the tidyverse - facilitating integration with existing codebases
2. provides sensible off-the-shelf defaults for new forecasters, while giving advanced users full control over all model and training function parameters for maximum flexibility 3. gives users control over what pieces of information to return in easy to handle data.frames or lists

Getting Started

A user can work through the introductory vignette ‘OOS, an easy start’ by topic through a series of articles found under the OOS website’s workflow tab, flipping through sections as desired via arrows at the top and bottom of each page. Alternatively, a user may access a simplified code example on Github if sparsity better suite their style.

Data Preparation