On Fri, 8 Mar 2013, Gabriela Nodari wrote:
Dear all,
I would like to know if there is a way to get the residuals from a SVAR
model.
In particular, I would like to save (as a time series) the structural
residuals from
just one equation, since I am interested in only one structural shock, in
order to
make some tests on the "innovations". But I only know how to estimate the
reduced
form VAR and then compute IRFs and FEVDs.
This is now quite easy to do by using the version of the SVAR package I
just uploaded to the server (and which be part of the upcoming new release
of gretl). For example:
1) Open gretl
2) Update your local version of SVAR.gfn (go to Files>Function files>On
server, select SVAR, then righ-click and install)
3) Run the example script below
<hansl>
# open the data and do some preliminary transformations
open sw_ch14.gdt
genr infl = 400*ldiff(PUNEW)
rename LHUR unemp
list X = unemp infl
list Z = const
# load the SVAR package
include SVAR.gfn
# set up the SVAR
Mod = SVAR_setup("C", X, Z, 3)
# Specify the constraints on C
SVAR_restrict(&Mod, "C", 1, 2, 0)
# Estimate
SVAR_estimate(&Mod)
# Retrieve the structural shocks, via the new function
series foo = GetShock(&Mod, 1)
series bar = GetShock(&Mod, 2)
</hansl>
As you will see, the new series "foo" and "bar" have unit variance and
are
mutually orthogonal.
-------------------------------------------------------
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
-------------------------------------------------------