[Gretl-devel] NA patch for fracdiff functions

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Wed Jul 1 11:01:33 EDT 2009

On Sat, 20 Jun 2009, Allin Cottrell wrote:

> On Sat, 20 Jun 2009, Klein, Christoph wrote:
>> the current behaviour of fracdiff when invoked with a series
>> containing NAs is to issue an E_DATA error. I propose that in
>> this case fracdiff returns a series of NAs. I think returning
>> NAs would be more in line with the rest of gretl, but I'm not
>> sure. The attached patch changes the fracdiff function in the
>> proposed way.
> Thanks.  Jack's away from home right now; since fracdiff is his
> baby I think I'll wait and let him make the judgement on that.

I think Christoph is right in that one NA in the series shouldn't stop 
execution. However, since fractional differencing is a one-sided filter, I 
think we may happily carry on until the first NA is found; this may be 
especially useful if you've got a series where the missing observation is 
near the end. I just committed a smoll modification to lib/src/genfuncs.c 
to that effect. Please review!

Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche

r.lucchetti at univpm.it

More information about the Gretl-devel mailing list