Difference between revisions of "Logit"

m (adding doc status category stub page)
 
(Added nth derivative)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Math Functions]]
 +
[[Category:Functions that operate on complex numbers]]
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 +
 +
 +
== Logit(p) ==
 +
 +
The [[Logit]] function is equal to
 +
:<math>Logit(p) = \ln\left( p\over{1-p} \right)</math>
 +
where <math>0<p<1</math>.  The logit is also called the ''log-odds'' of a probability <math>p</math>.
 +
 +
:[[image:logitGraph.png]]
 +
 +
The inverse of the [[Logit]] function is [[Sigmoid]](x) (before [[Analytica 4.5]], the function [[InvLogit]] was used, defined in the [[media:Generalized Regression.ana|Generalized Regression library]]). Its first and second derivatives are
 +
 +
:<math>{{d \; logit(p)}\over{d p}} = {1\over p} + {1\over{1-p}} = {1 \over {p (1-p)}}</math>
 +
 +
:<math>{{d^2 \; logit(p)}\over{d p^2}} =
 +
{{2 p - 1} \over { p^2 (1-p)^2 }}
 +
</math>
 +
 +
:<math>{{d^n \; logit(p)}\over{d p^n}} =
 +
(n-1)! {{p^n - (-1)^n (1-p)^n } \over { p^n (1-p)^n }}
 +
</math>
 +
 +
The logit function is sometimes called the log-odds function.
 +
 +
== Library ==
 +
Advanced Math Functions
 +
 +
== Complex numbers ==
 +
 +
When ''p < 0'' or ''p > 1'', a warning is issued and if the warning is ignored, the result is [[NaN]].  This is the case unless you have [[EnableComplexNumbers|enabled complex numbers]].  If you have set the system variable [[EnableComplexNumbers]] to 1, then no warning is issued and [[Logit]](p) returns a complex number.
 +
 +
==History==
 +
[[Logit]] was introduced as a built-in function in [[Analytica 4.5]].  Before that, it was supplied as a function in the [[media:Generalized Regression.ana|Generalized Regression library]].
 +
 +
== See Also ==
 +
* [[Sigmoid]](x)
 +
* [[LogisticRegression]]

Latest revision as of 18:27, 18 September 2024


Logit(p)

The Logit function is equal to

[math]\displaystyle{ Logit(p) = \ln\left( p\over{1-p} \right) }[/math]

where [math]\displaystyle{ 0\lt p\lt 1 }[/math]. The logit is also called the log-odds of a probability [math]\displaystyle{ p }[/math].

LogitGraph.png

The inverse of the Logit function is Sigmoid(x) (before Analytica 4.5, the function InvLogit was used, defined in the Generalized Regression library). Its first and second derivatives are

[math]\displaystyle{ {{d \; logit(p)}\over{d p}} = {1\over p} + {1\over{1-p}} = {1 \over {p (1-p)}} }[/math]
[math]\displaystyle{ {{d^2 \; logit(p)}\over{d p^2}} = {{2 p - 1} \over { p^2 (1-p)^2 }} }[/math]
[math]\displaystyle{ {{d^n \; logit(p)}\over{d p^n}} = (n-1)! {{p^n - (-1)^n (1-p)^n } \over { p^n (1-p)^n }} }[/math]

The logit function is sometimes called the log-odds function.

Library

Advanced Math Functions

Complex numbers

When p < 0 or p > 1, a warning is issued and if the warning is ignored, the result is NaN. This is the case unless you have enabled complex numbers. If you have set the system variable EnableComplexNumbers to 1, then no warning is issued and Logit(p) returns a complex number.

History

Logit was introduced as a built-in function in Analytica 4.5. Before that, it was supplied as a function in the Generalized Regression library.

See Also

Comments


You are not allowed to post comments.