Wrong results after a monetary shock

Hi everyone, hi @jpfeifer.
I tried to write a non-linear DSGE model but dynare gives me the following error: The Jacobian of the dynamic model contains Inf. I state that the last 6 equations are linear, because I don’t know corresponding to the non-linear equations. what is the problem?
The non-linear model is:
model.mod (1.3 KB)

The corresponding linearized model runs, but gives wrong results. The linear model is:
nek.mod (2.0 KB)
The linear model generates an increase in lambda and a reduction in the release, after an expansionary monetary shock, which is wrong. I thank in advance anyone who can help me with one of the two models to get the right results.

Have a look at

You need to distinguish the linear and nonlinear variables and provide initial values for the steady states of the nonlinear ones.

I tried to do as it says but failed.
linear.mod (3.1 KB)

Don’t declare your model to be linear. It is not linear anymore. Also, do not log-linearize zero steady state variables like
pz = 0;
Also, almost all of your equations are still the linearized ones. That is not goal.

Thanks so much for your reply. I tried, i replaced nonlinear equations but i get nonzero residuals. I don’t know the nonlinear equations of the phillips curve (dp), flexible price output (yf) and output gap (x) but I have written them as a function of the nonlinear variables.
linear.mod (1.8 KB)

I fixed some issues, including the linking between linear and nonlinear equations.
linear.mod (1.8 KB)
Now the issue is the steady state.

1 Like

Thank you very much. This means that the values ​​in the “initval” block are incorrect, right?

Either that or the relevant equations.