[Gretl-users] logit and $error

Cottrell, Allin cottrell at wfu.edu
Fri Aug 30 23:00:14 EDT 2013

On Thu, Aug 22, 2013 at 4:56 AM, Artur Tarassow
> after estimating a LOGIT model I obtain the following message:
> "Note: armeu == 0 predicts failure perfectly
> 714 observations not used
> Not a Number in calculation"
> I used the command "catch logit ..." to control for any error. I am
> wondered why the $error flag is still zero despite the message. Should
> this not result in a non-zero error value?

Artur, could you please send (offlist if the data are big) your data and

In a simple case of perfect prediction I'm getting a non-zero $error
OK (example below) but apparently the case you're looking at is
more complicated.

nulldata 100
series x1 = normal()
series ndx = 1.5 + 2*x1
series y = ndx > 0
catch logit y 0 x1
err = $error
if err
  printf "err = %d (%s)\n", err, errmsg(err)
  print "no error"

? logit y const x1
Perfect prediction obtained: no MLE exists
? err = $error
Generated scalar err = 33
err = 33 (The convergence criterion was not met)

Allin Cottrell

More information about the Gretl-users mailing list