On Tue, 18 Jan 2005, ibert wrote:

> By the way: it's a new nice feature that the AR / MA lags of the Dickey Fuller
> Test are now possible with more than 4, but it's not possible to set an lag
> order higher than 4 in the ARMA model - WHY?

This was originally done because we weren't so sure of the convergence
properties of the algorithm we have (which isn't particularly
sophisticated, nor fine-tuned fr ARMA models): if you want higher ARMA
orders, you can download the source form CVS and apply the following patch
(which sets the maximum to 6), but beware: it is VERY unusual to need ARMA
models of order higher than (4,4) to model a series satisfactorily (we
don't have seasonals yet, but that's another story).



Index: plugin/arma.c
===================================================================
RCS file: /cvsroot/gretl/gretl/plugin/arma.c,v
retrieving revision 1.49
diff -u -r1.49 arma.c
--- plugin/arma.c       25 Nov 2004 00:55:49 -0000      1.49
+++ plugin/arma.c       18 Jan 2005 22:10:06 -0000
@@ -30,6 +30,8 @@

 #undef ARMA_DEBUG

+#define MAX_ARMA_ORDER 6
+
 static void add_arma_varnames (MODEL *pmod, const DATAINFO *pdinfo)
 {
     int p = pmod->list[1];
@@ -391,8 +393,8 @@
     if (list[0] < 4) err = 1;

     /* for now we'll accept ARMA (4,4) at max */
-    else if (list[1] < 0 || list[1] > 4) err = 1;
-    else if (list[2] < 0 || list[2] > 4) err = 1;
+    else if (list[1] < 0 || list[1] > MAX_ARMA_ORDER) err = 1;
+    else if (list[2] < 0 || list[2] > MAX_ARMA_ORDER) err = 1;
     else if (list[1] + list[2] == 0) err = 1;

     /* remove const from list of regressors (ARMAX), since it


Riccardo `Jack' Lucchetti
Dipartimento di Economia
Università di Ancona

jack(a)dea.unian.it
http://www.econ.unian.it/lucchetti


Reply via email to