Some useful tools for the cross-sectional forecast reconciliation of a
linearly constrained (e.g., hierarchical/grouped) multiple time series.
Usage
cstools(agg_mat, cons_mat, sparse = TRUE)
Value
A list with four elements:
dim
A vector containing information about the number of series for the complete
system (n), for upper levels (na) and bottom level (nb).
agg_mat
The cross-sectional aggregation matrix.
strc_mat
The cross-sectional structural matrix.
cons_mat
The cross-sectional zero constraints matrix.
Arguments
agg_mat
A (\(n_a \times n_b\)) numeric matrix representing the cross-sectional
aggregation matrix. It maps the \(n_b\) bottom-level (free)
variables into the \(n_a\) upper (constrained) variables.
cons_mat
A (\(n_a \times n\)) numeric matrix representing the cross-sectional
zero constraints. It spans the null space for the reconciled forecasts.
sparse
Option to return sparse matrices (default is TRUE).