Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logit

Logit Transformation


Description

Transform real values to the logit scale, and the inverse.

Usage

logit(x)
invlogit(y)

Arguments

x

vector of numeric values in (0,1) (possibly a probability)

y

vector of numeric values

Details

The logit transformation is defined as logit(x) = log(x/(1--x)) for x in (0,1).

Value

Numeric value on requested scale.

Note

logit is equivalent to qlogis, and invlogit is equivalent to plogis (both R functions in the stats package). logit and invlogit are used in secr because they are slightly more robust to bad input, and their names are more memorable!

Examples

logit(0.5)
invlogit(logit(0.2))

secr

Spatially Explicit Capture-Recapture

v4.4.1
GPL (>= 2)
Authors
Murray Efford
Initial release
2021-05-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.