csbu | R Documentation |
This function computes the cross-sectional bottom-up reconciled forecasts
(Dunn et al., 1976) for all series by appropriate summation of the bottom
base forecasts \widehat{\mathbf{b}}
:
\widetilde{\mathbf{y}} = \mathbf{S}_{cs}\widehat{\mathbf{b}},
where \mathbf{S}_{cs}
is the cross-sectional structural matrix.
csbu(base, agg_mat, sntz = FALSE)
base |
A ( |
agg_mat |
A ( |
sntz |
If |
A (h \times n
) numeric matrix of cross-sectional reconciled forecasts.
Dunn, D. M., Williams, W. H. and Dechaine, T. L. (1976), Aggregate versus subaggregate models in local area forecasting, Journal of the American Statistical Association 71(353), 68–71. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.1976.10481478")}
Bottom-up reconciliation:
ctbu()
,
tebu()
Cross-sectional framework:
csboot()
,
cscov()
,
cslcc()
,
csmo()
,
csrec()
,
cstd()
,
cstools()
set.seed(123)
# (3 x 2) bottom base forecasts matrix (simulated), Z = X + Y
bts <- matrix(rnorm(6, mean = c(10, 10)), 3, byrow = TRUE)
# Aggregation matrix for Z = X + Y
A <- t(c(1,1))
reco <- csbu(base = bts, agg_mat = A)
# Non negative reconciliation
bts[2,2] <- -bts[2,2] # Making negative one of the base forecasts for variable Y
nnreco <- csbu(base = bts, agg_mat = A, sntz = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.