# Construct data
abc <- ts(5 + matrix(sort(rnorm(200)), ncol = 4, nrow = 50))
y <- gts(abc, rbind(c(1,1,2,2), c(1,2,1,2)))
h <- 12
ally <- allts(y)
allf <- matrix(NA,nrow=h,ncol=ncol(ally))
for(i in 1:ncol(ally))
allf[,i] <- forecast(auto.arima(ally[,i]),h=h)$mean
allf <- ts(allf, start=51)
y.f <- combinef(allf,Smatrix(y), return="gts")
plot(y.f)Run the code above in your browser using DataLab