ts.sim1 <- 50+arima.sim(list(order = c(1,1,0), ar = 0.7), n = 100)
ts.sim2<-70+arima.sim(list(order = c(1,1,0), ar = 0.8), n = 100)
weight0=diag(1, 2, 2)
weight1=matrix(c(0, 1, 1, 0), nrow= 2, ncol = 2, byrow = TRUE)
zz=as.matrix(cbind(ts.sim1,ts.sim2))
data=zz
lag=1
hs=2
h=5
STNN(data,lag,weight0,weight1,hs,h)
Run the code above in your browser using DataLab