SSgompertz
Self-Starting Nls Gompertz Growth Model

Description

Evaluates the Gompertz growth model and its gradient, and the starting values for fitting a Gompertz growth model to data. This is a selfStart function.

Usage

SSgompertz(x, Asym, b2, b3)

Arguments

x a numeric vector of values at which to evaluate the model.
Asym a numeric value representing the asymptote.
b2 a numeric parameter related to the value of the function when x is zero.
b3 a numeric parameter related to the scale of x.

Details

Being a selfStart function, SSgompertz has the attribute "initial", which is a function that nls can call to compute reasonable starting values for fitting a Gompertz growth model to data.
Value
returns a numeric vector of the same length as x. It is the value of the expression Asym*exp(-b2*b3^x).
If all arguments except x are names of objects, the gradient matrix with respect to these names (evaluated at the values of those names) is attached as an attribute named gradient.
Note
This function is intended for use primarily in formulae given to the nls function or similar functions.
See Also
nls, selfStart.
Examples
SSgompertz(seq(10,20,by=2)/100, Asym=2, b2=5, b3=1.3)

with(list(Asymptote=2, b2=5, b3=1.3), SSgompertz(seq(10,20,by=2)/100, Asymptote, b2, b3))

nls(Y ~ SSgompertz(X, Asymptote, b2, b3), data=data.frame(X=(11:20), Y=sort(log(11:20)+1)))

Package stats version 6.0.0-69
Package Index