I need some help with transforming my data for it to be fit to perform hierarchial forecasting methods from the hts package. I want to use the method of Hyndman and found several explanations for this. However, you need to define a time series in which the levels and groups in the hierarhcy are specified but I cannot find any explanation about this. Does anyone know how to do this or where I can find proper explanation.
Thank you very much for your answer this is really helfull. Now my only problem is that I cannot use the aggregate_key function on my dataset. I get the following error:
Error in UseMethod("aggregate_key") :
no applicable method for 'aggregate_key' applied to an object of class "c('tbl_df', 'tbl', 'data.frame')"