Learn R Programming

⚠️There's a newer version (1.0.0) of this package.Take me there.

FoReco

The FoReco (Forecast Reconciliation) package is designed for forecast reconciliation, a post-forecasting process aimed to improve the accuracy of the base forecasts for a system of linearly constrained (e.g. hierarchical/grouped) time series.

It offers classical (bottom-up and top-down), and modern (optimal and heuristic combination) forecast reconciliation procedures for cross-sectional, temporal, and cross-temporal linearly constrained time series.

The main functions are:

  • htsrec(): cross-sectional (contemporaneous) forecast reconciliation.
  • thfrec(): forecast reconciliation for a single time series through temporal hierarchies.
  • lccrec(): level conditional forecast reconciliation for genuine hierarchical/grouped time series.
  • tdrec(): top-down (cross-sectional, temporal, cross-temporal) forecast reconciliation for genuine hierarchical/grouped time series.
  • ctbu(): bottom-up cross-temporal forecast reconciliation.
  • tcsrec(): heuristic first-temporal-then-cross-sectional cross-temporal forecast reconciliation.
  • cstrec(): heuristic first-cross-sectional-then-temporal cross-temporal forecast reconciliation.
  • iterec(): heuristic iterative cross-temporal forecast reconciliation.
  • octrec(): optimal combination cross-temporal forecast reconciliation.

Installation

You can install the stable version on R CRAN

install.packages("FoReco")

You can also install the development version from Github

# install.packages("devtools")
devtools::install_github("daniGiro/FoReco")

Links

Getting help

If you encounter a clear bug, please file a minimal reproducible example on GitHub.

Copy Link

Version

Install

install.packages('FoReco')

Monthly Downloads

436

Version

0.2.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Daniele Girolimetto

Last Published

May 16th, 2023

Functions in FoReco (0.2.6)

lccrec

Level conditional coherent forecast reconciliation for genuine hierarchical/grouped time series
boot_te

Temporal Joint Bootstrap
iterec

Iterative heuristic cross-temporal forecast reconciliation
ctf_tools

Cross-temporal reconciliation tools
commat

Commutation matrix
cstrec

Heuristic first-cross-sectional-then-temporal cross-temporal forecast reconciliation
ctbu

Bottom-up cross-temporal forecast reconciliation
hts_tools

Cross-sectional reconciliation tools
htsrec

Cross-sectional (contemporaneous) forecast reconciliation
lcmat

Linear Combination Matrix for a general linearly constrained multiple time series
residuals_matrix

Arrange temporal and cross-temporal residuals in a matrix form
tdrec

Top-down forecast reconciliation for genuine hierarchical/grouped time series
tcsrec

Heuristic first-temporal-then-cross-sectional cross-temporal forecast reconciliation
octrec

Optimal combination cross-temporal forecast reconciliation
shrink_estim

Shrinkage of the covariance matrix
thf_tools

Temporal reconciliation tools
score_index

Measuring accuracy in a rolling forecast experiment
oct_bounds

Optimal cross-temporal bounds
thfrec

Forecast reconciliation through temporal hierarchies (temporal reconciliation)
FoReco_data

Forecast reconciliation for a simulated linearly constrained, genuine hierarchical multiple time series
boot_ct

Cross-temporal Joint Bootstrap
boot_cs

Cross-sectional Joint Bootstrap
agg_ts

Non-overlapping temporal aggregation of a time series
arrange_hres

Re-arrange the multi-step residuals
FoReco2ts

Reconciled forecasts matrix/vector to time-series class
FoReco-package

FoReco: forecast reconciliation
FoReco-hts

Simple examples to compare FoReco and hts packages
FoReco-thief

Simple examples to compare FoReco and thief packages
Cmatrix

Cross-sectional (contemporaneous) aggregation matrix