On Sun, 14 Jun 2009, Allin Cottrell wrote:
On Sun, 14 Jun 2009, Klein, Christoph wrote:
> I'm using the autoreg feature of gretl quite often. Recently I
> came across some inconsistencies when combining lagged and
> non-lagged series within functions. I have attached a sample
> script that creates 3 series using different autoreg statements.
> Mathematically these statements are equivalent, but they yield
> different results.
> For the last statement, gretl caches the initial result of the
> fracdiff call and recycles these results for each autoregression
> iteration. I have attached a one-line patch which disables this
> behaviour.
I think your change is correct, and I've committed it to CVS.
Jack, could you confirm this?
IIRC, the reason the source code had the "starting(p)" clause was because
of performance reasons. I'm all in favour of syntax consistency and, as a
consequence, I welcome the change (oh, and by the way, thanks Christoph,
nice job!); however, IMO some testing is needed to see what the impact on
speed is.
That said, I think that statements like "series y = 1 + y(-1)" are ok for
quick-n-dirty jobs, but for more general arma-like manipulations of time
series (especially in scripts) I'd strongly advise everyone to use the
recently introduced "filter" function.
> Additionaly for my diploma thesis I have added a command to
> gretl which computes the bessel function. The function is
> implemented using the gsl library. I would like to contribute
> this to gretl, too, but I don't know how you feel about linking
> against gsl? I have seen that you use a copy of cephes functions
> for some calculations, but AFAIK cephes doesn't provide bessel
> functions for non-integer orders. If this has a chance of
> inclusion I will clean up my implementation, write some docs and
> submit this as a patch.
Thanks! For the present, however, I would prefer not to add a
dependency on libgsl. I'll take a look at the cephes bessel code;
I think it does handle non-integer orders, though perhaps not as
fully as gsl.
On the subject of special functions: I've been thinking for a while that
the beta and digamma functions could also be quite handy. Now, if
Chreistoph had a little time to spare... :-)
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti