FoReco (version 0.1.1)

ctbu: Bottom-up Cross-temporal forecast reconciliation

Description

Cross temporal reconciled forecasts for all series at any temporal aggregation level can be easily computed by appropriate summation of the high-frequency bottom base forecasts \(\hat{\textbf{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

(nb x (h m)) matrix of high-frequency bottom time series base forecasts. 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).

C

(na x nb) cross-sectional (contemporaneous) matrix mapping the bottom level series into the higher level ones.

Value

The function returns a (n x (h (k* + m))) matrix of bottom-up cross-temporally reconciled forecasts.

References

Di Fonzo, T., Girolimetto, D. (2020), Cross-Temporal Forecast Reconciliation: Optimal Combination Method and Heuristic Alternatives, Department of Statistical Sciences, University of Padua, arXiv:2006.08570.

Examples

Run this code
# NOT RUN {
data(FoReco_data)
id <- which(simplify2array(strsplit(colnames(FoReco_data$base),
                                    split = "_"))[1, ] == "k1")
hfbts <- FoReco_data$base[-c(1:3), id]
obj <- ctbu(Bmat = hfbts, m = 12, C = FoReco_data$C)
rownames(obj) <- rownames(FoReco_data$base)

# }

Run the code above in your browser using DataCamp Workspace