Some useful tools for the cross-temporal forecast reconciliation of a linearly constrained (hierarchical/grouped) multiple time series.
ctf_tools(C, m, h = 1, Ut, nb, sparse = TRUE)
(n_a n_b) cross-sectional (contemporaneous) matrix mapping the bottom level series into the higher level ones.
Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, m), or a subset of the p factors of m.
Forecast horizon for the lowest frequency (most temporally aggregated) time
series (default is 1
).
Zero constraints cross-sectional (contemporaneous) kernel matrix
(U'y = 0) spanning the null space valid
for the reconciled forecasts. It can be used instead of parameter
C
, but nb
(n = n_a + n_b) is needed if
U' [I \ -C]. If the hierarchy
admits a structural representation, U' has dimension
(n_a n).
Number of bottom time series; if C
is present, nb
and Ut
are not used.
Option to return sparse object (default is TRUE
).
ctf list with:
Ht
Full row-rank cross-temporal zero constraints (kernel) matrix coherent with y = vec(Y'): H'y = 0.
Hbrevet
Complete, not full row-rank cross-temporal zero constraints (kernel) matrix coherent with y = vec(Y'): H'y = 0.
Hcheckt
Full row-rank cross-temporal zero constraints (kernel) matrix coherent with y (structural representation): H' y = 0.
Ccheck
Cross-temporal aggregation matrix C coherent with y (structural representation).
Scheck
Cross-temporal summing matrix S coherent with y (structural representation).
Fmat
Cross-temporal summing matrix F coherent with y = vec(Y').
hts list from hts_tools .
thf list from thf_tools .
Other utilities:
Cmatrix()
,
FoReco2ts()
,
commat()
,
hts_tools()
,
lcmat()
,
oct_bounds()
,
score_index()
,
shrink_estim()
,
thf_tools()
# NOT RUN {
# One level hierarchy (na = 1, nb = 2) with quarterly data
obj <- ctf_tools(C = matrix(c(1, 1), 1), m = 4)
# }
Run the code above in your browser using DataLab