| tecov | R Documentation |
This function provides an approximation of the temporal base forecasts errors covariance matrix using different reconciliation methods (see Di Fonzo and Girolimetto, 2023).
tecov(comb, agg_order = NULL, tew = "sum", res = NULL, mse = TRUE,
shrink_fun = shrink_estim, ...)
comb |
A string specifying the covariance approximation method.
|
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: " |
res |
A ( |
mse |
If |
shrink_fun |
Shrinkage function of the covariance matrix, shrink_estim (default) |
... |
Not used. |
A ((k^\ast+m) \times (k^\ast+m)) symmetric matrix.
Di Fonzo, T. and Girolimetto, D. (2023a), Cross-temporal forecast reconciliation: Optimal combination method and heuristic alternatives, International Journal of Forecasting, 39, 1, 39-57. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.ijforecast.2021.08.004")}
Temporal framework:
teboot(),
tebu(),
telcc(),
temo(),
temvn(),
terec(),
tesmp(),
tetd(),
tetools()
# (7 x 70) in-sample residuals matrix (simulated), agg_order = 4
res <- rnorm(70)
cov1 <- tecov("ols", agg_order = 4) # OLS
cov2 <- tecov("str", agg_order = 4) # STRC
cov3 <- tecov("wlsv", agg_order = 4, res = res) # WLSv
cov4 <- tecov("wlsh", agg_order = 4, res = res) # WLSh
cov5 <- tecov("acov", agg_order = 4, res = res) # ACOV
cov6 <- tecov("strar1", agg_order = 4, res = res) # STRAR1
cov7 <- tecov("har1", agg_order = 4, res = res) # HAR1
cov8 <- tecov("sar1", agg_order = 4, res = res) # SAR1
cov9 <- tecov("shr", agg_order = 4, res = res) # SHR
cov10 <- tecov("sam", agg_order = 4, res = res) # SAM
# Custom covariance matrix
tecov.ols2 <- function(comb, x) diag(x)
tecov(comb = "ols2", x = 7) # == tecov("ols", agg_order = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.