This function takes a logit value and converts it to a probability using the logistic function and vice versa.

logit2prob(logit)

prob2logit(prob)

Arguments

logit

Numeric. The logit value to be converted to probability.

prob

Numeric. A probability to be converted to a logit.

Value

Numeric.

Examples

logit2prob(0) # Returns 0.5
#> [1] 0.5
logit2prob(2) # Returns 0.8807971
#> [1] 0.8807971
prob2logit(0.8807971)
#> [1] 2