On Tue, 6 Oct 2020, Sven Schreiber wrote:
Am 06.10.2020 um 09:56 schrieb Riccardo (Jack) Lucchetti:
>
> 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?
Is that a rhetorical question? I mean, the only reason why it doesn't
exist yet is that nobody took the time to write it, right?
No it isn't. So far, we have deliberately avoided to put into the GUG
topics that were overly specialised or technical. If you feel this little
scripts (with adequate commentary) belongs in there, I'd be happy to add a
page or two.
> What do you think?
> ### compute the reduced form VAR representation
>
> matrix A = $sysGamma\$sysA
> matrix b = $sysGamma\$sysB
This is super elegant and concise - is it also correct (combined with
varsimul below)? I dimly remember that there was an issue with the
ordering of the regressors that might be different from what varsimul
expects.
Oh, I wans't aware of that. Care to elaborate?
> matrix X = SimExo * b'
> # simulated disturbances
> E = mnormal(horizon, 3) * cholesky($sigma)'
> # inital values
> list ENDO = Con Inv Inc
> matrix init = {ENDO}[$nobs-1:,]
I guess this is $nobs - maxlag + 1 ?
Yes it is.
> # perform simulation
> Sim = varsimul(A, X + E, init)
Very nice.
Thanks!
-------------------------------------------------------
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
-------------------------------------------------------