Update parameters in a loop
Posted: 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.
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.