Page 1 of 1
Ireland 2003 A Method for Taking Models to the Data
Posted:
Tue Nov 15, 2011 1:11 pm
by Daniel Bendel
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
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Fri Nov 18, 2011 10:42 am
by SébastienVillemot
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,
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Fri Nov 18, 2011 4:07 pm
by Daniel Bendel
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?
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Fri Nov 18, 2011 10:00 pm
by jpfeifer
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.
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Mon Nov 21, 2011 2:15 pm
by Daniel Bendel
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);)
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Thu Jan 22, 2015 9:40 pm
by ccmartinezs
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.
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Sat Jan 24, 2015 8:47 am
by jpfeifer
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.
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Sun Jan 25, 2015 5:46 pm
by ccmartinezs
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.
Re: Ireland 2003 A Method for Taking Models to the Data
Posted:
Tue Jan 27, 2015 1:41 pm
by jpfeifer
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.