View source: R/common_mathematical_functions.R
sigmoid | R Documentation |
This function evaluates a sigmoidal function.
sigmoid(x, x0, L, k)
x |
A numeric vector which defines the values at which the sigmoidal function will be evaluated. |
x0 |
A numeric value which defines the x-value of the sigmoid's midpoint |
L |
A numeric value which defines expected change in f(x) above/below 0. For example, if |
k |
A numeric value which affects the steepness of the function. |
A number or a numeric vector.
Edward Lavender
x <- 1:10 plot(x, sigmoid(x, 5, L = 5, k = 1), type = "b") abline(h = 0, lty = 3) x <- 0:20 plot(x, sigmoid(x, 5, L = 2, k = 1), type = "b") abline(h = 0, lty = 3) x <- -60:60 plot(x, sigmoid(x, 0, L = 2, k = 0.1), type = "b") abline(h = 0, lty = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.