Forecast Framework Demo

by Katie

Posted on 29 January, 2019

Want to learn how to do some forecasting with R? Here’s your chance to try out a new time-series forecasting package for R whose aim is to standardize and simplify the process of making and evaluating forecasts!

The Reich Lab uses an R package called ForecastFramework to implement forecasting models. There are many benefits to using ForecastFramework in a forecasting pipeline, including: standardized and simplified rapid model development and performance evaluation. ForecastFramework was created by Joshua Kaminsky of the Infectious Disease Dynamics Group at Johns Hopkins University. The package is open source and can be found on Github.

After watching students in the lab working on learning how to use ForecastFramework, I decided to create a step-by-step demonstration of the primary use cases of ForecastFramework. The complete demo lives at

As the resident CS grad-student programmer in the lab, I wanted to write these demonstrations to make ForecastFramework accessible. However, the demo only scrapes the surface of the many way that we (and others, we hope) will use ForecastFramework. We have incorporated ForecastFramework into our workflow for generating real-time dengue forecasts for the Ministry of Public Health in Thailand, and students have found it useful in generating small model comparison projects.

The online demo is separated into five sections. Each section will build off knowledge from the previous and will gradually increase in difficulty. However, the demos work as standalone scripts as well. The demos are categorized as the following:

  1. The Data - This section will examine the raw data used in the ForecastFramework models ahead.
  2. Defining Inputs - This section will define what an IncidenceMatrix is, show how to format your data to be used as an IncidenceMatrix, and exemplify functions of the IncidenceMatrix class.
  3. Fitting and Forecasting - This section will focus on fitting data to a SARIMA model with ForecastFramework, using the sarimaTD package developed by Evan Ray.
  4. Evaluating Complex Models - This section will demonstrate evaluation metrics and techniques by comparing two complex models in ForecastFramework.
  5. Creating your own Model - This section will use object-oriented R programming demonstrate how to create your own model with ForecastFramework.

Try using ForecastFramework today! I hope you find the tutorials interesting and instructive. If you have any questions or find any bugs, please let me know! I can be found at khouse [at] or through my personal website.