Need Urgent Help :( Gali Monacelli (2005)

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.

Need Urgent Help :( Gali Monacelli (2005)

Postby hakaner.tcmb » Tue Mar 10, 2009 7:24 pm

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...
Attachments
gali.mod
File is trying to replicate the Gali and Monacelli (2005)
(1.46 KiB) Downloaded 394 times
hakaner.tcmb
 
Posts: 2
Joined: Tue Mar 10, 2009 7:11 pm

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby JamieHall » Wed Mar 11, 2009 12:43 am

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....
Attachments
gali_corrected.mod
(1.45 KiB) Downloaded 657 times
JamieHall
 
Posts: 20
Joined: Wed Feb 11, 2009 4:42 am

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby p.gelain » Wed Mar 11, 2009 9:27 am

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
p.gelain
 
Posts: 61
Joined: Wed Jul 11, 2007 9:13 pm
Location: Norges Bank

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby hakaner.tcmb » Wed Mar 11, 2009 3:11 pm

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.
hakaner.tcmb
 
Posts: 2
Joined: Tue Mar 10, 2009 7:11 pm

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby ytavman » Wed Mar 28, 2012 6:26 pm

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
ytavman
 
Posts: 1
Joined: Wed Mar 28, 2012 6:13 pm

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby rteconomics » Wed Apr 04, 2012 9:56 am

Does anyone have a working code for this model please? Thanks!
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby selima » Sun Jul 14, 2013 5:37 pm

this is the modle you can even find many models in http://www.macromodelbase.com/
Attachments
NK_GM05.mod
(8.8 KiB) Downloaded 286 times
selima
 
Posts: 46
Joined: Thu Jan 10, 2013 5:13 pm

Re: Need Urgent Help :( Gali Monacelli (2005)

Postby jpfeifer » Fri Aug 21, 2015 6:06 pm

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
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 3 guests