Learn R Programming

bossMaps (version 0.1.0)

logistic: Apply a custom logisitic transform to a vector

Description

Performs a generalized logistic transform (aka Richard's curve) as follows: $$Y(t) = upper - { upper-lower \over (1 + e^{-rate(x - shift)}) ^ {1 / skew} }$$

Usage

logistic(x, lower = 0, upper = 1, rate = 0.04, skew = 0.2, shift = 0, parms = NULL)

Arguments

x
vector or raster* object to apply logistic transform.
lower
The lower asymptote
upper
The upper asymptote
rate
The rate of decay. A rate of 0 indicates no decay, while large rates (>10) become like step-functions.
skew
Affects near which asymptote maximum rate (skew must be >0). If skew=1, the curve becomes a standard symetrical logistic centered at m. As skew approaches zero, it becomes more asymetrical.
shift
The time of maximum decay. Slides the curve left-right.
parms
an optional list with each of the following named parameters (e.g. list(lower=0.01,upper=1,rate=0.04,skew=0.2,shift=0)). Use of parms rather than naming each parameter separately is for convenience with the optim function.

References

Richards, F. J. (1959). 'A Flexible Growth Function for Empirical Use'. Journal of Experimental Botany 10 (2): 290-300.

Examples

Run this code
curve(logistic(x,rate=0.05,skew=0.5),-150,300)

Run the code above in your browser using DataLab