Some useful tools for the cross-sectional forecast reconciliation of a linearly constrained (e.g., hierarchical/grouped) multiple time series.
hts_tools(C, h = 1, Ut, nb, sparse = TRUE)
(\(n_a \times n_b\)) cross-sectional (contemporaneous) matrix mapping the bottom level series into the higher level ones.
Forecast horizon (default is 1
).
Zero constraints cross-sectional (contemporaneous) kernel matrix
\((\mathbf{U}'\mathbf{y} = \mathbf{0})\) spanning the null space valid
for the reconciled forecasts. It can be used instead of parameter
C
, but nb
is needed if
\(\mathbf{U}' \neq [\mathbf{I} \ -\mathbf{C}]\). If the hierarchy
admits a structural representation, \(\mathbf{U}'\) has dimension
(\(n_a \times n\)).
Number of bottom time series; if C
is present, nb
and Ut
are not used.
Option to return sparse matrices (default is TRUE
).
A list of five elements:
C
(\(n \times n_b\)) cross-sectional (contemporaneous) aggregation matrix.
S
(\(n \times n_b\)) cross-sectional (contemporaneous) summing matrix, \(\mathbf{S} = \left[\begin{array}{c} \mathbf{C} \cr \mathbf{I}_{n_b}\end{array}\right].\)
Ut
(\(n_a \times n\)) zero constraints cross-sectional (contemporaneous) kernel matrix. If the hierarchy admits a structural representation \(\mathbf{U}' = [\mathbf{I} \ -\mathbf{C}]\)
n
Number of variables \(n_a + n_b\).
na
Number of upper level variables.
nb
Number of bottom level variables.
Other utilities:
Cmatrix()
,
FoReco2ts()
,
agg_ts()
,
arrange_hres()
,
commat()
,
ctf_tools()
,
lcmat()
,
oct_bounds()
,
residuals_matrix()
,
score_index()
,
shrink_estim()
,
thf_tools()