ctbu {FoReco} | R Documentation |
Bottom-up cross-temporal forecast reconciliation
Description
Cross temporal reconciled forecasts for all series at any temporal aggregation level are computed by appropriate summation of the high-frequency bottom base forecasts \(\widehat{\mathbf{b}}_i, i = 1,...,n_b\), according to a bottom-up procedure like what is currently done in both the cross-sectional and temporal frameworks.
Usage
ctbu(Bmat, m, C)
Arguments
Bmat |
(\(n_b \times h m\)) matrix of high-frequency bottom time series base forecasts (\(\widehat{\mathbf{B}}^{[1]}\)). \(h\) 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, \(m\)), or a subset of the \(p\) factors of \(m\). |
C |
(\(n_a \times n_b\)) cross-sectional (contemporaneous) matrix mapping the bottom level series into the higher level ones. |
Details
Denoting by \(\ddot{\mathbf{Y}}\) the (\(n \times h (k^\ast + m)\)) matrix containing the bottom-up cross temporal reconciled forecasts, it is: \[\ddot{\mathbf{Y}} = \left[\begin{array}{cc} \mathbf{C}\widehat{\mathbf{B}}^{[1]}\mathbf{K}_1' & \mathbf{C}\widehat{\mathbf{B}}^{[1]} \cr \widehat{\mathbf{B}}^{[1]} \mathbf{K}_1' & \widehat{\mathbf{B}}^{[1]} \end{array}\right],\] where \(\mathbf{C}\) is the cross-sectional (contemporaneous) aggregation matrix, \(\mathbf{K}_1\) is the temporal aggregation matrix with \(h=1\), and \(\widehat{\mathbf{B}}^{[1]}\) is the matrix containing the high-frequency bottom time series base forecasts. This expression is equivalent to \(\mbox{vec}(\ddot{\mathbf{Y}}') = \widetilde{\mathbf{S}} \mbox{vec}(\widehat{\mathbf{Y}}')\) for \(h = 1\), where \(\widetilde{\mathbf{S}}\) is the cross-temporal summing matrix for \(\mbox{vec}(\widehat{\mathbf{Y}}')\), and \(\widehat{\mathbf{Y}}\) is the (\(n \times h (k^\ast + m)\)) matrix containing all the base forecasts at any temporal aggregation order.
Value
The function returns a (\(n \times h (k^\ast + m)\)) matrix of bottom-up cross-temporally reconciled forecasts, \(\ddot{\mathbf{Y}}\).
References
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.
See Also
Other reconciliation procedures:
cstrec()
,
htsrec()
,
iterec()
,
lccrec()
,
octrec()
,
tcsrec()
,
tdrec()
,
thfrec()
Examples
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)