Page 1 of 1

Dynare external function

PostPosted: Mon Feb 01, 2016 9:15 pm
by anupmulay1
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.

Anup

Re: Dynare external function

PostPosted: Tue Feb 02, 2016 7:57 am
by jpfeifer
You are using a variable named psi, but it is not declared as a variable in the var statement.

Re: Dynare external function

PostPosted: Tue Feb 02, 2016 10:53 am
by anupmulay1
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.

Re: Dynare external function

PostPosted: Thu Feb 04, 2016 12:26 pm
by jpfeifer
Sorry, but I cannot replicate the paper for you. You have to find out yourself which elements of the paper need to go into the mod-file.

Re: Dynare external function

PostPosted: Fri Aug 12, 2016 4:00 pm
by hscbsc
Hi,

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.

Is there a workaround/solution to this ?

Thanks.

Re: Dynare external function

PostPosted: Fri Aug 12, 2016 4:51 pm
by jpfeifer
Not yet, it is on our to-do list: https://github.com/DynareTeam/dynare/issues/300