Which subroutine generates ghx and ghu?

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.

Which subroutine generates ghx and ghu?

Postby Nick » Sun Jun 12, 2016 5:26 am

Hi, How can I generate decision-rule matrix (ghx and ghu) by giving a set of parameters (My model is linear)?
Since I'd like to make it in a loop, it is convenient for me to use a subroutine that takes parameters as input and generates ghx and ghu as outputs. In version 3, dr1.m could be used on this purpose but I am now using version 4.3.3...
Any advice would be appreciated.
Nick
 
Posts: 2
Joined: Sun Jun 12, 2016 5:02 am

Re: Which subroutine generates ghx and ghu?

Postby jpfeifer » Sun Jun 12, 2016 2:55 pm

By iterating over set_param_value and resol.m. See e.g. the replication codes to Born/Pfeifer (2014): Risk matters: Comment at the AER. In smm_diff_function.m, we loop over something like this:
Code: Select all
%% set parameter for use in Dynare
set_param_value('sigma_x',xopt(1)); % TFP volatility

[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_); %run model solution in Dynare

if info %solution was not successful
    fval=Inf; %return with penalty
else
    % compute what you want here 
end


See also http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891
------------
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: Which subroutine generates ghx and ghu?

Postby Nick » Mon Jun 13, 2016 6:36 am

Johannes, I appreciate your support! It is really valuable.
Nick
 
Posts: 2
Joined: Sun Jun 12, 2016 5:02 am


Return to Dynare help

Who is online

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