i reproduced the following chunk of code to check the optimal for "Total", "State", "Legal", "Gender", "Bottom", "All series" but could not assemble the corresponding grouped structure, as I got only "Total" for levels = 0. For levels =0:1, of course I got the states, but ungrouped. Any hint, please ?
data <- window(prison.gts, start = 2005, end = 2015)
test <- window(prison.gts, start = 2015)
fcasts <- forecast(data, h = 8, method = "bu", fmethod = "arima")
a1 <- accuracy.gts(fcasts, test, levels = 0)
fcasts1 <- forecast(data, h = 8, method = "comb", weights ="ols")
a2 <- accuracy.gts(fcasts1, test, levels = 0)
fcasts2 <- forecast(data, h = 8, method = "comb", weights ="wls")
a3 <- accuracy.gts(fcasts2, test, levels = 0)
fcasts3 <- forecast(data, h = 8, method = "comb", weights ="nseries")
a4 <- accuracy.gts(fcasts3, test, levels = 0)
fcasts4 <- forecast(data, h = 8, method = "comb", weights ="mint", covariance="shr")
a5 <- accuracy.gts(fcasts4, test, levels = c("Total", "State", "Legal", "Gender"))
Also for "Total", the optimal is method = "comb"
, weights = "mint"
, and covariance = "shr"
, not
method = "comb"
and weights = "wls"
# |method | bu| ols| wls| nseries| mint|
# |:----------|------:|-------:|-------:|----------:|--------:|
# |MAPE | 3.78| 1.52| 1.214| 1.1461| 1.076|
# |MASE | 1.28| 0.49| 0.401| 0.3764| 0.345|
Referred here by Forecasting: Principles and Practice, by Rob J Hyndman and George Athanasopoulos