Many thanks, Jack!
I think I'll be abre to bootstrap the confidence intervals by myself. By the way, it would be great to have it as a native function. I am having the feeling that macros use it quite often.
Friendly,
Daniel

El lun., 5 de octubre de 2020 5:43, Riccardo (Jack) Lucchetti <p002264@staff.univpm.it> escribió:
On Mon, 5 Oct 2020, Sven Schreiber wrote:

> What I don't get, however, how Jack wants to estimate the IRFs with that.

That would take a bit more work. Assuming one wants a recursive
identification scheme, here's a way; of course, computing confidence bands
would involve a little extra work, because you'd have to bootstrap the
system.

PS: actually, I'm beginning to think that, given that I find myself
writing functions like the one below over and over again, we may add a
similar function to our native repertoire.

<hansl>
function matrix IRF(matrix A, matrix C, scalar h)
     n = rows(C)
     matrix ret = {}
     matrix M = C
     loop i = 1 .. h --quiet
         ret = ret | vec(M)'
         M = A * M
     endloop

     return ret
end function

set verbose off
open AWM18.gdt --quiet

h = 40
set horizon h
y = log(YER)
c = log(PCR)
i = log(GCR)

list X = y c i
var 1 X --quiet
ii = 2
jj = 1
U_irf = irf(ii,jj)

# estimate VAR with constraints

system name=foo
     equation y const y(-1)
     equation c const X(-1)
     equation i const X(-1)
end system

estimate foo method=sur

moo = IRF($sysA, cholesky($sigma), h)
R_irf = moo[, ii + (jj-1)*3]

PLT = U_irf ~ R_irf ~ seq(0,h-1)'
cnameset(PLT, "unrestricted restricted horizon")
gnuplot --matrix=PLT --output=display --single-yaxis --with-lines
</hansl>

-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti@univpm.it
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/