[Gretl-devel] some function suggestions/questions

Sven Schreiber svetosch at gmx.net
Thu Jul 30 13:31:51 EDT 2009


Allin Cottrell schrieb:
> On Wed, 29 Jul 2009, Sven Schreiber wrote:
> 

> 
>> On a slightly different point, I'm just wondering whether the
>> number of distinct omega values to return should be a function
>> argument, too? What I mean is something like:
>>
>> pergm(x,10,100) -- would mean that the returned matrix has 100 rows
>> pergm(x,10) -- gives you the current default value
> 
> Sven, I think you're implying that the current default is 10 rows.

(No, the '10' was for the Bartlett truncation lag. I knew the number of
rows was sample-dependent, but not the exact formula.)

> In fact it's T/2, where T is the length of the current sample
> after adjusting for any missing values.  I think this is
> reasonable, and if we're going to go further in terms of
> user-level customization that might fairly be confined to the
> fft() function.
>

First, I think it's good to have pergm() as a function mimicking the GUI
functionality, and I have no problem leaving it as it is now.

If it's not just a one- or two-liner to add the optional argument of how
many rows to return it's indeed probably not worth pursuing this thing.
However, in general I'm not sure T/2 is always reasonable. Take
high-frequency financial data for example, where you can have a T of
several thousands easily. Do you want to calculate several thousand
densities then? I would even guess that having more than 314 distinct
frequencies in the [0;\pi] interval (0.01 apart from each other) is
never needed.

thanks,
sven


More information about the Gretl-devel mailing list