I have developed a two-sector DSGE model, similar to Iacoviello & Neri (2010). When I try to get the impulse responses, it appears this message:
Error using print_info (line 83)
Impossible to find the steady state. Either the model doesn’t have a steady state, there are an infinity of steady
states, or the guess values are too far from the solution
Error in steady (line 104)
Error in new_code (line 277)
Error in dynare (line 235)
I tried to begin with a simpler model with one sector but still, the code is not running. I tried also to find the steady-state analytically in order to change the initial values, but I failed to do so, since it is a model with 22 equations and 22 unknowns. Any further suggestions?
I would write either the non-linear model (my favourite option) or the linearized model. You are doing a mixed of the two approaches. For instance, labor demands are linearized, euler equation is not. So it is not clear to me whether your variables are expressed in log deviations from the steady state, in levels, or in logs. Hence, Dynare has trouble in computing the ss. Instead, if you linearized the model and every variable is in deviations from the ss, then the ss should be a vector of 0.
Additional to valerio8’s command, when you decide on applying the pure non-linear form. You should then use the resid; command so you can see what equations still have residuals that are significantly different from zero, in your current case many. With this tool you should pin down what equations are problematic.
Thank you both for your answers!
Following your suggestions, I managed to log-linearize the model and upload all the equations on dynare in a log-linear form. Now, dynare gives me the steady-state values but another problem appears: “Blanchard Kahn conditions are not satisfied: indeterminacy”. Another problem is that some of the theoretically non-negative variables, take negative values in SS.
what puzzles me is that the steady state is not a vector of 0, even if all variables are log-linearized around the steady state. If all variables are in log-deviations from the steady state, in Dynare the ss should be a vector of 0.
keep in mind this: suppose you take a log linearization of the model with pencil and paper. So for each variable X you are defining variable x as follows:
x=log(X/Xss). When you move to Dynare, if you give to Dynare the log-linearized model, each variable x will have a ss of 0: the ss of a variable in deviation from the ss is 0 by definition. If this is not the case, there is something wrong in your log-linearization.
I would do the following.
Use the command steady_state_model instead of initval.
Set the ss of all log-linearized variables to 0
Dynare will tell you the equations where a ss of 0s is not correct. This means that those equations are not linearized correctly. For instance, I see that you write the linearized PC as follows:
For the record, the first problem was that the PC was incorrectly log-linearized as valerio88 has stated above. By fixing the PC, the steady-state values for my linearized variables became a vector of zeros (as supposed to be).
The second problem was that some signs were incorrect in the housing equations. When I changed those, I finally managed to get the impulse responses.