Am 02.10.2010 01:28, schrieb Allin Cottrell:
On Sat, 2 Oct 2010, Sven Schreiber wrote:
> in a time-series context, the behavior of gretl to use initial values
> from before the current sample range (if they are available in the
> workfile) is causing me trouble in writing (bootstrap) scripts. It's
> hard to write a script that will work at the same time when the whole
> datarange is used, or when a subsample is selected.
I think I know what you're talking about: if you set the sample to
start at observation t0, gretl will nonetheless make use of
observations prior to t0 (if available) for models that reference
lagged values of some variables.
yes
My assumption to date has been that this is what most users would
want, most of the time. Even if I'm wrong in that assumption we're
unlikely to change that in a hurry, since any change would
obviously be backward-incompatible.
sure
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 (and I'm pretty sure that was with a subsample
active, i.e. it would have been possible to move the starting
observation back by one inside the workfile/availabe datarange. I
assumed that such "smpl" constructs weren't allowed inside functions,
but maybe that's where the solution is to be found.
thanks,
sven