logit {geostats}R Documentation

logistic transformation

Description

Maps numbers from [0,1] to [-\infty,+\infty] and back.

Usage

logit(x, ...)

## Default S3 method:
logit(x, inverse = FALSE, ...)

## S3 method for class 'density'
logit(x, inverse = TRUE, ...)

Arguments

x

a vector of real numbers (strictly positive if inverse=FALSE) or an object of class density.

...

optional arguments to the log function.

inverse

logical. If inverse=FALSE, returns \ln\!\left[\frac{x}{1-x}\right]; otherwise returns \frac{\exp[x]}{\exp[x]+1}.

Value

a vector with the same length of x

Examples

data(catchments,package='geostats')
lp <- logit(catchments$vegetation/100,inverse=FALSE)
ld <- density(lp)
d <- logit(ld,inverse=TRUE)
plot(d)

[Package geostats version 1.6 Index]