\Header{selfStart.default}{Construct Self-starting Nonlinear Models}
\keyword{models}{selfStart.default}
\begin{Description}\relax
A method for the generic function `selfStart' for formula objects.\end{Description}
\begin{Usage}
\begin{verbatim}
selfStart(model, initial, parameters, template)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{model}] a function object defining a nonlinear model.
\item[\code{initial}] a function object, taking three arguments: \code{mCall},
\code{data}, and \code{LHS}, representing, respectively, a matched
call to the function \code{model}, a data frame in
which to interpret the variables in \code{mCall}, and the expression
from the left-hand side of the model formula in the call to \code{nls}.
This function should return initial values for the parameters in
\code{model}.
\item[\code{parameters, template}] these arguments are included for
consistency with the generic function, but are not used
in the \code{default} method. See the documentation on
\code{selfStart.formula}.
\end{ldescription}
\end{Arguments}
\begin{Value}
a function object of class \code{selfStart}, corresponding to a
self-starting nonlinear model function. An \code{initial} attribute
(defined by the \code{initial} argument) is added to the function to
calculate starting estimates for the parameters in the model
automatically.\end{Value}
\begin{Author}\relax
Jose Pinheiro and Douglas Bates\end{Author}
\begin{SeeAlso}\relax
\code{\Link{selfStart.formula}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
library(nls)
# `first.order.log.model' is a function object defining a first order
# compartment model 
# `first.order.log.initial' is a function object which calculates initial
# values for the parameters in `first.order.log.model'

# self-starting first order compartment model

SSfol <- selfStart(first.order.log.model, first.order.log.initial)

\end{ExampleCode}
\end{Examples}

