Identification Tools -- memory issue?

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.

Identification Tools -- memory issue?

Postby erlingnb » Fri Jun 09, 2017 2:02 pm

Hi People
I am trying to use the Identification Tools (developed by Ratto) in Dynare. I have a pretty large model (perhaps 80 parameters, 25 shocks), and when I run the model I get the following error message:

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Substitution of endo lags >= 2: added 10 auxiliary variables and equations.
Found 288 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
- order 2
- derivatives of Jacobian/Hessian w.r. to parameters
Computing dynamic model derivatives:
- order 1
- order 2
- derivatives of Jacobian/Hessian w.r. to parameters
terminate called after throwing an instance of 'St9bad_alloc'
what(): std::bad_alloc

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.



Not really sure what is going on. I googled "terminate called after throwing an instance of 'St9bad_alloc'", and to me it looks like this is a C++ error, and has something to do with running out of memory.

Is there a way to fix some of the parameters, so that Dynare doesn't need to take the derivatives of all the parameters?

Thanks!
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm

Re: Identification Tools -- memory issue?

Postby jpfeifer » Fri Jun 09, 2017 4:08 pm

Please try the unstable version where you have a 64bit preprocessor.
------------
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: Identification Tools -- memory issue?

Postby erlingnb » Mon Jun 12, 2017 10:21 am

jpfeifer wrote:Please try the unstable version where you have a 64bit preprocessor.
Thanks! I will try version 4.5.

But does anyone know if it is possible to fix some of the parameters, so Dynare doesn't use processing capacity on taking derivatives wrt all paramaters?
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm

Re: Identification Tools -- memory issue?

Postby jpfeifer » Mon Jun 12, 2017 6:08 pm

In this case, you would need to hardcode the values. The preprocessor will try to take the derivative with respect to everything that is defined in
Code: Select all
parameters ...;
------------
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: Identification Tools -- memory issue?

Postby erlingnb » Thu Jun 15, 2017 11:12 am

Thanks for suggestions.

We have now tried Dynare Version 4.5.0 and also a new server with 64 gb of memory. It seems like Dynare is able to compute the derivatives wrt the parameters, but it crashes when "testing prior mean". Memory usage goes to 99% while taking the derivatives and while testing the prior mean. After a while Matlab crashes and it creates a file called "hs_err_pid5296.mdmp" which (after googling) seems to indicate an out-of-memory-problem.

Any suggestions on how to proceed? Do you think that the model size or the number of parameters are a problem?
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm

Re: Identification Tools -- memory issue?

Postby jpfeifer » Fri Jun 16, 2017 7:57 am

It is a combination of model size and number of parameters. What you could try is limit the derivative order with respect to the parameters via the
Code: Select all
params_derivs_order

option of the preprocessor. See the manual
------------
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: Identification Tools -- memory issue?

Postby erlingnb » Fri Jun 16, 2017 9:21 am

jpfeifer wrote:It is a combination of model size and number of parameters. What you could try is limit the derivative order with respect to the parameters via the
Code: Select all
params_derivs_order

option of the preprocessor. See the manual

Thank you, Johannes! This actually worked very well! But can you kindly explain what we lose in terms of identification when we specify "params_derivs_order=1"? The full procedure took less than a minute now. We tried to read the manual, but we didn't get any answers.

We have a couple of more questions, though:
1. Our model has around 70-80 parameters, but we only see the identification strength graph for 26 parameters. Is this a figure limit, or what is going on?
2. We get negative values for some parameters in the identification strength graph. Is this normal? How do we interpret that?
3. Dynare doesn't save the results of the identification or any graphs in our folder -- it seems it does not create an identification folder. How can we fix this?

Thank you so much for your kind help! You are of great assistance!
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm

Re: Identification Tools -- memory issue?

Postby jpfeifer » Sat Jun 17, 2017 3:25 pm

If I understand it correctly, we don't lose anything for identification, as it only relies on the Jacobian, not on the Hessian. See https://github.com/DynareTeam/dynare/issues/1187

1. Can you provide me with the file to have a deeper look?
2. Identification strength is measured in logs. For the interpretation, see Pfeifer (2014): "An Introduction to Graphs in Dynare" at https://sites.google.com/site/pfeiferecon/dynare
3. Again, I would need to see the 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: Identification Tools -- memory issue?

Postby erlingnb » Mon Jun 19, 2017 8:31 am

jpfeifer wrote:If I understand it correctly, we don't lose anything for identification, as it only relies on the Jacobian, not on the Hessian. See https://github.com/DynareTeam/dynare/issues/1187

1. Can you provide me with the file to have a deeper look?
2. Identification strength is measured in logs. For the interpretation, see Pfeifer (2014): "An Introduction to Graphs in Dynare" at https://sites.google.com/site/pfeiferecon/dynare
3. Again, I would need to see the file.


Hi
Thank you for your reply. We have sent you a private message regarding the files. Looking forward to hearing from you.
Thanks a lot!
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm

Re: Identification Tools -- memory issue?

Postby jpfeifer » Thu Jun 22, 2017 8:05 am

Hi, I had a look at the file
1. The reason that there are only 26 parameters is that identification strenght is only tested for estimated parameters. Your estimated_params-block contains 26 parameters.
3. When I run the file, the graphs are stored in
nb_nemo_model/identification
------------
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: Identification Tools -- memory issue?

Postby erlingnb » Wed Jun 28, 2017 8:35 am

jpfeifer wrote:Hi, I had a look at the file
1. The reason that there are only 26 parameters is that identification strenght is only tested for estimated parameters. Your estimated_params-block contains 26 parameters.
3. When I run the file, the graphs are stored in
nb_nemo_model/identification

Dear Johannes,
Thank you for looking at our file, and for pointing out the (rather embarrassing) mistake from our side. We managed to get identification results for all relevant parameters now. Thanks a lot!

One more question on interpreting the results: In your very helpful paper, An Introduction to Graphs in Dynare, on page 33, you write that "the larger the absolute value of the bars, the stronger is the identification." Ratto, however, writes that "the model parameters on the x-axis are ranked in increasing order of strength of identification." (link to the paper provided below). This makes me a little confused on how to interpret large negative values. Are these parameters well identified (large absolute value), or weakly identified (parameters with negative values are always pushed to the left in the graphs). Is this related to the log-scale? So large negative values (in logs) are actually close to zero (when raised to the power of e)?

Thank you for clearing up! We deeply appreciate your assistance.

Ratto paper (page 40): https://www.ifk-cfs.de/fileadmin/downlo ... fFinal.pdf
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm

Re: Identification Tools -- memory issue?

Postby jpfeifer » Thu Jun 29, 2017 7:58 am

Thanks for pointing out this mistake in my paper. Of course, I was wrong and Marco is right. Due to the use of a log-scale, no identification would mean a value of -Inf, with stronger identification meaning bigger values. The graph is indeed ordered in direction of increasing identification strength (measured relative to the parameter value). I have updated the pdf online.
------------
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: Identification Tools -- memory issue?

Postby erlingnb » Thu Jun 29, 2017 8:10 am

jpfeifer wrote:Thanks for pointing out this mistake in my paper. Of course, I was wrong and Marco is right. Due to the use of a log-scale, no identification would mean a value of -Inf, with stronger identification meaning bigger values. The graph is indeed ordered in direction of increasing identification strength (measured relative to the parameter value). I have updated the pdf online.

Okay, thanks! Glad I could be of some assistance!
erlingnb
 
Posts: 8
Joined: Fri Jun 09, 2017 1:45 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests