logisticFun {virtualspecies}R Documentation

Logistic function

Description

A simple logistic function of the form

\frac{1}{{1 + e^{\frac{x - \beta}{\alpha}}}}

Usage

logisticFun(x, alpha, beta)

Arguments

x

a numeric value or vector

alpha

a numeric value or vector

beta

a numeric value or vector

Details

The value of beta determines the 'threshold' of the logistic curve (i.e. the inflexion point).

The value of alpha determines the slope of the curve (see examples):

Value

a numeric value or vector resulting from the function

Author(s)

Boris Leroy leroy.boris@gmail.com

Maintainer: Boris Leroy leroy.boris@gmail.com

See Also

linearFun, quadraticFun

Examples

x <- 1:100
y <- logisticFun(x, alpha = -10, b = 50)
plot(y ~ x, type = "l")

# The effect of alpha:
y1 <- logisticFun(x, alpha = -0.01, b = 50)
y2 <- logisticFun(x, alpha = -10, b = 50)
y3 <- logisticFun(x, alpha = -1000, b = 50)

par(mfrow = c(1, 3))
plot(y1 ~ x, type = "l", main = expression(alpha %->% 0))
plot(y2 ~ x, type = "l", main = expression(alpha %~~% range(x)/10))
plot(y3 ~ x, type = "l", main = expression(alpha %->% infinity))

[Package virtualspecies version 1.6 Index]