On Sun, 4 Oct 2020, Daniel Ventosa-Santaulària wrote:
> Hello everyone,
> I am being asked to estimate a VAR-X; I would like to do it in GRETL, but I
> don´t really know how.
> My understanding of a VAR-X is the following: Suppose 3 variables, X, Y,
> and Z, to be included in a VAR(1).
>
> Yt = a1 Yt-1 + a2 Xt-1 +a3 Zt-1
>
> Xt = a4 Yt-1 + a5 Xt-1 +a6 Zt-1
>
> Zt = a7 Yt-1 + a8 Xt-1 +a9 Zt-1
>
> Suppose further that Y is a macro variable from, say, the US, whilst X and
> Y are macro variables from Mexico. I would like to assume that Y affects X
> and W, but is not affected by X, and Y. Thus, what I need to do is to
> restrict a2 = a3:
>
> Yt = a1 Yt-1
>
> Xt = a4 Yt-1 + a5 Xt-1 +a6 Zt-1
>
> Zt = a7 Yt-1 + a8 Xt-1 +a9 Zt-1
>
> Therefore, Y has its own AR equation. This is not exactly an exogenous
> variables as defined in the GRETL VAR command. At most, what I can do with
> GRETL command is:
>
> Xt = a4 Yt-1 + a5 Xt-1 +a6 Zt-1
>
> Zt = a7 Yt-1 + a8 Xt-1 +a9 Zt-1
>
> But then I lose Y's equation. I could estimate separately the first
> equation and then the other two in a regular VAR, but I was wondering if I
> can directly estimate the VAR with the three variables and restrict two
> specific parameters, as in the first set of equations. My final goal is to
> estimate the IRF Yt -> Xt. Is this feasible in GRETL?
Yes. You can cast the VAR as a system and use the "system" command block.
In the following example, first the VAR estimation is replicated; then,
some restrictions are imposed so that you get what I think you want.
<hansl>
set verbose off
open AWM18.gdt --quiet
y = log(YER)
c = log(PCR)
i = log(GCR)
list X = y c i
var 1 X
# re-do VAR as a system
system name=foo
equation y const X(-1)
equation c const X(-1)
equation i const X(-1)
end system
estimate foo method=sur
# 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
</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/