[Gretl-devel] Leads and lags reloaded

Allin Cottrell cottrell at wfu.edu
Tue Jul 7 18:50:33 EDT 2015

On Tue, 7 Jul 2015, Sven Schreiber wrote:

> while I was trying to respond to the recent message by José Francisco,I 
> stumbled across the following post:
> http://lists.wfu.edu/pipermail/gretl-devel/2013-March/004379.html
> which suggests to do something like:
> <hansl>
> open data9-7
> list foo = PRIME(2 to -2)
> print foo -o
> </hansl>
> And indeed this works. However, PRIME(+3 to +2) fails, instead you have 
> to swap the numbers around to PRIME(+2 to +3). (PRIME(-3 to -2) also 
> fails.) So it seems that when you want _only_ leads or _only_ lags, you 
> have to provide the numbers by increasing *absolute* value. I'm not sure 
> I see the deeper logic there.
> I would vote for accepting every ordering, or to go for decreasing 
> (non-absolute!) value as in the standard case (-1 to -4).

Granted, gretl's required ordering of lags/leads in this sort of 
expression would seem to be forward in time "to" backward in time, 
_except_ for expressions that involve only leads (or current value). 
I've loosened this up in CVS: for the case of all-leads (possibly 
plus current) we now accept either ordering. For other cases we 
still insist on the forward-to-backward ordering, where I think it's 
reasonably intuitive (and has been around for a long time).


More information about the Gretl-devel mailing list