Page 1 of 1

How to change step tolerance and constraint tolerance?

PostPosted: Thu Apr 28, 2016 4:31 am
by htoma
Hi to everybody.

While trying to estimate a model with mode_compute=1, I get the following message:

Code: Select all
fmincon stopped because the size of the current step is less than
the selected value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.

Optimization stopped because the relative changes in all elements of x are
less than options.StepTolerance = 1.000000e-06, and the relative maximum constraint
violation, 0.000000e+00, is less than options.ConstraintTolerance = 1.000000e-06.


It seems to be a problem with fmincon's step tolerance and constraint tolerance. I have been looking around the forum and also looked at the manual for a solution for this issue, but, sadly, I have not found any.

Does anybody know how to change the tolerance when using mode_compute=1? Any kind of help will be highly appreciated.

Re: How to change step tolerance and constraint tolerance?

PostPosted: Thu Apr 28, 2016 7:56 am
by jpfeifer
In the current unstable version, you have to go to optimization\dynare_minimize_objective.m and change line 72, i.e.
Code: Select all
    optim_options = optimset('display','iter', 'LargeScale','off', 'MaxFunEvals',100000, 'TolFun',1e-8, 'TolX',1e-6);

Re: How to change step tolerance and constraint tolerance?

PostPosted: Thu Apr 28, 2016 5:38 pm
by htoma
Thank you for your answer, which, indirectly, helped my on solving my problem.

I was using the latest stable version of Dynare when I got the error message. Then, when I changed to the latest unstable release of Dynare (thanks to your suggestion), I got to run the code smoothly, without the need to change the step tolerance or the constraint tolerance or any other parameter. I just thought that pointing this out could be helpful.

Once again, thank you very much for your answer.