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.

The term #CB_Y=1-CH_Y-CE_Y-G_Y-IK_Y-IH_Y-v*(1-h)*D_Y-muwKpoeH_Y;
used in the resource constraint contains the variables h, rendering the resource constraint nonlinear.

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:
ch
cb
m
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.

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.

[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