| ctbu | R Documentation |
Cross-temporal bottom-up 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}}^{[1]}:
\widetilde{\mathbf{X}} =
\mathbf{S}_{cs}\widehat{\mathbf{B}}^{[1]}\mathbf{S}'_{te},
where
\mathbf{S}_{cs} and \mathbf{S}_{te} are the cross-sectional and
temporal structural matrices, respectively.
ctbu(base, agg_mat, agg_order, tew = "sum", sntz = FALSE, round = FALSE)
base |
A ( |
agg_mat |
A ( |
agg_order |
Highest available sampling frequency per seasonal cycle
(max. order of temporal aggregation, |
tew |
A string specifying the type of temporal aggregation. Options
include: " |
sntz |
Logical. If |
round |
Logical. If |
A (n \times h(k^\ast+m)) numeric matrix of cross-temporal
reconciled forecasts.
Di Fonzo, T. and Girolimetto, D. (2023), Spatio-temporal reconciliation of solar forecasts, Solar Energy, 251, 13–29. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.solener.2023.01.003")}
Bottom-up reconciliation:
csbu(),
tebu()
Cross-temporal framework:
ctboot(),
ctcov(),
ctlcc(),
ctmo(),
ctmvn(),
ctrec(),
ctsmp(),
cttd(),
cttools(),
iterec(),
tcsrec()
set.seed(123)
# Aggregation matrix for Z = X + Y
A <- t(c(1,1))
# (2 x 4) high frequency bottom base forecasts matrix (simulated),
# agg_order = 4 (annual-quarterly)
hfbts <- matrix(rnorm(4*2, 2.5), 2, 4)
reco <- ctbu(base = hfbts, agg_mat = A, agg_order = 4)
# Non negative reconciliation
hfbts[1,4] <- -hfbts[1,4] # Making negative one of the quarterly values for X
nnreco <- ctbu(base = hfbts, agg_mat = A, agg_order = 4, sntz = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.