Page 1 of 1

How to increase the Max.Iteration option

PostPosted: Sun Oct 03, 2010 7:52 pm
by john
In advance, many thanks for many people's help for me to learn dynare.

I try to increase the MaxIter option.
I am using the
==> steady(solve_algo=0);

Based on manual, I wrote the
==> maxit_=20;

And also tried
==> maxit_=100;

But I cannot figure out any difference betwee two.
Calculation always finished when iteration goes 2000 for both cases.

Since the evalution of f(x) decreasing, it seems to work if I can increase the Max.Iteration option.



Maximum number of iterations reached:
increase options.MaxIter.
??? Error using ==> steady_ at 132
STEADY: convergence problems

Error in ==> steady at 52
steady_;

Error in ==> ver1003 at 585
steady;

Error in ==> dynare at 132
evalin('base',fname) ;

Re: How to increase the Max.Iteration option

PostPosted: Mon Oct 04, 2010 8:28 am
by john
when I use 'fsolve' function in MATLAB.
I can controal fsolve function through the following command.... for maxIter, Display calculation procedure or not, and Max Fun Evaluation.
I tried these command in Dynare....
There was no erroe but ..... nothing change.
Is there anyone who can comment on this issue?


options.MaxFunEvals=100000;
options.MaxIter =100000;
options.Display = 'off';

new mod file is attached...

Re: How to increase the Max.Iteration option

PostPosted: Mon Oct 04, 2010 1:34 pm
by jpfeifer
I am not sure that you can control the number of iterations with a Dynare option. However, what you can do is manually change the file dynare_solve.m
There you will find the default values in lines 46-50
Code: Select all
   
    options=optimset('fsolve');
    options.MaxFunEvals = 50000;
    options.MaxIter = 2000;
    options.TolFun=1e-8;
    options.Display = 'iter';

which you can adapt to your liking.

Re: How to increase the Max.Iteration option

PostPosted: Mon Oct 04, 2010 3:34 pm
by john
Thanks a lot.
It works.