Non-zero second derivative


I was trying to calibrate my model but got the following error message.
ERROR: If the model is declared linear the second derivatives must be equal to zero.
The following equations had non-zero second derivatives:
* Eq # 28

However, I re-check my equations but did not find any problem. My equation (28) is just the log-linearised resource constraint, which I used several times in several different models and worked fine.

I would highly appreciate that if anyone can help me to find what is the problem?
The mod file is attached below.

Calibration.mod (11.4 KB)

The term
used in the resource constraint contains the variables h, rendering the resource constraint nonlinear.

Dear Professor Pfeifer,

Thanks for the help. I indeed miss that point!

However, I got the following issue,
There are 4 eigenvalue(s) larger than 1 in modulus
for 5 forward-looking variable(s)

Then I ran the model diagnostic, it reports

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations
Colinear variables:
Colinear equations
1 2 3 6 10 36

I read some similar post in the forum, some mention that there may be redundant equations, and other missing equations. However, I re-check my model, the equations and variables reported in the error message are all necessary for my model. Could you please provide me some hint for this issue as well.

Many thanks

Without knowing the model in detail, it is impossible to tell. What are ch and cb? It may have to do with your sectoral structure.

Dear Pfeifer,
Thanks for the reply.

ch is the household consumption, cb is the bankers’ consumption. In my model, households purchase two assets from the banker, deposit and risky assets subject to a default probability.
bankers obtain money from both deposit and risky assets and then lend to two sectors, the state-owned sector and private sectors. money from deposit goes to SOEs, money from risky assets goes to POEs.

I really appreciate if you can have a look at the attached file.

Many thanks.

Dynare query.pdf (104.6 KB)

[mode.mod|attachment]mode.mod (3.4 KB)
Dear Pfeifer,
Can you help me look at my mod file? It is the same problem as the above scholars, Non-zero second derivative
Many thanks

Take e.g. equation 18. It contains:

R*bii_Y*(bii(-1) + R(-1) - pi)

with R being a variable, it is obviously not a linear equation.

Dear Professor,
I have solved this problem,
Thank you.