On Fri, 13 Feb 2015, Gabriela Nodari wrote:
Dear Gretl users,
I have two questions concerning VARs:
1. Is there any built in function in gretl for historical forecast error
variance decompositions?
Not at the moment, but addinbg this to the SVAR package has been on my
to-do list for a long time. I'll see what I can do in the next few days.
2. Is it possible to estimate a recursive linear VAR imposing zero
restrictions on some coefficients? That is, is it possible to estimate a
VAR with a block exogenous set of variables?
If I understand correctly what you want to do, the SVAR package should
make your job relatively painless: I'm attaching an example which uses the
AWM dataset to set up a NK 3-equation model and estimate it under an
identification strategy like the one you describe. For more details, see
the SVAR documentation.
<hansl>
# load the SVAR package
include SVAR.gfn
# use the classic ECB data set
open AWM.gdt --quiet
genr time
genr dummy
# set up the data for the New Keynesian 3-eq model
series y = 100 * hpfilt(ln(YER))
series u = 100 * URX
series p = 100 * sdiff(ln(HICP))
list X = y u p
list exo = const time dq1 dq2 dq3
# find the VAR order via HQC
var 8 X ; exo --lagselect
scalar bestlag = iminc($test[,3])
# set up the model
Mod = SVAR_setup("C", X, exo, bestlag)
Mod["horizon"] = 40
#set up recursive restrictions
SVAR_restrict(&Mod, "C", 1, 2, 0)
SVAR_restrict(&Mod, "C", 1, 3, 0)
SVAR_restrict(&Mod, "C", 2, 3, 0)
#now add two extra restrictions
SVAR_restrict(&Mod, "C", 3, 1, 0)
SVAR_restrict(&Mod, "C", 3, 2, 0)
# estimate the restricted model
SVAR_estimate(&Mod)
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------