Skip to contents

CRAN status Lifecycle: experimental devel version License: GPL-3 R-CMD-check

S’i’ fosse foco, arderei ’l mondo (Sonetti, 86) Cecco Angiolieri, Italian poet.

FoCo² (Coherent Forecast Combination) is a forecasting package designed to handle multiple time series forecasts from different experts, subject to linear constraints. It offers both optimal and heuristic methods for combining expert forecasts and reconciling them through a multi-task approach. This process either simultaneously (in the optimal case) or sequentially (in the heuristic cases) integrates forecasts from multiple experts while incorporating a priori constraints to produce coherent forecasts.

The package is designed to manage different levels of input complexity: for example, some experts might produce forecasts for different subsets of the variables. Whether the input consists of forecasts for all variables from each expert (balanced case) or partial (unbalanced case) forecasts for a subset of variables, FoCo² efficiently organizes the data and applies combination and reconciliation methods. It also includes advanced tools for handling forecast errors. The package provides functions to estimate the forecast error covariance matrix, supporting simple, (block) diagonal (assuming uncorrelation) and full covariance matrices.

Installation

You can install the stable version on R CRAN

You can also install the development version from Github

# install.packages("devtools")
devtools::install_github("danigiro/FoCo2")

Issues and Contributions

If you encounter any bugs or have suggestions for improvements, please feel free to report them on GitHub Issues page. Contributions are also welcome!