logit: Convert probabilities to log odds

Description Usage Arguments Value Examples

View source: R/logitfunctions.R

Description

Log odds, also known as logits, are the logarithms, usually to the base of the natural logarithms, of odds.

Usage

1
logit(p)

Arguments

p

A numeric vector of probabilities, which are values between 0.0 and 1.0.

Value

A numeric vector of logits, which are positive or negative real numbers.

Examples

1
2
p <- c(0.1, 0.25, 0.5, 0.9)
logit(p)

mark-andrews/rdemopkg documentation built on Dec. 21, 2021, 2:46 p.m.