This closure is useful for simulating catchability (q) inside the sim_survey() function.

sim_logistic(k = 2, x0 = 3, plot = FALSE)

Arguments

k

Steepness of the curve.

x0

The x-value at the midpoint of the sigmoid.

plot

Logical. Should the relationship be plotted?

Value

A function that can be passed to sim_survey().

Examples

logistic_fun <- sim_logistic(k = 2, x0 = 3, plot = TRUE)
logistic_fun(x = 1:10)

#>  [1] 0.01798621 0.11920292 0.50000000 0.88079708 0.98201379 0.99752738
#>  [7] 0.99966465 0.99995460 0.99999386 0.99999917