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)
Error in Ireland2003 (line 152)
Error in dynare (line 132)
Anyone an idea what my error is?
Ireland2003.mod (1.16 KB)
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.
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?
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.
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
(one other question:
what is the rigth code for the capital accumulation equation?
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.
Ireland.mod (1.97 KB)
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.
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.
No. Write the equations as in Ireland and then use
This will shift the timing for k, but for k only.