Skip to contents

Calculates the logistic function value given parameters and input.

Usage

logist(x, x_0 = 0, L = 1, k = 1)

Arguments

x

Numeric vector, the values at which the logistic function will be evaluated.

x_0

Numeric, the x-value of the sigmoid's midpoint. Default is 0.

L

Numeric, the maximum value of the sigmoid. Default is 1.

k

Numeric, the steepness or slope of the sigmoid. Default is 1.

Value

A numeric vector of logistic function values.

Examples

x_vals <- seq(0, 10, by = 0.1)
logist(x_vals, x_0 = 0, L = 2, k = 0.5)
#>   [1] 1.000000 1.024995 1.049958 1.074860 1.099668 1.124353 1.148885 1.173235
#>   [9] 1.197375 1.221278 1.244919 1.268271 1.291313 1.314021 1.336376 1.358357
#>  [17] 1.379949 1.401134 1.421899 1.442230 1.462117 1.481550 1.500520 1.519022
#>  [25] 1.537050 1.554600 1.571670 1.588259 1.604368 1.619997 1.635149 1.649827
#>  [33] 1.664037 1.677782 1.691069 1.703906 1.716298 1.728254 1.739783 1.750893
#>  [41] 1.761594 1.771895 1.781806 1.791338 1.800499 1.809301 1.817754 1.825868
#>  [49] 1.833655 1.841123 1.848284 1.855147 1.861723 1.868022 1.874053 1.879827
#>  [57] 1.885352 1.890637 1.895693 1.900527 1.905148 1.909565 1.913785 1.917817
#>  [65] 1.921669 1.925346 1.928858 1.932210 1.935409 1.938462 1.941376 1.944155
#>  [73] 1.946806 1.949335 1.951746 1.954045 1.956237 1.958327 1.960319 1.962218
#>  [81] 1.964028 1.965752 1.967395 1.968960 1.970452 1.971873 1.973226 1.974515
#>  [89] 1.975743 1.976912 1.978026 1.979087 1.980096 1.981058 1.981973 1.982845
#>  [97] 1.983675 1.984465 1.985217 1.985933 1.986614