On Mon, 10 Nov 2008 jan.limbers(a)prognos.com wrote:

> 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 variables in mutual dependency? And by chance, has
> anyone done this before and can show me the way a little bit?

Jack has given one example; I'll add another below.  (Yes, I agree
with Sven that this is under-documented at present.)  But first
let me say that when you apply the "fcast" command to a
simultaneous equations system you do get "proper" system
forecasts.  From the help for fcast:

fcast [ startobs endobs ] [ varname ]

"If the last model is a system of equations, varname has [the]
effect [of] selecting a particular endogenous variable for
forecasting (the default being to produce forecasts for all the
endogenous variables). In the system case, or if varname is not
given, the forecast values can be retrieved using the accessor
$fcast, and the standard errors, if available, via $fcerr."

That said, here's an example of using Klein model 1 to produce a
counter-factual forecast for the effects of an increase in
government wage payments from 1933:

<script>
open klein.gdt

genr W = Wp + Wg
genr A = t - 1931
list endo = C I Wp P W X K

Klein1 <- system
 equation C 0 P P(-1) W
 equation I 0 P P(-1) K(-1)
 equation Wp 0 X X(-1) A
 identity P = X - T - Wp
 identity W = Wp + Wg
 identity X = C + I + G
 identity K = K(-1) + I
 endog endo
end system

# Baseline estimate and forecast
estimate Klein1 method=fiml --quiet
fcast 1932 1939 --dyn --quiet
matrix F0 = $fcast

# Increase government wage payments from 1933
series Wgsave = Wg
genr Wg = Wgsave + ((t>1932)? 0.5 : 0)
# print Wgsave Wg -o

# Generate counter-factual forecast
fcast 1932 1939 --dyn --quiet
matrix F1 = $fcast
matrix Fdiff = F1 - F0
colnames(Fdiff, endo)
printf "\nEstimated effects, over 1932-39, of a "
printf "sustained increase in"
printf "\n Wg of 0.5 units, starting in 1933\n\n"
printf "%7.3f", Fdiff
</script>

Allin Cottrell

Reply via email to