Page 1 of 1

external function

PostPosted: Sun Apr 01, 2012 8:21 pm
by DanielG
Hi together

I have a Monacelli DSGE model with consumption habits ('new.mod'). This works fine. However, I would like to show the typical aggregate demand function which one can built from eqn 8 and 10 (Risk sharing equation and market clearing equation and using the Euler equation).

To do so, I replaced the market clearing eq. (10) with the aggregate demand equation (new 10). Doing so in the model ('new_ad2.mod'), I get the following error message:
"To use an external function within the model block, you must first declare it via the external_function() statement."

I don't understand the error message with regard to my changes, I have added a parameter rho_y and another parameter omega_s which is a function of other paramters, so this should not be an external function.

Does anybody know why this error message appears? I would be very happy about any help.

best regards,
Daniel

Re: external function

PostPosted: Mon Apr 02, 2012 2:41 pm
by bkjecn
The variable phif in eqn10 is not declared. When you have 'phif(+1)' as a part of the expression for that equation, Dynare reads it as a function when it tries to parse the file. Declaring the variable should take care of it....

Re: external function

PostPosted: Sun Apr 08, 2012 9:55 am
by DanielG
Thanks a lot for the hlep, now it worked.