logit {poputils} | R Documentation |
Logit and Inverse-Logit Functions
Description
Transform values to and from the logit scale.
logit()
calculates
Usage
logit(p)
invlogit(x)
Arguments
p |
Values in the interval |
x |
Values in the interval |
Details
and invlogit()
calculates
To avoid overflow, invlogit()
uses
internally for
where
.
In some of the demographic literature, the logit function is defined as
logit()
and invlogit()
follow the conventions
in statistics and machine learning, and omit the
.
Value
A vector of doubles, if
p
orx
is a vector.A matrix of doubles, if
p
orx
is a matrix.An object of class
rvec_dbl
, ifp
orx
is an rvec.
Examples
p <- c(0.5, 1, 0.2)
logit(p)
invlogit(logit(p))
[Package poputils version 0.3.1 Index]