Learn R Programming

predRupdate (version 0.2.0)

logit: Apply a logit transformation to an input

Description

logit applies the logit transformation to convert a vector of values between 0 and 1, to values between -Inf and Inf. Used to convert a probability from a logistic regression model onto the linear predictor scale.

Usage

logit(p)

Value

A numeric vector, with values between -Inf and Inf

Arguments

p

Numeric vector of probabilities (i.e. values between 0 and 1) that will be transformed.

See Also

inv_logit

Examples

Run this code
logit(0.5)
logit(c(0.1, 0.2, 0.3))

Run the code above in your browser using DataLab