Set a large number of parameters

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.

Set a large number of parameters

Postby E.Tolva » Tue Jun 13, 2017 6:29 pm

Hi everybody,

I am currently trying to simulate a DGE model in international trade, it consists in 5 non-linear equation for each country that in my dataset are 67. This vast number of equations requires that I have to set values for an even larger number of parameters: I have all the values already define in an xlsx files and I was wandering if there is a way to avoid to set them manually
e.g.
parameter alpha beta;
alpha = 0.55;
beta = 0.98;
but instead to upload the vector of all the values and just recall the specific value in the equation when it is needed.

I hope that I made myself clear,

Thank you all for the help,

Edoardo
E.Tolva
 
Posts: 1
Joined: Tue Jun 13, 2017 6:15 pm

Re: Set a large number of parameters

Postby jpfeifer » Wed Jun 14, 2017 4:48 pm

If your Excel file contains the names of the parameters and the values, you can easily write a small script writing the corresponding variable definitions. If the ordering in the Excel file conforms with the one in the parameters statement, you can also load the parameter vector from Excel and assign it to M_.params wholesale. The latter, however, is more errorprone than the first one.
------------
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: Google [Bot] and 12 guests