Help!How to replicate DKL(2013)

Dear all,

Hi, I face some questions in replicating Dedola,Karadi and Lombardo(2013 JME),I have downloaded the codes from Prof. Lombardo’ homepage.I run the mod file but get nothing except a warning and some details of the params and steady states.I am a rookie.I don’t know how to solve the problem.Please help me out!

The warnig says: Some of the parameters have no value ,when using steady. If these parameters are not initialized in a steadystate file, Dynare may not
be able to solve the model…

Many thanks for your attention!!!
DKL_public.zip (93.6 KB)

You can ignore the warning. The authors use a steady state file that provides these parameters. Problematic are only errors.

Dear Jpfeifer,

Thanks for your warm reply…I have added all parameter values in the parameter declaration block,and edited the initval block,and finally the mod file works.But, I don’t know how to explain some command lines in the mod file,like:

…% keyboard
rangeA=[0:.5:2,4:2:10,25:25:150];%[0:2:10];%,20:20:160];
tmprange=rangeA;

%@#include “preloop.m”
%@#include “preloop4.m”
%@#include “preloop_univar.m”

% pos_pol_conv=find_incell(M_.param_names,‘pol_conv’);
% disp(M_.params(pos_pol_conv))
stoch_simul C C_star L L_star Y Y_star Invest_tot Invest_tot_star Rk R Q Q_star spread ppsi phi phi_star N N_star BASS BASS_star;// tau_L tau_L_star ppsi ppsi_star;
if isfield(oo_,‘dr’)
if isfield(oo_.dr,‘ghxx’)
cond_mom_dyn4;
end
end

%@#include “postloop.m”
%@#include “postloop4.m”
%@#include “postloop_univar.m”…

what are the above command lines doing? when ‘%’ lies at the beginning of a line,it is just acted as supplementary instruction,in this case, are those codes named "preloop(4)"and “postloop(4)” actually not called by the mod file,is that right? If so, why authors edited those codes?

Could you please explain it in more details.Thanks for your help…

The lines with

and

are commented out. They do not contain executed code.

[quote=“jpfeifer”]The lines with

and

are commented out. They do not contain executed code.[/quote]

I know,so I don’t understand why author edited the codes that are not used to execute,such as ‘preloop’ and ‘postloop’…

Sorry, but you have to ask them, not me.

Yep…maybe you are right, and many thanks for your advice… :laughing: