I have fitted the ARIMA models to the original time series, and the best model is ARIMA(1,1,0). Now I want to simulate the series from that model. I wrote the simple AR(1) model, but I couldn't understand how to adjust the difference within the model ARI(1,1,0). The following R code for AR(1) series is:
phi= -0.7048 z=rep(0,100) e=rnorm(n=100,0,0.345) cons=2.1 z=4.1 for (i in 2:100) z[i]=cons+phi*z[i-1]+e[i] plot(ts(Y))
How do i include the difference term ARI(1,1) in above code. Any one help me in this regard.