On Sat, 31 Jan 2015, Stefan A. wrote:
Dear fellow gretl users,
I recently started using gretl for a project that requires analysis of
VECM (Vector Error Correction models) impulse response functions for a
relatively large number of different samples and models. To summarise
the results, I would like to calculate the cumulated impulse responses
and, since I am new to gretl, I was wondering what would be the best
way to do so? Do there exist pre-made function packages for this
purpose? If not, how would one approach this in terms of retrieving the
values from the irf matrix and writing a function?
Any help would be appreciated! Thank you in advance!
Unless I'm mistaken, this is quite easy; for example:
<hansl>
open denmark
vecm 2 1 LRM LRY IBO IDE
set horizon 40
cumIRF = cum($vma)
</hansl>
However, I have two econometric remarks on this (feel free to ignore them
of course if they are not applicable to your case).
1 - you should be aware that the $vma matrix is just a mechanic inversion
of the VAR parameters and has no meaningful economic interpretation per
se. Apart from the problem of fundamentalness (Lippi-Reichlin), it is not
even interpretable in terms of structural shocks, unless you make some
sort of identification assumption, and the literature on this is enormous.
If you wanted to replicate the "classic" IRF analysis you get by a
recursive identification scheme, you'd have to do something like this:
<hansl>
open denmark
vecm 2 1 LRM LRY IBO IDE
set horizon 40
K = cholesky($sigma)
IRF = $vma * (K ** I(4))
print IRF
</hansl>
2 - I don't think you need to _cumulate_ the IRFs from a VECM: a VECM is
just a way to rewrite a VAR that contains a few unit roots by contruction,
which causes the IRFs to thave a non-zero limit without cumulating them. I
fail to see any meaningful interpretation for a cumlated IRF (unless
you're purposedly playing with I(2) trends).
Hope this helps!
-------------------------------------------------------
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
-------------------------------------------------------