\HeaderA{nls.control}{Control the Iterations in nls}{nls.control}
\keyword{nonlinear}{nls.control}
\keyword{regression}{nls.control}
\keyword{models}{nls.control}
\begin{Description}\relax
Allow the user to set some characteristics of the \code{nls}
nonlinear least squares algorithm.
\end{Description}
\begin{Usage}
\begin{verbatim}
nls.control(maxiter = 50, tol = 1e-05, minFactor = 1/1024,
            printEval = FALSE, warnOnly = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{maxiter}] A positive integer specifying the maximum number of
iterations allowed.
\item[\code{tol}] A positive numeric value specifying the tolerance level for
the relative offset convergence criterion.
\item[\code{minFactor}] A positive numeric value specifying the minimum
step-size factor allowed on any step in the iteration.  The
increment is calculated with a Gauss-Newton algorithm and
successively halved until the residual sum of squares has been
decreased or until the step-size factor has been reduced below this
limit.
\item[\code{printEval}] a logical specifying whether the number of evaluations
(steps in the gradient direction taken each iteration) is printed.
\item[\code{warnOnly}] a logical specifying whether \code{\LinkA{nls}{nls}()} should
return instead of signalling an error in the case of termination
before convergence.
Termination before convergence happens upon completion of \code{maxiter}
iterations, in the case of a singular gradient, and in the case that the
step-size factor is reduced below \code{minFactor}.
\end{ldescription}
\end{Arguments}
\begin{Value}
A \code{list} with exactly five components:
\begin{ldescription}
\item[\code{maxiter}] 
\item[\code{tol}] 
\item[\code{minFactor}] 
\item[\code{printEval}] 
\item[\code{warnOnly}] 
\end{ldescription}

with meanings as explained under \sQuote{Arguments}.
\end{Value}
\begin{Author}\relax
Douglas Bates and Saikat DebRoy
\end{Author}
\begin{References}\relax
Bates and Watts (1988),
\emph{Nonlinear Regression Analysis and Its Applications}, Wiley.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{nls}{nls}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
nls.control(minFactor = 1/2048)
\end{ExampleCode}
\end{Examples}

