Hi Michel,
I have a problem with your commit b58eaa8e2b869f894b480c371ba60e14cf6ede7e where you added (two years ago) a test for 0/0 generalized eigenvalues. If I remember correctly, in this case any complex number is a generalized eigenvalue so the model has no unique solution. If the numerator and the denominator are less that 1e-6, then mjdgges issues an error message with info equal to -30. My problem is related to the hard coded threshold.
In this RBC model:
https://gist.github.com/stepan-a/5757263
the technology is characterized by a Constant Elasticity of Substitution production function. If psi is less than -1, that is if the elasticity of substitution is less than one half, Dynare fails because of the condition introduced in your commit. The problem is that I am almost certain that the model admits a solution for smaller values of psi. It is well known that there exists a closed form solution for the (continuous time) Ramsey model with Harrod-Domar technology (psi->\infty). Also, I am able to simulate this model with the (stochastic) extended path approach for much smaller values of psi.
I know that with this model, because of the almost kinked production function, the perturbation solution in such case would most likely deliver a very crude approximation but it would be nice to have something (and not an error message).
Are you okay if I add an option for this threshold? Do you have a rational for the hard coded value? I will try to push a branch tomorrow...
Best, Stéphane.
Hi Stéphane,
this is a neat example. I agree to make an option for the critical value. I don't have a good rational for setting it to 1e-6. Just that is was far smaller than what I had seen.
The critical value must be larger than the numerical error in computing the diagonal elements when their theoretical value is 0. For small models, I guess that it can be very small. For large models, we may need to be more careful. The issue is also related to the accuracy of DGEES in recent versions of the MKL distributed with Matlab. It seems that this function returns different results when it is run on different chips and the difference is larger than one would expect.
At least, with your example, it would be possible to see how small we can set psi and what value of the diagonal elements we get until the results become absurd.
It would be nice to have a Wiki page on the issue. Maybe some users will have interesting results to report.
Best,
Michel
stepan@dynare.org writes:
Hi Michel,
I have a problem with your commit b58eaa8e2b869f894b480c371ba60e14cf6ede7e where you added (two years ago) a test for 0/0 generalized eigenvalues. If I remember correctly, in this case any complex number is a generalized eigenvalue so the model has no unique solution. If the numerator and the denominator are less that 1e-6, then mjdgges issues an error message with info equal to -30. My problem is related to the hard coded threshold.
In this RBC model:
https://gist.github.com/stepan-a/5757263
the technology is characterized by a Constant Elasticity of Substitution production function. If psi is less than -1, that is if the elasticity of substitution is less than one half, Dynare fails because of the condition introduced in your commit. The problem is that I am almost certain that the model admits a solution for smaller values of psi. It is well known that there exists a closed form solution for the (continuous time) Ramsey model with Harrod-Domar technology (psi->\infty). Also, I am able to simulate this model with the (stochastic) extended path approach for much smaller values of psi.
I know that with this model, because of the almost kinked production function, the perturbation solution in such case would most likely deliver a very crude approximation but it would be nice to have something (and not an error message).
Are you okay if I add an option for this threshold? Do you have a rational for the hard coded value? I will try to push a branch tomorrow...
Best, Stéphane.