This function returns the summing matrix for a hierarchical or grouped time
series, as defined in Hyndman et al. (2011).

smatrix(xts)

## Arguments

xts |
Hierarchical or grouped time series of class `gts` . |

## Value

A numerical matrix.

## References

R. J. Hyndman, R. A. Ahmed, G. Athanasopoulos and H.L. Shang
(2011) Optimal combination forecasts for hierarchical time series.
*Computational Statistics and Data Analysis*, **55**(9), 2579--2589.
http://robjhyndman.com/papers/hierarchical/

## See also

`hts`

, `gts`

,
`combinef`

## Examples

smatrix(htseg1)

#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 1 1 1 1 1
#> [2,] 1 1 1 0 0
#> [3,] 0 0 0 1 1
#> [4,] 1 0 0 0 0
#> [5,] 0 1 0 0 0
#> [6,] 0 0 1 0 0
#> [7,] 0 0 0 1 0
#> [8,] 0 0 0 0 1