Hi everyone,
I am trying to compare and Monetary policy , fiscal policy and environmental policy in an NK model using the standard consumption-equivalent measure. I found the mod file for Born and Pfeifer (2018) and have been working to replicate it. I have attached my files below. I get the following errors when I try to calculate lamda_utility using the solver:
Error using feval
Undefined function ‘get_consumption_equivalent_unconditional_welfare’ for input arguments of type ‘struct’.
Error in csolve (line 62)
f0=feval(FUN,x,varargin{:});
Error in ED.driver (line 1983)
lambda_unconditional_demand=csolve(‘get_consumption_equivalent_unconditional_welfare’,0,1e-8,1000,M_,oo_,options_)
Error in dynare (line 310)
evalin(‘base’,[fname ‘.driver’]);
I tried to search up on what these errors mean but it’s still not very clear to me. I have attached the updated mod file and m file. Could you please take another look and suggest on what I should try next? Thank you! ED.mod (7.9 KB) get_consumption_equivalent_conditional_welfare.m (2.7 KB)
I don’t really understand what you try to achieve here, but clearly you are missing a file. You should download this one from @jpfeifer repository:
Also there is a typo in the list of endogenous variables. Dynare is case sensitive, you have to replace Welfare_Gap (in your mod file) by Welfare_gap (which is expected by the matlab routine).
On my laptop the code is crashing because of the hundreds of generated plots (java error), I had to use the option nograph in stoch_simul.