Constructs the \(n_a \times n\) zero-constraint matrix \(\mathbf{C}\) for a set of linearly related time series, where \(n_a = n - n_b\) is the number of aggregated series.

coherent_cmat(data, sparse = FALSE)

Arguments

data

A data object which contains linearly related coherent structures.

sparse

If TRUE, a sparse matrix (class "dgCMatrix" from the Matrix package) is returned. Defaults to FALSE.

Value

An \(n_a \times n\) matrix (dense or sparse) whose rows encode each aggregation constraint as \(\mathbf{C}\boldsymbol{y}_t = \boldsymbol{0}_{n_a}\).

Details

Given the aggregation matrix \(\mathbf{A}\) (see coherent_smat()), the constraint matrix is defined as

$$\mathbf{C} = [\mathbf{I}_{n_a} \;\; {-\mathbf{A}}],$$

so that \(\mathbf{C}\boldsymbol{y}_t = \boldsymbol{0}_{n_a}\) for all coherent vectors \(\boldsymbol{y}_t\). This zero-constrained representation yields the mapping matrix

$$\mathbf{M} = \mathbf{I}_n - \mathbf{W}\mathbf{C}'(\mathbf{C}\mathbf{W}\mathbf{C}')^{-1}\mathbf{C},$$

which requires inverting an \(n_a \times n_a\) matrix rather than the \(n_b \times n_b\) matrix in the structural form, and is therefore more efficient when \(n_a < n_b\).

References

Hyndman, R. J., & Athanasopoulos, G. (2022). Notation for forecast reconciliation. https://robjhyndman.com/hyndsight/reconciliation-notation.html

Di Fonzo, T., & Girolimetto, D. (2021). Cross-temporal forecast reconciliation: Optimal combination method and heuristic alternatives. International Journal of Forecasting. doi:10.1016/j.ijforecast.2021.08.004

See also

coherent_smat() for the corresponding structural matrix \(\mathbf{S}\) and aggregate_key() for computing cross-sectional aggregations with tsibble data sets.