I have to forecast a large set of (hierarchical) time series and since the R package hts allows for confidence intervals for their ensemble, I'd like to use it. I haven't found an example of how to use it, yet. How should I forecast the following series with it: The time series have a simple form. The sum of $n_3$ level-$3$-series make up a level-$2$-series and the sum of $n_2$ level-$2$-series make up a level-$1$-series and the sum of $n_1$ level-$1$-series make up the top-most level-$0$-series (where sums are taken over series in one point in time, $n_j$ natural numbers for $j=0,1,2,3$).
|
|
Here is one example taken from the documentation in the package:
The first line generates a matrix of four time series, each of 100 observations. The second line interprets the four time series as hierarchical, with the first two series in one group and the second two series in a second group:
This gives seven series in all including the aggregations.
The third line of the example interprets the four series as grouped rather than hierarchical, with one grouping variable treating the first two series in one group and the remaining two series in the second group. The other grouping variable takes the first and third series in one group and the second and fourth in the other group. So in this interpretation, the four series can be grouped as in the hierarchy above, or as in the hierarchy below:
So there are nine series in all under this structure, due to the additional grouping variable.
|
|||||||
|