SSweibull
Self-Starting Nls Weibull Growth Curve Model

Description

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

Usage

SSweibull(x, Asym, Drop, lrc, pwr)

Arguments

x a numeric vector of values at which to evaluate the model.
Asym a numeric value representing the horizontal asymptote.
Drop a numeric parameter representing the change from Asym to the y intercept.
lrc a numeric parameter representing the natural logarithm of the rate constant.
pwr a numeric parameter representing the power to which x is raised.

Details

Being a selfStart function, SSweibull has an attribute called "initial", which is a function that nls can call to compute reasonable starting values for fitting a Weibull growth model to data.
Value
returns a numeric vector of the same length as x. It is the value of the expression Asym - Drop *exp(-exp(lrc) * x^pwr).
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.
References
Ratkowsky, D. A. 1983. Statistical Computing. Marcel Dekker, Ed. Section 4.4.5.
See Also
nls, selfStart.
Examples
SSweibull(seq(2, 20,by=2), Asym=13, Drop=5, lrc = -3.5, pwr=1.5)

with(list(Asymptote=13, Drop=5, lrc=-3.5, pwr=1.5), SSweibull(seq(2,20,by=2), Asymptote, Drop, lrc, pwr))

tdata <- data.frame( X=seq(2,20,by=2), Y= c(39, 48,65,87,115,132,138,145,155,156) )

nls(Y ~ SSweibull(X, Asymptote, Drop, lrc, pwr), data= tdata)

Package stats version 6.0.0-69
Package Index