I am trying to solve a NK model with capital using Dynare. I am getting an error which is as follows;

ERROR: Bean_2004_AER.mod: line 18, cols 1-7: To use an external function (psi) within the model block, you must first declare it via the external_function() statement.

Can anyone please help me with this? I am attaching my .mod file here.

Thank you Prof. Pfeifer. I have fixed that like you said. I am now facing more of an economics issue. I have 13 equations but 14 endogenous variables, and I do not know which equation I am missing in the system. Is this something you could advise me about? It would be a great help. I am attaching the mod file, if you would be willing to take a look. Bean_2004_AER.mod (3.35 KB)

This is unrelated to problem above, however related to general use of external_function.
While using external_function I assume dynare numerically calculated first and second order derivatives. However, if I am using third order approximation, dynare doesnâ€™t calculate third order derivatives and throws an error.

Dear Johannes,
I have a model with formal and informal sector. In this model, the shocks in formal sector are passed through informal sector. I defined the shock in equation 12 and 13 in mod file. I got this error in below:
To use an external function (eps_G) within the model block, you must first declare it via the external_function() statement.

I think I declared everything properly. I would greatly appreciate if you could give me some suggestions why I receive this error because I just could not figure out. *model3.mod (7.2 KB)