I tried to run my own .mod file with an external steadystate.m file, but I got the following error message:
Warning: Identifier ‘gamma’ in the evaluated statement does not refer to the external function. In a future release,
using an identifier different to how it is used in the file will not be supported.
In G_1109_steadystate (line 17)
In evaluate_steady_state_file (line 49)
In evaluate_steady_state (line 254)
In steady_ (line 55)
In steady (line 80)
In G_1109.driver (line 280)
In dynare (line 281)
Warning: Identifier ‘alpha’ in the evaluated statement does not refer to the external function. In a future release,
using an identifier different to how it is used in the file will not be supported.
In G_1109_steadystate (line 17)
In evaluate_steady_state_file (line 49)
In evaluate_steady_state (line 254)
In steady_ (line 55)
In steady (line 80)
In G_1109.driver (line 280)
In dynare (line 281)
Warning: Identifier ‘delta’ in the evaluated statement does not refer to the external function. In a future release,
using an identifier different to how it is used in the file will not be supported.
In G_1109_steadystate (line 17)
In evaluate_steady_state_file (line 49)
In evaluate_steady_state (line 254)
In steady_ (line 55)
In steady (line 80)
In G_1109.driver (line 280)
In dynare (line 281)
Warning: Identifier ‘beta’ in the evaluated statement does not refer to the external function. In a future release,
using an identifier different to how it is used in the file will not be supported.
In G_1109_steadystate (line 17)
In evaluate_steady_state_file (line 49)
In evaluate_steady_state (line 254)
In steady_ (line 55)
In steady (line 80)
In G_1109.driver (line 280)
In dynare (line 281)
Not enough input arguments.
Error in beta (line 19)
y = exp(betaln(z,w));
Error in G_1109_steadystate (line 27)
R=1/beta;
Error in evaluate_steady_state_file (line 49)
[ys,params1,check] = h_steadystate(ys_init, exo_ss,M,options);
Error in evaluate_steady_state (line 254)
[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, options,steadystate_check_flag);
Error in steady_ (line 55)
[steady_state,params,info] = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in steady (line 80)
[oo_.steady_state,M_.params,info] = steady_(M_,options_,oo_);
Error in G_1109.driver (line 280)
steady;
Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);
gamma, alpha, delta, beta are parameters, and I already wrote in the parameter block,
I have no idea how to fix this.
I would really appreciate it if someone could help me.
First off, change all instances of alpha, beta etcetera in your both G_1109.mod and G_1109_steadystate.m files to something like alphaa, betaa etcetera so that they don’t conflict with in-built MATLAB functions. I noticed some errors. In your steady state file, this line is there
as you mentioned that I changed all instances of parameters, and then the first error message hasn’t shown up anymore. and I checked the epsilontheta equation, there are no mistakes or mistypos, but I found that I need to solve some variables analytically. I have 19 equations, and 19 unknowns, so I used fsolve to solve them. so I followed DSGE_mod/Gali_2010_calib_target_steadystate.m at master · JohannesPfeifer/DSGE_mod · GitHub to retyped steadystate.m file.
at first time, I got an following erroe message:
fsolve stopped because it exceeded the function evaluation limit,
options.MaxFunctionEvaluations = 1.000000e+04.
I put all the initial values as 0.5. and it didn’t work well.
this is my first time using steadystate.m file within fsolve, so maybe I shoudn’t have changed as I did. Could you please give me any advice about this problem?
Please follow @VS19 advice. There are several mistakes in your first order conditions. For example Z is mean 0, so
y=Z*(l)^(1-alphaa)*k^alphaa;
cannot be right. It needs to be exp(Z). This partially explains the weird steady state Dynare currently finds.
2. It should be
if exitflag <1
%indicate the SS computation was not sucessful; this would also be detected by Dynare
%setting the indicator here shows how to use this functionality to
%filter out parameter draws
check=1; %set failure indicator
params=M_.params;
return; %return without updating steady states
end
That being said, I don’t understand what you are trying to do. Your steady state file seems to be solving the steady state by brute force. That’s what Dynare also usually does.