Hello Alecos,
In a such an exercise the "catch" command may be useful. I used it for a bivariate estimation as follows

loop 200 --progressive
do some random sorting
catch biprobit y1 y2 const x1 ; const x2
err = $error
if !err
    do some stuff
else
    do nothing in particular
endif
endloop
The following link may help you
http://lists.wfu.edu/pipermail/gretl-users/2015-February/010624.html
Best,
Artur

2015-02-05 10:54 GMT+01:00 Alecos Papadopoulos <papadopalex@aueb.gr>:
I have to evaluate the finite-sample performance of the ML estimator in the estimation of a 3-parameter distribution, based on simulated samples.
The "progressive loop" environment which is set for Monte Carlo studies does not seem to support the mle command. I ended up using the index loop which supports the mle command,  while writing the coefficient vector obtained in each loop that is grabbed by $coeff, to successive rows  of a pre-defined zero matrix. So far so good.

The problem is the following: the distribution appears difficult to estimate in small samples and rather often the convergence criterion for the mle is not met (I don't mind that, this is part of the evaluation of the performance of the MLE). But when this happens, the loop stops.  The total number of runs of the loop  will possibly require some hours to run. If the loop stops every time the mle does not converge, I will have to be constantly overseeing the process for the duration, in order to re-ignite the loop.  It would be very convenient if the loop could continue irrespective of whether the mle in a particular loop fails to converge.

Is there a way to tell Gretl not to stop the loop, even if the mle fails, to write the container matrix with NANs, and to proceed to the next run;

Thank you.
-- 
Alecos Papadopoulos
Athens University of Economics and Business, Greece
Department of Economics
cell:+30-6945-378680
fax: +30-210-8259763
skype:alecos.papadopoulos

_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users