[Gretl-users] threshold value

Allin Cottrell cottrell at wfu.edu
Fri Sep 19 13:44:59 EDT 2014


On Fri, 19 Sep 2014, Riccardo (Jack) Lucchetti wrote:

> On Fri, 19 Sep 2014, Artur Bala wrote:
>
>> Dear all,
>> Does anyone know how the threshold value for the predicted probalities in a
>> logit/probit estimation is being calculated in gretl?
>
> I assume that by "threshold" you mean "the value of P(x'b) at which we 
> shwitch from predicting a 0 to predicting a 1". I haven't looked at the 
> source code, but I'm pretty sure it's 0.5. Why should it be anything else?
>
> Try this:
> <hansl>
> open mroz87 --quiet
> logit LFP const WA WE KL6
> series pred = $yhat>0.5
> xtab LFP pred
> </hansl>

Yes. In the source (discrete.c) the criterion for predicting a 1 is x'b 
greater than 0, which is of course equivalent to $yhat>0.5.

Allin Cottrell


More information about the Gretl-users mailing list