MyNixOS website logo
Description

Forecasting Hierarchical Time Series Using Information Combination.

Implements the Information Combination (IComb) approach proposed by Nguyen, Vahid and Wickramasuriya (2025)<https://www.monash.edu/business/ebs/research/publications/ebs/2025/wp11-2025.pdf> for hierarchical forecast reconciliation. The method combines information from base forecasts constructed using different information sets while ensuring coherence. It is implemented using a penalized regression-based framework.

icomb

License lifecycle R-CMD-check CRANstatus

The R package icomb provides tools for implementing the information combination approach to forecasting hierarchical time series proposed by Nguyen, Vahid and Wickramasuriya (2025).

It offers tools to construct and combine forecasts based on different information sets, enabling improved forecast accuracy within hierarchical and grouped time series structures.

Installation

You can install the stable version on CRAN:

install.packages("icomb")

You can install the development version from GitHub

# install.packages("pak")
pak::pak("ShanikaLW/icomb")

Example

library(fable)
library(fabletools)
library(tsibble)
library(dplyr)
library(lubridate)
library(icomb)
library(ggtime)

tourism_hts <- tourism |>  
  aggregate_key(State * Purpose,
                Trips = sum(Trips)) 

fit <- tourism_hts |>  
  model(base = ETS(Trips)) |>  
  reconcile(ols = min_trace(base, method = "ols"),
            icomb = icomb(base, train_size = 75))
fit
#> # A mable: 45 x 5
#> # Key:     State, Purpose [45]
#>    State           Purpose              base ols          icomb       
#>    <chr*>          <chr*>            <model> <model>      <model>     
#>  1 ACT             Business     <ETS(M,N,M)> <ETS(M,N,M)> <ETS(M,N,M)>
#>  2 ACT             Holiday      <ETS(M,N,A)> <ETS(M,N,A)> <ETS(M,N,A)>
#>  3 ACT             Other        <ETS(M,N,N)> <ETS(M,N,N)> <ETS(M,N,N)>
#>  4 ACT             Visiting     <ETS(M,N,N)> <ETS(M,N,N)> <ETS(M,N,N)>
#>  5 ACT             <aggregated> <ETS(M,A,N)> <ETS(M,A,N)> <ETS(M,A,N)>
#>  6 New South Wales Business     <ETS(M,N,A)> <ETS(M,N,A)> <ETS(M,N,A)>
#>  7 New South Wales Holiday      <ETS(M,N,A)> <ETS(M,N,A)> <ETS(M,N,A)>
#>  8 New South Wales Other        <ETS(A,N,N)> <ETS(A,N,N)> <ETS(A,N,N)>
#>  9 New South Wales Visiting     <ETS(A,N,A)> <ETS(A,N,A)> <ETS(A,N,A)>
#> 10 New South Wales <aggregated> <ETS(A,N,A)> <ETS(A,N,A)> <ETS(A,N,A)>
#> # ℹ 35 more rows

fit |> 
  forecast(h = "3 years") |>  
  filter(Purpose == "Holiday", State == "Victoria") |>  
  autoplot(filter(tourism_hts, Purpose == "Holiday", 
                  State == "Victoria", year(Quarter) > 2010), level = NULL)

We can compute probabilistic forecasts

fit |> 
  forecast(h = "3 years", bootstrap = TRUE, times = 1000) |> 
  filter(Purpose == "Holiday", State == "Victoria") |>
  autoplot(filter(tourism_hts, Purpose == "Holiday",
                  State == "Victoria", year(Quarter) > 2010))

This workflow can be parallelized to improve performance using the future package. By specifying a parallelization plan via future::plan() (e.g., multisession or multicore), users can control how computations are distributed across available workers. This allows the cross-validation procedure in the information combination approach to run in parallel without modifying the core code, while remaining flexible to different computing environments. If no plan is set, the default sequential strategy is used, meaning computations are performed one after another with no parallelization.

library(future)
plan(multisession, workers = 2)

tourism_hts |>  
  model(base = ETS(Trips)) |>  
  reconcile(ols = min_trace(base, method = "ols"),
            icomb = icomb(base, train_size = 75))  |>  
  forecast(h = "3 years") 
#> # A fable: 1,620 x 6 [1Q]
#> # Key:     State, Purpose, .model [135]
#>    State  Purpose  .model Quarter
#>    <chr*> <chr*>   <chr>    <qtr>
#>  1 ACT    Business base   2018 Q1
#>  2 ACT    Business base   2018 Q2
#>  3 ACT    Business base   2018 Q3
#>  4 ACT    Business base   2018 Q4
#>  5 ACT    Business base   2019 Q1
#>  6 ACT    Business base   2019 Q2
#>  7 ACT    Business base   2019 Q3
#>  8 ACT    Business base   2019 Q4
#>  9 ACT    Business base   2020 Q1
#> 10 ACT    Business base   2020 Q2
#> # ℹ 1,610 more rows
#> # ℹ 2 more variables: Trips <dist>, .mean <dbl>
plan(sequential)

References

  • Nguyen, M., Vahid, F., & Wickramasuriya, S. L. (2025). Hierarchical Forecasting: The Role of Information Combination (Working Paper No. 11/25). Department of Econometrics and Business Statistics, Monash University.
Metadata

Version

0.2.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows