Hi,

I am trying to conduct a sensitivity analysis following the code from Professor Pfeifer (Ascari_Sbordone_2014.mod). But an error has been reported and I don’t know how to proceed.

lambda_pi_vec=linspace(0,4,200);

rho_B_vec=linspace(0,0.04,200);

[lambda_pi_mat,rho_B_mat]=ndgrid(lambda_pi_vec,rho_B_vec);

Z_plot=zeros(size(lambda_pi_mat));

for lambda_pi_iter=1:length(lambda_pi_vec)

for rho_B_iter=1:length(rho_B_vec)

set_param_value(‘lambda_pi’,lambda_pi_mat(lambda_pi_iter,rho_B_iter));

set_param_value(‘rho_B’,rho_B_mat(lambda_pi_iter,rho_B_iter));

[dr,info]=resol(0,M_,options_,oo_);

info_mat(lambda_pi_iter,rho_B_iter)=info(1);

end

end

Z_plot(info_mat==0)=1;

figure

contourf(lambda_pi_mat,rho_B_mat,Z_plot,1)

xlabel(’\lambda_\pi’)

ylabel(’\rho_B’)

Reference to non-existent field ‘kstate’.

Error in stochastic_solvers (line 208)

kstate = dr.kstate;

Error in resol (line 103)

[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);

Error in ModelLinOtavio.driver (line 318)

[dr,info]=resol(0,M_,options_,oo_);

Error in dynare (line 293)

evalin(‘base’,[fname ‘.driver’]) ;

Thanks!