Skip to contents

Bottom-up above the chosen middle level, top-down below it (Hyndman & Athanasopoulos, FPP 3rd ed., Sec. 11.3). Both directions are the one product S x once S carries 0/1 rows above and proportion rows below; rows are classified on that basis and reported separately so the reading stays checkable.

Usage

Middleout(middle, S)

Arguments

middle

Forecasts at the middle level, length m.

S

Structure matrix, k x m.

Value

Named list with estimate, aggregated, disaggregated, middle, n, method.

References

Hyndman & Athanasopoulos, FPP3, Sec. 11.3.

Examples

S <- rbind(c(1, 1), c(1, 0), c(0, 1), c(0.5, 0), c(0.5, 0))   # 0/1 rows aggregate, proportion rows disaggregate
Middleout(middle = c(10, 20), S = S)
#> $estimate
#> [1] 30 10 20  5  5
#> 
#> $aggregated
#> [1] 30 10 20
#> 
#> $disaggregated
#> [1] 5 5
#> 
#> $middle
#> [1] 10 20
#> 
#> $n
#> [1] 5
#> 
#> $method
#> [1] "Middle-out reconciliation -- Hyndman & Athanasopoulos, FPP3 Sec. 11.3"
#>