I am learning Dynare to solve DSGE problems. Now I am trying to use external Matlab file to compute steady state, with the help of the example “NK_baseline_steadystate.m”.
I have try my best to linearized the .m file. But the mod file failed to run with error message"Error using print_info (line 90) The steady state contains NaN or Inf Error in steady (line 104) print_info(info,options_.noprint, options_); Error in DynareStudystochastic (line 147) steady; Error in dynare (line 235) evalin(‘base’,fname) ;".
However, when I try to use the equations to compute steady state by another .m file, it works.
I have no idea what’s wrong with my ‘DynareStudystochastic.m’ file.
Thank you professor, I really appreciate your reply~ your memory is really good hahaha!
I would like to further inquire about the result of my code running,
Starting Dynare (version 5.2).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Found 30 equation(s).
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
Processing outputs …
Randomize initial guess…
Residuals of the static equations:
Equation number 1 : NaN : c
Equation number 2 : NaN : 2
Equation number 3 : NaN : 3
Equation number 4 : NaN : k
Equation number 5 : NaN : zt
Equation number 6 : NaN : kt
Equation number 7 : NaN : ft
Equation number 8 : NaN : labt
Equation number 9 : NaN : mt
Equation number 10 : NaN : nt
Equation number 11 : NaN : wt
Equation number 12 : NaN : zg
Equation number 13 : NaN : kg
Equation number 14 : NaN : fg
Equation number 15 : NaN : labg
Equation number 16 : NaN : mg
Equation number 17 : NaN : ng
Equation number 18 : NaN : wg
Equation number 19 : NaN : 19
Equation number 20 : NaN : pt
Equation number 21 : NaN : m
Equation number 22 : NaN : n
Equation number 23 : NaN : w
Equation number 24 : NaN : ce
Equation number 25 : NaN : g
Equation number 26 : NaN : y
Equation number 27 : NaN : 27
Equation number 28 : NaN : 28
Equation number 29 : NaN : 29
Equation number 30 : NaN : 30
Error using print_info (line 32)
The steady state has NaNs or Inf.
Error in steady (line 102)
Error in trans.driver (line 380)
Error in dynare (line 281)
when this happens, what is the likely cause of the problem?
Thanks for your reply, but I don’t quite understand. I assigned initial values to endogenous variables in the “initval” block. Do I need to assign initial values to all types of variables in the “initval” block?
What I think is that once the values of some endogenous variables are determined, the values of the remaining endogenous variables can be determined using the formula in the “model” block. I don’t know if this understanding is correct ?
Thank you Professor. Based on the problem you pointed out, I have also assigned values to the remaining endogenous variables according to the equation in the “model” block. However, dynare is currently unable to calculate the steady-state value. Can you help me see where the problem lies?
None of the solvers seems to be able to find the steady state. Are you sure there is a unique steady state that can be computed analytically? Have you tried computing the steady state analytically? Often that is the only way to properly debug the model.