Skip to contents

These functions compute the matrices required for the optimal coherent forecast combination, as described in Girolimetto and Di Fonzo (2024), in the cross-sectional (csocc, via occmat) and temporal (teocc, via occmat_te) frameworks. These matrices serve as the foundation for building forecasts that effectively combine the individual information from multiple experts while ensuring coherence across the variables.

Usage

occmat(agg_mat, cons_mat, p = NULL, matNA = NULL,
       comb = "ols", res = NULL, approach = "proj", ...)

occmat_te(
  matNA = NULL,
  p = NULL,
  agg_order,
  comb = "ols",
  tew = "sum",
  res = NULL,
  approach = "proj",
  ...
)

Arguments

agg_mat

A (\(n_u \times n_b\)) numeric matrix representing the cross-sectional aggregation matrix, mapping the \(n_b\) bottom-level (free) variables into the \(n_u\) upper (constrained) variables.

cons_mat

A (\(n_u \times n\)) numeric matrix representing the cross-sectional zero constraints: each row represents a constraint equation, and each column represents a variable. The matrix can be of full rank, meaning the rows are linearly independent, but this is not a strict requirement, as the function allows for redundancy in the constraints.

p

Total number of experts, \(p\).

matNA

A (\(n \times p\)) matrix consisting of 0s and 1s, where each element indicates whether expert \(j\) (column) has provided a forecast for variable \(i\) (row). If expert \(j\) has provided a forecast for variable \(i\), the corresponding element \((i,j)\) is 1; otherwise, it is 0.

comb

A string specifying the reconciliation method. For details, see cscov.

res

A list of \(p\) numeric (\(N \times n\)) matrix containing the in-sample residuals. This input is used to compute some covariance matrices.

approach

A string specifying the approach used to compute the reconciled forecasts. Options include:

  • "proj" (default): zero-constrained projection approach.

  • "strc": structural approach.

...

Arguments passed on to cscov.

agg_order

Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, \(m\)), or a vector representing a subset of \(p\) factors of \(m\).

tew

A string specifying the type of temporal aggregation. Options include: "sum" (simple summation, default), "avg" (average), "first" (first value of the period), and "last" (last value of the period).

Value

A list of matrices:

M

Projection matrix.

Omega

Matrix of the combination weights of the optimal linear multi-task forecast combination.

W

Forecast error covariance matrix of the base forecasts.

Wc

Forecast error covariance matrix of the combined forecasts.

Wtilde

Forecast error covariance matrix of the reconciled combined forecasts.

K

Matrix that replicates a vector (see Girolimetto and Di Fonzo, 2024).

References

Girolimetto, D. and Di Fonzo, T. (2024), Coherent forecast combination for linearly constrained multiple time series, doi:10.48550/arXiv.2412.03429 .

See also

Other Optimal combination: cscov(), csmtc(), csocc(), temtc(), teocc()