Error with a modified fs2000.mod

Hi, I got “fs2000.mod”, which replicates the estimation of the CIA model from Frank Schorfheide (2000). I modified it a little bit, but a problem appears: the estimation of the parameters (as all the code ) is performed countless times. i mean, the code runs again and again. What can i do to solve that problem?

I attach the modified code.
Thanks in advance,
fs2000.mod (2.72 KB)

I cannot reproduce your problem. I was able to run this MOD successfully using Dynare 4.2.1. Which version of Dynare are you using? Can you be more specific?

Best,

Thanks for replying Sebastian.What happends is the code runs again and again, endlessly. I have to close Matlab to stop code execution. But I can run other code (which is estimated by Bayesian methods) correctly.
This kind of problem can be associated with dynare version? I am running it in a version 4.2.0.

I am not sure if this problem is related to the Dynare version, but anyways I strongly encourage you to upgrade to the latest version (4.2.2) if you want to minimize the risk of encountering bugs.