temo {FoReco} | R Documentation |
Temporal middle-out reconciliation
Description
The middle-out forecast reconciliation for temporal hierarchies
combines top-down (tetd) and bottom-up (tebu) methods. Given
the base forecasts of an intermediate temporal aggregation order k
, it performs
a top-down approach for the aggregation orders
<k
;a bottom-up approach for the aggregation orders
>k
.
Usage
temo(base, agg_order, order = max(agg_order), weights, tew = "sum",
normalize = TRUE)
Arguments
base |
A ( |
agg_order |
Highest available sampling frequency per seasonal cycle (max. order
of temporal aggregation, |
order |
The intermediate fixed aggregation order |
weights |
A ( |
tew |
A string specifying the type of temporal aggregation. Options include:
" |
normalize |
If |
Value
A (h(k^\ast+m) \times 1
) numeric vector of temporal reconciled forecasts.
See Also
Middle-out reconciliation:
csmo()
,
ctmo()
Temporal framework:
teboot()
,
tebu()
,
tecov()
,
telcc()
,
terec()
,
tetd()
,
tetools()
Examples
set.seed(123)
# (6 x 1) base forecasts vector (simulated), forecast horizon = 3
# and intermediate aggregation order k = 2 (max agg order = 4)
basek2 <- rnorm(3*2, 5)
# Same weights for different forecast horizons
fix_weights <- runif(4)
reco <- temo(base = basek2, order = 2, agg_order = 4, weights = fix_weights)
# Different weights for different forecast horizons
h_weights <- runif(4*3)
recoh <- temo(base = basek2, order = 2, agg_order = 4, weights = h_weights)