I'm going back to a discussion we had last month to ask you guys your
opinion: would it be wortwhile to add a paragraph to the GUG chapter on
systems with an example on how to simulate from such a system?
I prepared a little example script (see below), that doesn't make much
sense from an economic point of view, but illustrates the main techniques.
What do you think?
<hansl>
set verbose off
open AWM18.gdt --quiet
Con = log(PCR)
Inv = log(GCR)
Inc = log(YER)
list EXO = const time
### estimate the system via FIML
system method=fiml
equation Con EXO Con(-1) Inc(0 to -1)
equation Inv EXO Inv(-1) Inc(-1)
equation Inc EXO Inc(-1 to -2) Inv(-1)
end system
### compute the reduced form VAR representation
matrix A = $sysGamma\$sysA
matrix b = $sysGamma\$sysB
### produce the simulation
scalar horizon = 12
# future values of the exogenous variable
matrix SimExo = 1 ~ seq($nobs + 1, $nobs + horizon)'
matrix X = SimExo * b'
# simulated disturbances
E = mnormal(horizon, 3) * cholesky($sigma)'
# inital values
list ENDO = Con Inv Inc
matrix init = {ENDO}[$nobs-1:,]
# perform simulation
Sim = varsimul(A, X + E, init)
</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
-------------------------------------------------------