There is 3 colinear relationships between the variables and the equations

Referring to the code provided by Iacoviello (2005), I made a complete copy myself. The only difference is that I use the logarithmic form. When I simulate, the pulse image of order=1 is exactly the same as that of the author, but when order=2, my model no longer outputs an image, and displays “there is 3 colinear relationships between the variables and the equations” when using the model_diagnostics command. I really can’t tell the difference between my code and the original author’s code, can anyone help me? The code I copied myself is below. As it is not clear whether the website allows me to upload Iacoviello code, I will not provide this file for the time being. If the site allows it or you do not know the author’s code, I can share it with you.
Thanks a lot! (3.3 KB)

Why are you even doing a full exp()-substitution. It’s usually better to append auxiliary equations. See

Thanks so much for your reply, Dr. Jpfeifer! I’m going to try your recommended method. In addition, I would like to ask, will doing a full exp ()-substitution have any problems with the simulation compared with the original model?

If done correctly, it will not affect the simulation at all. But it’s a very error-prone process.

Dr. Jpfeifer , I no longer use full exp ()-substitution, and then build a new model as shown below, but the collinearity problem still exists, and it seems that there are other problems. (3.2 KB)

Dr. Jpfeifer , after my constant adjustment, the model is no longer linear. The new model is shown below. I found that the problem mainly appeared in three equations. The first is the monetary policy equation. The original equation is

(R) / (steady_state (R)) = ((R (- 1)) / (steady_state (R)) ^ rhoR* ((ppai)) ^ ((1-rhoR) * rhopai) * (Y) / (steady_state (Y)) ^ ((1-rhoR) * rhoy) * (exp (epsipai)) * (steady_state (ppai)) ^ (- (1-rhoR) * rhopai

The new equation is

(R) / (steady_state (R)) = ((R (- 1)) / (steady_state (R) ^ rhoR* ((ppai)) ^ ((1-rhoR) * rhopai) * ((Y) / (steady_state (Y) ^ ((1-rhoR) * rhoy) * (exp (epsipai)) * (steady_state (ppai)) ^ (- 1+rhoR)

By changing the monetary policy equation, the model reduces a linear relationship. The difference between the two equations is that the corresponding parameters of the steady state of inflation are different. Then I lost two equations: etap=steady_state (etap) and etapp=steady_state (etapp). At this point, the new model can be verified by the model_diagnostics command.
Although I have solved the problem, I am still not quite sure what the underlying cause is. Why can I optimize the model with such a change? And even if it does not change, the model can still run normally when order=1, and the simulation results are consistent with the new model. (3.2 KB)

Have a look at

Thanks a lot!