Some useful tools for forecast reconciliation through temporal hierarchies.
tetools(agg_order, fh = 1, tew = "sum", sparse = TRUE)
A list with five elements:
A vector containing information about the maximum aggregation order
(m
), the number of factor (p
), the partial (ks
) and total
sum (kt
) of factors.
The vector of the temporal aggregation orders (in decreasing order).
The temporal linear combination or aggregation matrix.
The temporal structural matrix.
The temporal zero constraints matrix.
Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, \(m\)), or a vector representing a subset of \(p\) factors of \(m\).
Forecast horizon for the lowest frequency (most temporally aggregated)
time series (default is 1
).
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).
Option to return sparse matrices (default is TRUE
).
Temporal framework:
teboot()
,
tebu()
,
tecov()
,
telcc()
,
temo()
,
terec()
,
tetd()
Utilities:
FoReco2matrix()
,
aggts()
,
balance_hierarchy()
,
commat()
,
csprojmat()
,
cstools()
,
ctprojmat()
,
cttools()
,
df2aggmat()
,
lcmat()
,
recoinfo()
,
res2matrix()
,
set_bounds()
,
shrink_estim()
,
shrink_oasd()
,
teprojmat()
,
unbalance_hierarchy()
# Temporal framework (quarterly data)
obj <- tetools(agg_order = 4, sparse = FALSE)
Run the code above in your browser using DataLab