ctbu | R Documentation |
Cross temporal reconciled forecasts for all series at any temporal aggregation level are computed by appropriate summation of the high-frequency bottom base forecasts \mjseqn\widehat\mathbfb_i, i = 1,...,n_b, according to a bottom-up procedure like what is currently done in both the cross-sectional and temporal frameworks.
ctbu(Bmat, m, C)
Bmat |
(\mjseqnn_b \times h m) matrix of high-frequency bottom time series base forecasts (\mjseqn\widehat\mathbfB^[1]). \mjseqnh is the forecast horizon for the lowest frequency (most temporally aggregated) time series. |
m |
Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, \mjseqnm), or a subset of the \mjseqnp factors of \mjseqnm. |
C |
(\mjseqnn_a \times n_b) cross-sectional (contemporaneous) matrix mapping the bottom level series into the higher level ones. |
Denoting by \mjseqn\ddot\mathbfY the (\mjseqnn \times h (k^\ast + m)) matrix containing
the bottom-up cross temporal reconciled forecasts, it is:
\mjsdeqn\ddot\mathbfY = \left[\beginarraycc
\mathbfC\widehat\mathbfB^[1]\mathbfK_1' & \mathbfC\widehat\mathbfB^[1]
\widehat\mathbfB^[1] \mathbfK_1' & \widehat\mathbfB^[1]
\endarray\right],
where \mjseqn\mathbfC is the cross-sectional (contemporaneous) aggregation matrix,
\mjseqn\mathbfK_1 is the temporal aggregation matrix with \mjseqnh=1, and
\mjseqn\widehat\mathbfB^[1] is the matrix containing the high-frequency bottom
time series base forecasts. This expression is equivalent to
\mjseqn\mboxvec(\ddot\mathbfY') = \widetilde\mathbfS
\mboxvec(\widehat\mathbfY') for \mjseqnh = 1, where
\mjseqn\widetilde\mathbfS is the cross-temporal summing matrix for
\mjseqn\mboxvec(\widehat\mathbfY'), and \mjseqn\widehat\mathbfY
is the (\mjseqnn \times h (k^\ast + m)) matrix containing all the base forecasts
at any temporal aggregation order.
The function returns a (\mjseqnn \times h (k^\ast + m)) matrix of bottom-up cross-temporally reconciled forecasts, \mjseqn\ddot\mathbfY.
Di Fonzo, T., and Girolimetto, D. (2023), Cross-temporal forecast reconciliation: Optimal combination method and heuristic alternatives, International Journal of Forecasting, 39(1), 39-57.
Other reconciliation procedures:
cstrec()
,
htsrec()
,
iterec()
,
lccrec()
,
octrec()
,
tcsrec()
,
tdrec()
,
thfrec()
data(FoReco_data)
# monthly base forecasts
hfbts <- t(FoReco2matrix(FoReco_data$base, m = 12)$k1[, -c(1:3), drop = FALSE])
obj <- ctbu(Bmat = hfbts, m = 12, C = FoReco_data$C)
rownames(obj) <- rownames(FoReco_data$base)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.