Page 1 of 1
Need Urgent Help :( Gali Monacelli (2005)
Posted:
Tue Mar 10, 2009 7:24 pm
by hakaner.tcmb
Hello,
I was working on Gali Monacelli (2005) and wrote the following file in dynare. It gives the following error message first:
STEADY: numerical initial values incompatible with the following equations
1 3
I tried to give k_alp, gamma_a, alpha, and w some numbers instead of defining them in terms of other parameters, it worked but this time it gave another error message:
SOLVE: maxit has been reached
What's the matter with my codes?
Can someone help me? I need to do this work for my thesis...
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Wed Mar 11, 2009 12:43 am
by JamieHall
The lines assigning values to parameters that are functions of other parameters need to be inside the "model" bit, with "#"s in front of them, as in the attached mod file. (I'm using Dynare 4.0.2.)
Hope that helps....
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Wed Mar 11, 2009 9:27 am
by p.gelain
Dear hakaner.tcmb
the main problem with you code is that you have defined some parameters as a function of other parameters not yes specified. To be concrete, gamma_a = (1+psi)/(sigma_alp+psi);
k_alp = lambda*(sigma_alp+psi); are function of sigma_alp which is defined only after them. Since matlab reads the code from the top to the bottom and from the left to right, when it tries to compute gamma_a it does not know what sigma_alp is and then it does not compute gamma_a. This is true also for k_alp. Just try to copy-paste the parameters in matlab and you will see.
When then it tries to solve the model it has not the values for gamma_a and k_alp and then it gives you the error.
Hence, just move the sigma_alp equation before gamma_a and k_alp and the code will work.
The suggestion of JamieHall is then correct, because you will have consistent values for all the parameters function of other parameters every iteration.
Regards.
Paolo
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Wed Mar 11, 2009 3:11 pm
by hakaner.tcmb
Hi JamieHall and P. Gelain,
Thank you very much for your fast response and helpful comments. The code works now
and I feel better.
Wish you best.
Hakan.
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Wed Mar 28, 2012 6:26 pm
by ytavman
Dear Hakan,
I'm currently working on the same model and even though the code that I have is working, I can't get exactly the same impulse response functions given in the paper. I was wondering if you managed to get the same results.
Many Thanks,
Yaprak
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Wed Apr 04, 2012 9:56 am
by rteconomics
Does anyone have a working code for this model please? Thanks!
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Sun Jul 14, 2013 5:37 pm
by selima
this is the modle you can even find many models in
http://www.macromodelbase.com/
Re: Need Urgent Help :( Gali Monacelli (2005)
Posted:
Fri Aug 21, 2015 6:06 pm
by jpfeifer
A replication file for the Gali/Monacelli (2005): Monetary Policy and Exchange Rate Volatility in a Small Open Economy", Review of Economic Studies 72, pp. 707-734 is available at
https://github.com/JohannesPfeifer/DSGE_mod