logit | R Documentation |
logit
computes values transformed by the logit or log-odds function.
inv.logit
is the inverse of logit
. The logarithm base used
can be defined (default is natural logarithm). The left and right bounds
of the logit function can also be defined, with the default domain being
(0, 1)
.
logit(x, base = exp(1), left = 0, right = 1, suppress.nan = TRUE)
inv.logit(x, base = exp(1), left = 0, right = 1)
x |
A numeric vector. |
base |
The base used for the logarithm. |
left, right |
The lower and upper domain boundaries of the corresponding logit function. Defaults are 0 and 1. |
suppress.nan |
Whether to output |
A vector with the same length as x
.
logit(0.7)
logit(6.2, left = 0, right = 10)
logit(-0.07, suppress.nan = FALSE)
logit(0.01, base = 10)
inv.logit(2.31)
inv.logit(5.1, left = -1, right = 1)
inv.logit(2, base = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.