logistic_fun: Logistic function

Description Usage Arguments Value See Also Examples

View source: R/logistic_fun.R

Description

Logistic function of the form (1 + exp(-β * (x - α)))^(-1)

Usage

1

Arguments

x

Vector of values of the explanatory variable.

p

Vector of parameters p = c(α, β).

Value

Probability at each x.

See Also

inv_logistic_fun

Examples

1
2
3
4
xseq <- seq(0, 4, .01)
yseq <- logistic_fun(xseq, c(2, 4))
curve <- data.frame(x = xseq, y = yseq)
ggplot(curve, aes(x = x, y = y)) + geom_line()

quickpsy documentation built on May 30, 2017, 1:41 a.m.

Search within the quickpsy package
Search all R packages, documentation and source code