\Header{SSweibull}{Weibull growth curve model}
\keyword{models}{SSweibull}
\begin{Description}\relax
This \code{selfStart} model evaluates the Weibull model for growth
curve data and its gradient.  It has an \code{initial} attribute that
will evaluate initial estimates of the parameters \code{Asym}, \code{Drop},
\code{lrc}, and \code{pwr} for a given set of data.\end{Description}
\begin{Usage}
\begin{verbatim}
SSweibull(x, Asym, Drop, lrc, pwr)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a numeric vector of values at which to evaluate the model.
\item[\code{Asym}] a numeric parameter representing the horizontal asymptote on
the right side (very small values of \code{x}).
\item[\code{Drop}] a numeric parameter representing the change from
\code{Asym} to the \code{y} intercept.
\item[\code{lrc}] a numeric parameter representing the natural logarithm of
the rate constant.
\item[\code{pwr}] a numeric parameter representing the power to which \code{x}
is raised.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This model is a generalization of the \code{\Link{SSasymp}} model in
that it reduces to \code{SSasymp} when \code{pwr} is unity.\end{Details}
\begin{Value}
a numeric vector of the same length as \code{x}.  It is the value of
the expression \code{Asym-Drop*exp(-exp(lrc)*x\textasciicircum{}pwr)}.  If all of
the arguments \code{Asym}, \code{Drop}, \code{lrc}, and \code{pwr} are
names of objects, the gradient matrix with respect to these names is
attached as an attribute named \code{gradient}.\end{Value}
\begin{Author}\relax
Douglas Bates\end{Author}
\begin{References}\relax
Ratkowsky, David A. (1983), \emph{Nonlinear Regression Modeling},
Dekker. (section 4.4.5)\end{References}
\begin{SeeAlso}\relax
\code{\Link{nls}}, \code{\Link{selfStart}}, \code{\Link{SSasymp}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(ChickWeight)
Chick.6 <- subset(ChickWeight, (Chick == 6) & (Time > 0))
SSweibull(Chick.6$Time, 160, 115, -5.5, 2.5 )  # response only
Asym <- 160; Drop <- 115; lrc <- -5.5; pwr <- 2.5
SSweibull(Chick.6$Time, Asym, Drop, lrc, pwr)  # response and gradient
getInitial(weight ~ SSweibull(Time, Asym, Drop, lrc, pwr), data = Chick.6)
## Initial values are in fact the converged values
fm1 <- nls(weight ~ SSweibull(Time, Asym, Drop, lrc, pwr), data = Chick.6)
summary(fm1)
\end{ExampleCode}
\end{Examples}

