external function in dynare 4.2

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.

Re: external function in dynare 4.2

Postby jpfeifer » Mon May 14, 2012 7:14 pm

Note that the init-file above has been updated to also work without prefiltering.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: external function in dynare 4.2

Postby mak » Wed Dec 24, 2014 6:39 am

Hello,
Please need help. Using above posts, as exercise, I introduced in the example model fs2000 a some counter. For it I initialized parameter counter=0 in fs2000.mod and in entered equation counter = counter + 1 in _steadstate.m. However, at the end of estimation counter takes a small number, such as 8. I expected a large number. Please explain why the counter takes a small number, where is mistake (I use 4.4.3).
best regards, mak
Attachments
fs2000_steadystate.m
(1.84 KiB) Downloaded 79 times
fs2000.mod
(3.26 KiB) Downloaded 77 times
mak
 
Posts: 1
Joined: Wed Dec 24, 2014 5:54 am

Re: external function in dynare 4.2

Postby jpfeifer » Sun Dec 28, 2014 10:14 am

The reason is that Dynare estimates a different set of parameters that does not include counter. While counter is updated within every step of estimation, the value for counter is not stored and returned to the next iteration, because there is no reason for doing so. counter is not a function of the estimated parameters. As counter is not estimated, its value is basically kept at the level set at the beginning of estimation.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Previous

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests