get_reconc_matrices: Build hierarchy matrices

View source: R/hierarchy.R

get_reconc_matricesR Documentation

Build hierarchy matrices

Description

Creates the aggregation and summing matrices for a temporal hierarchy of time series from a user-selected list of aggregation levels.

Usage

get_reconc_matrices(agg_levels, h)

Arguments

agg_levels

user-selected list of aggregation levels.

h

number of steps ahead for the bottom level forecasts.

Value

A list containing the named elements:

  • A the aggregation matrix;

  • S the summing matrix.

See Also

temporal_aggregation()

Examples


library(bayesRecon)

#Create monthly hierarchy
agg_levels <- c(1,2,3,4,6,12)
h <- 12
rec_mat <- get_reconc_matrices(agg_levels, h)
S <- rec_mat$S
A <- rec_mat$A


bayesRecon documentation built on Sept. 11, 2024, 9:08 p.m.