thf_tools: Temporal reconciliation tools

View source: R/thf_tools.R

thf_toolsR Documentation

Temporal reconciliation tools

Description

\loadmathjax

Some useful tools for forecast reconciliation through temporal hierarchies.

Usage

thf_tools(m, h = 1, sparse = TRUE)

Arguments

m

Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, \mjseqnm), or a subset of the \mjseqnp factors of \mjseqnm.

h

Forecast horizon for the lowest frequency (most temporally aggregated) time series (default is \mjseqn1).

sparse

Option to return sparse object (default is TRUE).

Value

A list of seven elements:

K

Temporal aggregation matrix.

R

Temporal summing matrix.

Zt

Zero constraints temporal kernel matrix, \mjseqn\mathbfZ_h'\mathbfY' = \mathbf0_\left[hk^* \times n \right].

kset

Set of factors (\mjseqnp) of \mjseqnm in descending order (from \mjseqnm to 1), \mjseqn\cal K = \left\lbrace k_p, k_p-1, ..., k_2, k_1\right\rbrace, \mjseqnk_p=m, \mjseqnk_1=1.

m

Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation).

p

Number of elements of kset, \mjseqn\cal K.

ks

Sum of \mjseqnp-1 factors of \mjseqnm (out of \mjseqnm itself), \mjseqnk^*.

kt

Sum of all factors of m, \mjseqnk^tot = k^*+m.

See Also

Other utilities: Cmatrix(), FoReco2ts(), agg_ts(), arrange_hres(), commat(), ctf_tools(), hts_tools(), lcmat(), oct_bounds(), residuals_matrix(), score_index(), shrink_estim()

Examples

# quarterly data
obj <- thf_tools(m = 4, sparse = FALSE)


FoReco documentation built on May 31, 2023, 5:17 p.m.