On Sun, 24 Nov 2024, Artur T. wrote:
[...]
Here is another example for which also the last two observations
are missing.
<hansl>
open AWM18.gdt
h = 3
smpl ; 2016:4
ols ldiff(YED) const ldiff(YED(-1)) --quiet
# ERROR: No oos forecasts shown
# No difference if omitting "--out-of-sample"
fcast h --recursive --out-of-sample
</hansl>
The basic problem here is the same one I indicated in my response to
Sven. The independent variable is expressed in such a way that it's
not apparent to gretl that it's just the first lag of the dependent
variable -- so gretl doesn't know that it's a dynamic model. But in
addition (unlike Sven's case), in this example the generation of
log differences is confined to a subsample, so you can't get any
forecasts out of sample.
You seemed to indicate that if the following statements were added
to the script above
<hansl>
smpl 2017:1 $tmax
series fc = $fcast
print fc -o
</hansl>
you would see two forecast values. But I think you'll find if you
append those statements to the original above and run the whole
script from scratch you get
? series fc = $fcast
The statistic you requested is not available
Terminated on error
You also said you'd expect to see "only a single h=3 forecast value
at date 2017:3". I can understand why that might be expected (modulo
the issue over the independent variable in the regression). But
actually if you request a k-step recursive forecast with the
--out-of-sample option, gretl moves the end of the first estimation
sample back such that the first out-of-sample observation is k steps
ahead of the last data used in estimation (if possible). That's no
doubt debatable, and may not be totally in agreement with the help
text, but that's what it does.
Allin