FoReco (version 0.1.1)

thf_tools: Temporal reconciliation tools

Description

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).

h

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

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\(,\; \textbf{Z}_h'\textbf{Y}' = \mathbf{0}_{\left[hk^* \times n \right]}\).

kset

Set of factors (p) of m in descending order (from m to 1)\(,\;{\cal K} = \left\{k_p, k_{p-1}, \ldots,\right.\) \(\left. k_2, k_1\right\},\) \(k_p=m, \; k_1=1\).

p

Number of elements of kset\(,\;({\cal 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\)).

Examples

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

Run the code above in your browser using DataLab