external function

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

external function

Postby DanielG » Sun Apr 01, 2012 8:21 pm

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
Attachments
new_ad2.mod
new_ad2.mod
(3.66 KiB) Downloaded 143 times
new.mod
new.mod
(3.96 KiB) Downloaded 162 times
DanielG
 
Posts: 9
Joined: Sun Mar 11, 2012 4:37 pm

Re: external function

Postby bkjecn » Mon Apr 02, 2012 2:41 pm

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....
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: external function

Postby DanielG » Sun Apr 08, 2012 9:55 am

Thanks a lot for the hlep, now it worked.
DanielG
 
Posts: 9
Joined: Sun Mar 11, 2012 4:37 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests

cron