# Log-linearized models cannot find steady states

Dear all,
I am a beginner learning DSGE model，And I wrote a model to simulate the effect of tax policy, but it didn’t work. This model is the log-linearized model, The endogenous variable is expressed as the deviation variable, the initval is set to 0. The error message is as follows:

Error using print_info
The steady state has NaNs or Inf.

And I added the command “options_.debug = 2” to the code, which shows the following result:

``````     STEADY:  The Jacobian at the initial values contains Inf or NaN. The problem arises from:

Derivative of Equation 13 with respect to Variable Pm  (initial value of Pm: 0)
Derivative of Equation 18 with respect to Variable Pm  (initial value of Pm: 0)
Derivative of Equation 33 with respect to Variable Pm  (initial value of Pm: 0)
Derivative of Equation 33 with respect to Variable M  (initial value of M: 0)
STEADY:  numerical initial values or parameters incompatible with the following equations
13    18    33
``````

The residuals of these three equations （13 18 33）are not zero. I wonder if there was a mistake in linearizing these equations（13 18 33）or is there a problem with the parameters? How can I solve this problem? Thank you very much. And the mod file is attached.

code8.mod (5.7 KB)

Are you sure that your equations are log-linearized?
The first thing I found was the in the definition of Pmss you divided by lambda and not what I guess you want to lambda1. Since lambda is a variable Dynare set it to zero, ie divided by zero and thus had Pmss as Inf.
Regarding the equations not being linear. First of all you have to tell Dynare that your model is linear. This means you have to put model(linear) in the beginning. Running this then tells you that some equations are not linear. For example in equation 13 you have parts like (1+Pm). But in a log-linear model all variables have zero steady state and thus also the equations should have zero on both sides. Parts like these however leave numerical values.

Thanks a lot for your answer, which helped me find the mistake that I had not noticed. Then I will continue to revise my model.

In addition, I have another question to ask. My other model ran out of the impulse response diagram, but the influence was very unstable, and the curve fluctuated up and down. May I ask why this is? And how can I solve this problem? Thank you again for your help. I am looking forward to your reply.

Have a look at (or similar topics in the forum):

Thank you for your answer. After modifying the model, I find that the BK conditions are not satisfied. So sad

This typically means that you still have mistakes with respect to the timing.