logit: Generalized logit function

View source: R/logit.R

logitR Documentation

Generalized logit function

Description

Compute generalized logit function.

Usage

logit(x, min = 0, max = 1)

Arguments

x

value(s) to be transformed

min

Lower end of logit interval

max

Upper end of logit interval

Details

The generalized logit function takes values on [min, max] and transforms them to span [ -\infty, +\infty ] it is defined as:

y = log(\frac{p}{(1-p)})

where

p=\frac{(x-min)}{(max-min)}

Value

y Transformed value(s).

Author(s)

Gregory R. Warnes <greg@warnes.net>

Examples

x <- seq(0,10, by=0.25)
xt <- jSDM::logit(x, min=0, max=10)
cbind(x,xt)
y <- jSDM::inv_logit(xt, min=0, max=10)
cbind(x,xt,y)  

jSDM documentation built on July 26, 2023, 5:21 p.m.