Skip to contents

Projects base forecasts of a hierarchy onto the coherent subspace \(\{Sb\}\) using \(G = (S'W^{-1}S)^{-1}S'W^{-1}\).

Usage

morie_joseph_mint_reconciliation(
  y_hat,
  S,
  W = NULL,
  method = c("ols", "wls", "mint")
)

Arguments

y_hat

base forecasts, one per node.

S

summing matrix, nodes by bottom-level series.

W

covariance of the base forecast errors.

method

"ols", "wls" or "mint".

Value

list with reconciled, bottom, coherent, adjustment, incoherence_before, G.

Details

The projection is orthogonal in the W metric, which has a consequence worth relying on: reconciling CANNOT increase expected error. That is not true of bottom-up or top-down, both of which throw away the information in the levels they do not use.

method = "ols" ignores W entirely, "wls" keeps only its diagonal, and "mint" uses the full covariance.

References

Wickramasuriya, S. L., Athanasopoulos, G. and Hyndman, R. J. (2019). Optimal forecast reconciliation for hierarchical and grouped time series through trace minimization. JASA, 114(526), 804-819.

Examples

S <- rbind(c(1, 1), diag(2))
morie_joseph_mint_reconciliation(c(10, 4, 5), S)$coherent
#> [1] TRUE