Defines a simple logistic function, @f$ e^x / (1 + e^x) @f$.

Description

Defines a simple logistic function, @f$ e^x / (1 + e^x) @f$.

Usage

1

Arguments

x

the variable to calculate the logistic function for

Details

The logistic function is used repeatedly in the coverage analysis so it defined here to improve the readability of those calculations.

Value

@code exp(x) / (1 + exp(x))

References

http://en.wikipedia.org/wiki/Logistic_function

Examples

1
2
x <- c( -10:-2, seq(-2,2,0.2), 2:10 )
plot( x=x, y=logistic(x) )

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.