logistic: Logistic function

Description Usage Arguments Value Examples

View source: R/stats.R

Description

Logistic function

Usage

1
logistic(x, l = 1, k = 2, m = 0)

Arguments

x

logit scaled input vector

l

max possible value

k

slope. Default=2. Set to 1 to be equal to sigmoid function.

m

mean or center point of x

Value

numeric vector or value

Examples

1
2
3
4
x <- logit(seq(0.001, 0.999, length.out = 50))
plot(x = x, y = logistic(x), type = "l")             # defaults
plot(x = x, y = logistic(x, k=1), type = "l")        # sigmoid
plot(x = x, y = logistic(x, l=2, k=8)-1, type = "l") # change range and slope then subtract 1

iamamutt/mejr documentation built on May 18, 2019, 1:27 a.m.