| cttools | R Documentation |
Some useful tools for the cross-temporal forecast reconciliation of a linearly constrained (e.g., hierarchical/grouped) multiple time series.
cttools(agg_mat, cons_mat, agg_order, tew = "sum", fh = 1, sparse = TRUE)
agg_mat |
A ( |
cons_mat |
A ( |
agg_order |
Highest available sampling frequency per seasonal cycle (max. order
of temporal aggregation, |
tew |
A string specifying the type of temporal aggregation. Options include:
" |
fh |
Forecast horizon for the lowest frequency (most temporally aggregated)
time series (default is |
sparse |
Option to return sparse matrices (default is |
A list with four elements:
dim |
A vector containing information about the number of series for the
complete system ( |
set |
The vector of the temporal aggregation orders (in decreasing order). |
agg_mat |
The cross-temporal aggregation matrix. |
strc_mat |
The cross-temporal structural matrix. |
cons_mat |
The cross-temporal zero constraints matrix. |
Cross-temporal framework:
ctboot(),
ctbu(),
ctcov(),
ctlcc(),
ctmo(),
ctrec(),
cttd(),
iterec(),
tcsrec()
Utilities:
FoReco2matrix(),
aggts(),
balance_hierarchy(),
commat(),
csprojmat(),
cstools(),
ctprojmat(),
df2aggmat(),
lcmat(),
recoinfo(),
res2matrix(),
shrink_estim(),
teprojmat(),
tetools(),
unbalance_hierarchy()
# Cross-temporal framework
A <- t(c(1,1)) # Aggregation matrix for Z = X + Y
m <- 4 # from quarterly to annual temporal aggregation
cttools(agg_mat = A, agg_order = m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.