Is there a way to suppress *all* Dynare output in Matlab?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Is there a way to suppress *all* Dynare output in Matlab?

Postby dsge_fool » Sun Jun 26, 2011 12:35 am

I am using Dynare for an impulse response matching exercise. This requires running Dynare many times over for different parameter configurations in quick succession.

I know how to suppress all Dynare output related to the solution of the model, but is there a way to suppress the several lines of text it produces when you first call Dynare? You know, this part:


Starting Dynare (version 4.2.1).
Starting preprocessing of the model file ...
Found 13 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

I think eliminating this would speed up the exercise.

Thanks.
dsge_fool
 
Posts: 2
Joined: Wed Jun 01, 2011 12:29 pm

Re: Is there a way to suppress *all* Dynare output in Matlab

Postby jpfeifer » Fri Jul 01, 2011 6:19 am

Hi, suppressing the output is not really what you want (and it is not possible by the way). In the end, you want to avoid preprocessing the model file in each run, because this is what takes the time and needs to be done only once. What you could do is either

1. Integrate the IRF matching into the Dynare mod-file by looping over a stoch_simul command that generates the IRFs.

2. Run Dynare with the preprocessor once. Then directly modify the m-file generated by this run. This has essentially the same effect as 1.

The trick is to use
Code: Select all
set_param('parameter_name',parametervalue)
before running stoch_simul again. If you use approach 2, you can replace the single stoch_simul command in the m-file by your code looping over the parameter-value setting and the stoch_simul IRF generation to minimize the distance.
IMPORTANT: If you use approach 2, you should add the folder with the Dynare mex-file to your path as this is usually done by the Dynare preprocessor and will be missing if you directly run the m-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Is there a way to suppress *all* Dynare output in Matlab

Postby fededipa » Sun Mar 13, 2016 4:18 pm

Hi there,

I am trying to code impulse response matching but the parameter that I want to loop over affect the steady state of the model? Do I have run dynare every time I loop over a set of parameters? I am not sure looping over stoch_simul is what I should be doing?

Help is much appreciated. Many thanks.

Fede
fededipa
 
Posts: 2
Joined: Sun Mar 13, 2016 4:12 pm

Re: Is there a way to suppress *all* Dynare output in Matlab

Postby jpfeifer » Mon Mar 14, 2016 8:01 pm

Yes, you should be looping over stoch_simul using the construction outlined in
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891
Whenever resol (or stoch_simul) is called, the steady state is recomputed.
You can also work from the replication codes to Born/Pfeifer (2014): "Risk Matters: A comment" at https://www.aeaweb.org/articles.php?doi=10.1257/aer.104.12.4231. Essentially, instead of solving the model and simulating it within the objective function to compute the distance between simulated and empirical moments, you retrieve the model IRFs and then compute the distance.

I plan on providing an example of this soon.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 14 guests