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()

Example output

Loading required package: DEoptim
Loading required package: parallel

DEoptim package
Differential Evolution algorithm in R
Authors: D. Ardia, K. Mullen, B. Peterson and J. Ulrich

Loading required package: dplyr

Attaching package:dplyrThe following objects are masked frompackage:stats:

    filter, lag

The following objects are masked frompackage:base:

    intersect, setdiff, setequal, union

Loading required package: ggplot2

Attaching package:quickpsyThe following object is masked frompackage:stats:

    deviance

quickpsy documentation built on Oct. 2, 2019, 5:03 p.m.