Update parameters in a loop

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.

Update parameters in a loop

Postby shr » Tue May 31, 2016 2:40 pm

Hi,

I am running a loop over my model using the resol command. I have log-linearized the model, so all steady state values in oo_.dr.ys (which are automatically updated in each run of resol, if I am not mistaken) are zero. However, my log-linear equations contain some steady state ratios (e.g., K/Y) which I have declared as parameters, and for which I declare analytical solutions. My problem is the following: In each step of the loop, some of my structural parameters are updated (using set_param_value), but the steady state ratios which depend on these parameters are not. Is there an easy way to make sure this happens? I have in mind two ad hoc methods; one is the use of pound-operators, the other is to declare all parameters again by writing, e.g., set_param_value('K/Y',expression for K/Y), but both are a bit tedious.
shr
 
Posts: 10
Joined: Fri Aug 29, 2014 12:48 pm

Re: Update parameters in a loop

Postby jpfeifer » Wed Jun 01, 2016 8:50 am

As outlined in Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf there are several ways to deal with parameter dependence. One is model-local variables (pound operator). Another one is updating the parameters within a steady state file. There is no way around this.
------------
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: Update parameters in a loop

Postby shr » Thu Jun 02, 2016 10:46 am

Thanks jpfeifer for your prompt reply.
shr
 
Posts: 10
Joined: Fri Aug 29, 2014 12:48 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests