On Mon, 10 Nov 2008, jan.limbers(a)prognos.com wrote:
Hi!
One last try before I go back to Eviews :-)
Does anyone - maybe the creators of this gretl feature - know if one can do forecasts
with the
system equation tool? Defining macro-models with equations and identities for example and
estimate
the forecast variables in mutual dependency? And by chance, has anyone done this before
and can
show me the way a little bit?
regards, Jan
I apologise for the scarcity of detail, but the following script should
exemplify what I think you need: it's an example on the Klein model, with
the forecast obtained by filling the exogenous variables with the last
observed value.
<script>
set echo off
set messages off
open klein.gdt
genr W = Wp + Wg
genr A = t - 1931
genr KL = K(-1)
rename I Inv
rename T Tax
Klein <- system
equation C 0 P P(-1) W
equation Inv 0 P P(-1) KL
equation Wp 0 X X(-1) A
identity X = C + Inv + G
identity P = X - Tax - Wp
identity K = KL + Inv
identity W = Wp + Wg
endog C Inv Wp X P K W
end system
estimate "Klein" method=ols
dataset addobs 1
list ALL = dataset
loop foreach i ALL
$i[1942] = $i[1941]
end loop
smpl 1920 1941
fcasterr 1920 1942 C --static --quiet
series Chat = $fcast
fcasterr 1920 1942 W --static --quiet
series What = $fcast
</script>
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti