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.
Arimauses maximum likelihood. 2. What is your model? You mention the error, but what is the variable you are trying to model? 3. You say that the forecast is larger than expected, how do you know that? – mpiktas May 21 '11 at 5:57