Ireland 2003 A Method for Taking Models to the Data

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.

Ireland 2003 A Method for Taking Models to the Data

Postby Daniel Bendel » Tue Nov 15, 2011 1:11 pm

Hey,

i have written a mod.-file for Irelands 2003 model. But I get following error message:
Error using print_info (line 36)
MJDGGES returns the following error code: 6

Error in check (line 50)
print_info(info, options_.noprint);

Error in Ireland2003 (line 152)
check;

Error in dynare (line 132)
evalin('base',fname) ;

Anyone an idea what my error is?

Best regards,
Daniel
Attachments
Ireland2003.mod
(1.16 KiB) Downloaded 196 times
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: Ireland 2003 A Method for Taking Models to the Data

Postby SébastienVillemot » Fri Nov 18, 2011 10:42 am

The root of the problem is that "kss" is undefined, because it depends on "yss" which is not yet defined.

I admit that the error message is not explicit. This should improve in a future version of Dynare.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Ireland 2003 A Method for Taking Models to the Data

Postby Daniel Bendel » Fri Nov 18, 2011 4:07 pm

Thanks for your answer!

But i don't understand the problem, since yss depends only on ass which is the number ahat. So yss is clearly uniquely definded. Thus kss, too.

What should I do?
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: Ireland 2003 A Method for Taking Models to the Data

Postby jpfeifer » Fri Nov 18, 2011 10:00 pm

The problem is that before the model block where you define the parameters, kss is defined using yss, but yss is only defined some line below. Hence you cannot use it to define kss. The code before the model block must be executable in the order you write it.
------------
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: Ireland 2003 A Method for Taking Models to the Data

Postby Daniel Bendel » Mon Nov 21, 2011 2:15 pm

Thank you, now it works.
For all interested people, here is the right code:

ass = ahat;
yss = (ass^(1/(1-theta)))*((theta/(eta/beta-1+delta))^((theta)/(1-theta)))*((1-theta)/(gamma))*(1-((theta*(eta-1+delta))/(eta/beta-1+delta)))^(-1);
iss = ((theta*(eta-1+delta))/(eta/beta-1+delta))*yss;
css = (1-((theta*(eta-1+delta))/(eta/beta-1+delta)))*yss;
hss = ((1-theta)/(gamma))*(1-((theta*(eta-1+delta))/(eta/beta-1+delta)))^(-1);
kss = (theta/(eta/beta-1+delta))*yss;

But if I run the check command, then I got the following error message:

One of the eigenvalues is is close to 0/0 (the absolute value of numerator and denominator is smaller
than 1e-6).
Why?

(one other question:
what is the rigth code for the capital accumulation equation?
this:
eta*k=(1-delta)*k(-1)+i;
or that:
eta*k=(1-delta)*k(-1)+i(-1);)
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: Ireland 2003 A Method for Taking Models to the Data

Postby ccmartinezs » Thu Jan 22, 2015 9:40 pm

Hello:

I am replicating Ireland's (2004) paper as an assigment and found this post online. However, the way in which the model is written at the .mod file above is kind of confusing, since, as far as I know, notation in dynare requires to input variables with a special timing convention (i.e. the wariables must be written at the time they were decided). Regarding this, I have written the model in the fashion showed in the attachment below, which I find somewhat different to the one previously attached. It would be quite helpful if some of you guys could take a look at it and tell me if it is correct.

P.S. this is a work in progress, so please pay attention only to the model block.

Thanks in anticipation for your help.
Attachments
Ireland.mod
(1.97 KiB) Downloaded 54 times
ccmartinezs
 
Posts: 5
Joined: Tue Oct 07, 2014 10:15 pm
Location: Bogotá, Colombia.

Re: Ireland 2003 A Method for Taking Models to the Data

Postby jpfeifer » Sat Jan 24, 2015 8:47 am

When entering the detrended equations, I would follow Ireland's appendix. You get different expressions, if you assume that predetermined capital has trend of the period in which it was decided. Other than that your file looks ok.

You are right that in the initial mod-file posted above the timing of capital is wrong. The singularity warning comes from the fact that the high A chosen leads to numerical issues. If you set it to 1, the message would vanish.
------------
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: Ireland 2003 A Method for Taking Models to the Data

Postby ccmartinezs » Sun Jan 25, 2015 5:46 pm

Yes, actually what I did when writing the equations was to change the timing conventions for capital and then the equations containing such variable (i.e. production function, law of motion and euler's). That is why my equations differ from those of Ireland's.
So, If I understand, you are suggesting me to input the equations in dynare the way Ireland does in his appendix regardless the timing convention? I mean, writing the equations the way Ireland does but specifying capital at the time it is decided (e.g. k(-1) instead of k in production function).

Thanks for your help.
ccmartinezs
 
Posts: 5
Joined: Tue Oct 07, 2014 10:15 pm
Location: Bogotá, Colombia.

Re: Ireland 2003 A Method for Taking Models to the Data

Postby jpfeifer » Tue Jan 27, 2015 1:41 pm

No. Write the equations as in Ireland and then use
Code: Select all
predetermined_variables k;

This will shift the timing for k, but for k only.
------------
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 12 guests