Hi,

I was playing around and I think I noticed a bug in ARMA prediction, or I am missing something. You can find the data to replicate here

http://www.pastie.org/4120330

I am on a recent CVS checkout. gretl 1.9.9. I don't know cvs well enough to get more information.

It's yearly sunspot activity starting in 1700. I don't know a better way to demonstrate this, so here it goes. The estimated coefficients of the exact MLE ARIMA(9,0,0) model with a constant are

48.3243      
1.16071    
-0.395382  
-0.166341  
0.150446  
-0.0943926  
0.00906281
0.0520530  
-0.0858436  
0.252392

The sum of the AR parameters is something like

0.882703

So the expected level of the process is

mu = 48.3243 * (1 - 0.882703) = 5.6682382

Now if I go to Analysis -> Forecasts. Chose start 1700 and end whatever. Select the dynamic forecast radio button. You'll see that the first prediction is 11.2 in 1709. This is fine and expected. The next prediction is 9.5. This is not expected. If you replace the actual endogenous variable at 1709 with 11.2 and do the math, you don't get 9.5.

5.6682382 + 11.0 * 0.2524 + 16.0 * -0.0858 + 23.0 * 0.0521 + 36.0 * 0.0091 + 58.0 * -0.0944 + 29.0 * 0.1504 + 20.0 * -0.1663 + 10.0 * -0.3954 + 11.23057 * 1.1607

This equals 13.24, which is also what I get from other software such as Stata. There aren't any pre-sample residuals or anything coming in to play, so I'm not sure how the prediction could be 9.5. Obviously after a time, the prediction converges to the long run mean, but the initial predictions don't seem right to me.

Please let me know if anything isn't clear or if I'm being dense.

Thanks,

Skipper