I am trying to estimate time series model using gls method.
The data is monthly from sep 1997 to april 2011
First I estimate the model and know that the erorr are IMA(1,1). For that I use the code :
tsdata=ts(data, start=c(1997,9), frequency=12) difftsdata=diff(tsdata) trend = time(difftsdata) model= Arima(difftsdata, order=c(0,0,1), xreg=trend)
My questions are:
Is the code above is apropriate?
How to forecast from this model?
I tried using the following code:
nobs=length(difftsdata) fore=predict(model , 10, newxreg=(nobs+1):(nobs+10)) ts.plot(tsdata,fore$pred,col=1:2)
but the forecast is larger than expected.