Evaluates the logit function.
p
p / (1-p)
p < 0
p > 1
NaN
input value
function value
var y = logit( 0.2 ); // returns ~-1.386
var y = logit( 0.9 ); // returns ~2.197
var y = logit( -4.0 ); // returns NaN
var y = logit( 1.5 ); // returns NaN
var y = logit( NaN ); // returns NaN
Evaluates the logit function.
Notes
p
be the probability of some event. The logit function is defined as the logarithm of the oddsp / (1-p)
.p < 0
orp > 1
, the function returnsNaN
.