Some useful tools for the cross-sectional forecast reconciliation of a
linearly constrained (e.g., hierarchical/grouped) multiple time series.
Usage
hts_tools(C, h = 1, Ut, nb, sparse = TRUE)
Arguments
C
(n_a n_b) cross-sectional (contemporaneous) matrix
mapping the bottom level series into the higher level ones.
h
Forecast horizon (default is 1).
Ut
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 is needed if
U' [I \ -C]. If the hierarchy
admits a structural representation, U' has dimension
(n_a n).
nb
Number of bottom time series; if C is present, nb
and Ut are not used.
sparse
Option to return sparse matrices (default is TRUE).