FoReco (version 0.2.6)

thf_tools: Temporal reconciliation tools

Description

Some useful tools for forecast reconciliation through temporal hierarchies.

Usage

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

Value

A list of seven elements:

K

Temporal aggregation matrix.

R

Temporal summing matrix.

Zt

Zero constraints temporal kernel matrix, Z_h'Y' = 0_[hk^* n ].

kset

Set of factors (p) of m in descending order (from m to 1), K = k_p, k_p-1, ..., k_2, k_1, k_p=m, k_1=1.

m

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

p

Number of elements of kset, K.

ks

Sum of p-1 factors of m (out of m itself), k^*.

kt

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

Arguments

m

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

h

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

sparse

Option to return sparse object (default is TRUE).

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

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

Run the code above in your browser using DataLab