I'm trying to optimize which methods I use at each temporal aggregate. In order to do this I must use reconcilethief(). I can get this function to work with other data sets such as AirPassengers, but for some reason not this. I receiver the error: "Error: length(n) == 1L is not TRUE". If you want to see it work, change tsaggregates(train) to tsaggregates(AirPassengers). Consider:
tsdata <- c(5669,6845,7320,7443,8031,8394,9321,8904,7982,7981,
7896,7733,8618,7013,8088,7069,6380,7171,7091,6491,
6184,6881,5480,7068,7004,6001,6890,6192,5904,6676,
6444,6181,5842,5861,5511,6941,7838,7185,7034,6446,
5920,6221,5391,7064,5687,5385,5929,7345,7157,6681,
8043,5570,6590,7365,6806)
train <- ts(tsdata, start=c(2013,1), f=12)
seriesagg <- tsaggregates(train)
model1 <- forecast(tslm(seriesagg$Monthly ~ season), h=48)
model2 <- forecast(snaive(seriesagg$'2-Monthly', h=24), h=24)
model3 <- thief(seriesagg$Quarterly, h=16)
model4 <- forecast(seriesagg$'4-Monthly', h=12)
model5 <- forecast(seriesagg$Biannual, h=8)
model6 <- forecast(seriesagg$Annual, h=4)
fc <- list()
fc[[1]] <- model1
fc[[2]] <- model2
fc[[3]] <- model3
fc[[4]] <- model4
fc[[5]] <- model5
fc[[6]] <- model6
reconciled <- reconcilethief(fc)