[Gretl-devel] Adding observations within a function

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Thu Jul 30 11:08:14 EDT 2015

On Tue, 28 Jul 2015, Allin Cottrell wrote:

> At the Berlin gretl conference Marcin asked me if it would be possible to 
> enable use of "dataset addobs" within functions.
> I can see the point in this: if you're writing a package that's intended to 
> do forecasting, it would be very useful to be able to add observations, even 
> if just temporarily. This is now in not-CVS [ 
> http://ricardo.ecn.wfu.edu/pub/gretl/gretl-updates.tgz ] and snapshots (on 
> ricardo.ecn.wfu.edu).
> You can use "dataset addobs" in a function only if the end of the sample 
> range, on entry, is the end of the dataset (i.e. $t2 cannot be restricted, 
> though $t1 could be). And when the function exits the extra observations 
> disappear. So if you want to return an out of sample forecast you'd have to 
> do that in the form of a matrix.
> This is experimental: I'd be interested to hear how it works, from people who 
> actually do forecasting!

I'll be honest. This makes me _very_ uneasy, but if I had to put my finger 
on what makes me feel this way, I couldn't. On the other hand, gig could 
benefit greatly from this feature, so I'll try to give it a go.

   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti at univpm.it

More information about the Gretl-devel mailing list