Dear Allin and Jack,
As Jack suggested (some months ago) I use "catch" into a loop command in
order to skip cases where a biprobit estimation could not be provided.
My script looks like :
*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*
This script used to work perfectly in an earlier version of gretl (by
mid-2014). The problem is that it doesn't work anymore and its execution is
interrupted if the estimation procedure fails
Instead, everything is ok when I use a "loop for" command instead of the
progressive loop.
Best,
Artur
2014-05-04 23:50 GMT+02:00 artur.bala.tn <artur.bala.tn(a)gmail.com>:
*From:* Riccardo (Jack) Lucchetti <r.lucchetti(a)univpm.it>
*Date:* 2014-04-28 07:49
*To:* Gretl list <gretl-users(a)lists.wfu.edu>
*Subject:* Re: [Gretl-users] bivariate probit in a loop
On Mon, 28 Apr 2014, artur.bala.tn wrote:
> Can one, in such a loop, skip cases where the MLE estimation is not
> technically possible?
Use "catch": for example,
<hansl>
nulldata 50
small = 0.25
x1 = normal()
x2 = normal()
y1 = x1 + normal()*small > 0.5
y2 = x2 > 0
catch biprobit y1 y2 const x1 ; const x2
err = $error
if !err
z = $yhat
printf "%10.3f", meanc(z)
else
printf "Error!\n"
endif
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users