These questions are mostly directed to Dynare Team, but I would appreciate any input.
- Can I run a
.mod and make the Dynare preprocessor to produce
- If Yes can give me some pointers on how to do it?
- Also, does this mean that I can I run Dynare in other software besides
- Is that how
McMCDiagnostics(options_, estim_params_, M_, oo_) , the case when mh_nblocks > 1, do you store Multivariate Diagnostics (MDIAG) and Univariate Diagnostics (UDIAG) for Brooks and Gelman test somewhere, or you just produce the graphs in “fname/metropolis/Output”? I am asking because I need them for custom plotting.
For trace plots, when you have more than one block.
- Do you combine the draws from the chains, and after removing the mh_drop sample, you add an MA(200)?
- Is 200 random, or is there a rule to it?
- Do you think that it makes a difference if you plot the chains independently when the number of replication is too big?
- Is there a routine that can calculate recursively the first four moments of the marginal posterior distribution of each parameter to see how fast it reaches the posterior mean, sd, etc? Or alternatively a cusum test? Of course, I can do it myself I am just asking if there is such a thing?
Thanks a lot!
Thanks a lot, Johannes. I appreciate your taking the time to answer all my question.
My questions have been answered for 2,3 and 4.
Just quick follow up question on the first one. So basically, the macroprocessor is parsing all the expressions in the
model etc, and create Matlab-output. The routines are using this info for
estimation or whatever. In other words, the macroprocessor is creating all the input for all the Matlab subroutines? So even If I get the output in
json I would have to reconstruct almost everything. Am I right?
The macro processor only does textual manipulation using the Dynare Macro Processing language. The macro processing step is the first step in the preprocessor. After this step, the preprocessor reads the macro-expanded model written in the Dynare language and processes it, producing Matlab/Octave output.
As @jpfeifer mentioned, in the unstable version of Dynare (future 4.6) we have introduced several options to allow for the preprocessor to produce output in JSON. Those are:
These options are explained in the unstable manual.
As you remarked in your original post, having the JSON output of the preprocessor allows you to use the Dynare language to specify your model and then combine it with your code in whatever language you may so desire. This freed us from producing a separate output for every potential use and, as you say, allows you to easily specify a model and use it in Matlab/Octave/Python/R/Julia/… with your own code. As you know, the preprocessor produces specific code for Matlab/Octave. As you may not know, you can also pass the
julia option to the preprocessor to produce Julia-specific output, which is used in https://git.dynare.org/Dynare/Dynare.jl (a version of Dynare for Julia that is in development).
I wrote a blog post a while ago that was never published showing how to use the JSON output of the preprocessor. It needs to be updated because I have updated the code that parses the equations from JSON. That said, it’ll walk you through the steps to use the JSON output of the preprocessor.
The blog post was published on Jan 28 2020. It can be found here: https://macro.cepremap.fr/article/2020-01/dynare-preprocessor-w-json/
Very interesting article. I wish there were more like that to help us understand the process of dynare and the preprocessor. Let us know when you update the article.
Thank you both.
Hi, the only other preprocessor presentations are:
- This presentation on the macro processor (up to date) macroprocessor.pdf (679.4 KB)
- This presentation on the preprocessor (which is a bit out of date) preprocessor.pdf (495.3 KB)