I am replicating CEE(2005) Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy. And my derivations are the same as CEE’s, but I cannot use dynare to solve the model well.
I tried to solve the model in 2 ways:

CEE2005.mod (3.3 KB) do the log linear, and my results of log linear are totally the same as CEE’s, but the dynare code cannot run whether I lagged or not all stock variables just like k and kh in my code. The issue is shown as below.
There are 9 eigenvalue(s) larger than 1 in modulus
for 8 forward-looking variable(s)

The rank condition ISN’T verified!

CEE2005exp.mod (5.4 KB) use the log-level to solve the model, so that all variables in dynare code become exp(.). but there were issues of 29 equations.( there are 30 equations in total).
ERROR: If the model is declared linear the second derivatives must be equal to zero.
The following equations had non-zero second derivatives:
* Eq # 1 [70 mc]
* Eq # 2 [71 rk]
* Eq # 3 [72 inflation]
* Eq # 4 [73 kh accumulation]
* Eq # 5 [74 consumption Euler]
* Eq # 6 [75 R]
* Eq # 7 [76 q]
* Eq # 8 [77 Pk]
* Eq # 9 [78 pk&i]
* Eq # 10 [79 rk&k]
* Eq # 11 [80 resource]
* Eq # 12 [81 Loan Market]
* Eq # 13 [82 Money growth]
* Eq # 14 [83 Y]
* Eq # 15 [84 money policy]
* Eq # 16 [85]
* Eq # 17 [86]
* Eq # 18 [87 ]
* Eq # 19 [88 B1]
* Eq # 20 [89 B2]
* Eq # 21 [90]
* Eq # 22 [91 hjL]
* Eq # 23 [92 ]
* Eq # 24 [93 pstar]
* Eq # 25 [94 wstar]
* Eq # 26 [95]
* Eq # 27 [96 ]
* Eq # 28 [97 ]
* Eq # 29 [98 ]

Then, I do not know how to solve the model with dynare.
I hope someone knows which faults I made.
Thanks in advance for your kind help.

You are confusing the timing. Physical capital \bar k_t in their model is predetermined. Capital services k_t are not. So the relevant equation in the paper in consistent timing should read k_t=u_t \bar k_{t-1}

If your model is non-linear, you cannot use the linear-keyword to declare it as linear.

I thought all stock variables were preditermined before. Thank you. I have corrected my errors in the first code.

I did not use model(linear) in the second code while I used it in the first one. So, dynare should have not considered it as a linear model. Maybe I made some other mistakes.

Does the model work now? Capital services is not a stock. Rather it is a predetermined stock, multiplied with the utilization decision. That utilization is decided upon in the current period after the shocks have been realized. That’s what makes it non-predetermined.

You used stoch_simul(linear) which works like model(linear)

The 1st one can run. Maybe there are some errors in the equations, the fluctuation charts are not the same as CEE’s. Especially, with Taylor’ rule, output and inflation are the opposite to CEE’s.

For the second model, residuals of the static equations are not all 0. But the non-zero problem above has been solved.

Thank you again. I will check my model and code again.

Dear Professor Jpfeifer,
I have rechecked my code, but I did not find any faults. Output and inflation are opposite to CEE’s. So frustrated. I don’t know why this happens. And I have given up the 2nd method, because I cannot solve the issues that 2 auxiliary equations do not satisfy the equlibrium. If it is convenient for you, please help check my 1st code shown as below. If not, just let it go. Thank you! CEE2005.mod (3.2 KB)