On Sat, 2 Oct 2010, Sven Schreiber wrote:
Am 02.10.2010 01:28, schrieb Allin Cottrell:
> If you want to set a lower limit to the sample range, t0, such
> that absolutely no values prior to t0 will ever be referenced in
> any context, there are various ways of doing that. The most
> obvious is to set the sample range taking into account gretl's
> known behavior. For example if you want to estimate a VAR of order
> 4 on quarterly data such that no data prior to 1980:1 will be
> referenced, then you set the lower sample limit to 1981:1.
I actually had tried to do something like that, shifting the sample
around by the required amount. The problem then was that the code
resides inside a function, and when I did something like
"smpl -p 0" (or even "smpl -1 0")
gretl gave an error...
The syntax for the +/- form of "smpl" is very specific, so that it
doesn't get confused with the "start end" form: for each limit you
must either (a) provide a literal "+" or "-", or (b) use ";"
to
indicate "unchanged". E.g. "smpl -p +0" or "smpl -p ;".
However, you're right, there is a limitation on doing this inside
a function. You can _advance_ the start OK, as in "smpl +p ;" for
p >= 0, but you can't retard the start. The principle here is that
a function only has access to the data as provided by the caller,
it can't read outside of that range. Note also that if a function
limits the sample range, on exit the range reverts to that set by
the caller.
Allin