logit: Logit function

View source: R/logit.R

logitR Documentation

Logit function

Description

Applies logit transformation

Usage

logit(p)

Arguments

p

a vector of probability values (0 to 1)

Value

A vector

Note

Formula: log(p / (1 - p))
Returns NA values if input values are not between 0 and 1.
See https://hausetutorials.netlify.com/posts/2019-04-13-logistic-regression/#inverse-logit-and-logit-functions for intro to logit and inverse logit functions.

Author(s)

Hause Lin

Examples

logit(seq(-2, 2, length.out = 100))


hauselin/hausekeep documentation built on Feb. 3, 2023, 3:09 p.m.