SSfpl
Four-parameter Logistic Model

Description

Fits a four-parameter logistic model. This is a selfStart function.

Usage

SSfpl(input, A, B, xmid, scal)

Arguments

input a numeric vector of values at which to evaluate the model.
A a numeric parameter representing the horizontal asymptote on the left side (very small values of input).
B a numeric parameter representing the horizontal asymptote on the right side (very large values of input).
xmid a numeric parameter representing the input value at the inflection point of the curve. The value of SSfpl at xmid is midway between A and B.
scal a numeric scale parameter on the input axis. The smaller one makes scal, the steeper the curve is at the inflection point.

Details

Because it is a selfStart function, SSfpl has an attribute called "initial", which is a function that nls can call to compute reasonable starting values for fitting an asymptotic model to the input data.
Value
returns a numeric vector of the same length as input, which is the value of the expression A+(B-A)/(1+exp((xmid-input)/scal)). If all of the arguments A, B, xmid, and scal are names of objects, the gradient (Jacobian) matrix with respect to these names is attached as an attribute named gradient.
Note
This is primarily intended for use in formulae given to nls function or similar functions.
See Also
nls, selfStart, getInitial.
Examples
tDat <- data.frame(
    Time = c(0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 21),
    weight = c(42, 51, 59, 64, 76, 93, 106, 125, 149, 171, 199, 205))
SSfpl(tDat$Time, 25, 350, 20, 6)
nls(weight ~ SSfpl(Time, initWt, finalWt, peakGrowthTime, invRate), data=tDat)
Package stats version 6.1.4-13
Package Index