logistic_fun: Logistic function

View source: R/logistic_fun.R

logistic_funR Documentation

Logistic function

Description

Logistic function of the form (1 + exp(-\beta * (x - \alpha)))^(-1)

Usage

logistic_fun(x, p)

Arguments

x

Vector of values of the explanatory variable.

p

Vector of parameters p = c(\alpha, \beta).

Value

Probability at each x.

See Also

inv_logistic_fun

Examples

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 March 11, 2026, 5:06 p.m.