[Gretl-devel] Adding observations within a function

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Fri Jul 31 09:38:47 EDT 2015

On Fri, 31 Jul 2015, Sven Schreiber wrote:

> Well yes and no. It would be impossible to write a function package to
> do forecasting because of the limitations. So "asking the user to go for
> (a)" in this context would seem to imply you cannot use a contributed
> package as with other applications, instead the user has to do at least
> some of the prep work herself.
> I guess it is conceivable in principle that the out-of-sample range
> itself becomes an argument of the function call: Suppose gretl had a new
> sample-range object type. Then the user/caller could supply the
> sample-to-be-added as an argument to the function that does some
> out-of-sample forecasting. That way the responsibility of "mucking" with
> the dataset remains with the caller, but the function would be capable
> of producing out-of-sample results.

Yes, this is true. As long as the "encapsulation principle" is safe (what 
happens in the function stays in the function), I'm ok with this.

   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