\Header{gnlsControl}{Control Values for gnls Fit}
\keyword{models}{gnlsControl}
\begin{Description}\relax
The values supplied in the function call replace the defaults and a
list with all possible arguments is returned. The returned list is
used as the \code{control} argument to the \code{gnls} function.
\end{Description}
\begin{Usage}
\begin{verbatim}
gnlsControl(maxIter, nlsMaxIter, msMaxIter, minScale, tolerance,
            nlsTol, msTol, msScale, returnObject, msVerbose,
            apVar, .relStep, nlmStepMax, minAbsParApVar)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{maxIter}] maximum number of iterations for the \code{gnls}
optimization algorithm. Default is 50.
\item[\code{nlsMaxIter}] maximum number of iterations
for the \code{nls} optimization step inside the \code{gnls}
optimization. Default is 7.
\item[\code{msMaxIter}] maximum number of iterations
for the \code{ms} optimization step inside the \code{gnls}
optimization. Default is 50.
\item[\code{minScale}] minimum factor by which to shrink the default step size
in an attempt to decrease the sum of squares in the \code{nls} step.
Default 0.001.
\item[\code{tolerance}] tolerance for the convergence criterion in the
\code{gnls} algorithm. Default is 1e-6.
\item[\code{nlsTol}] tolerance for the convergence criterion in \code{nls}
step. Default is 1e-3.
\item[\code{msTol}] tolerance for the convergence criterion in \code{ms},
passed as the \code{rel.tolerance} argument to the function (see
documentation on \code{ms}). Default is 1e-7.
\item[\code{msScale}] scale function passed as the \code{scale} argument to
the \code{ms} function (see documentation on that function). Default
is \code{lmeScale}.
\item[\code{returnObject}] a logical value indicating whether the fitted
object should be returned when the maximum number of iterations is
reached without convergence of the algorithm. Default is
\code{FALSE}.
\item[\code{msVerbose}] a logical value passed as the \code{trace} argument to
\code{ms} (see documentation on that function). Default is
\code{FALSE}.
\item[\code{apVar}] a logical value indicating whether the approximate
covariance matrix of the variance-covariance parameters should be
calculated. Default is \code{TRUE}.
\item[\code{.relStep}] relative step for numerical derivatives
calculations. Default is \code{.Machine\$double.eps\textasciicircum{}(1/3)}.
\item[\code{nlmStepMax}] stepmax value to be passed to nlm. See
\code{\Link{nlm}} for details. Default is 100.0
\item[\code{minAbsParApVar}] numeric value - minimum absolute parameter value
in the approximate variance calculation.  The default is \code{0.05}.
\end{ldescription}
\end{Arguments}
\begin{Value}
a list with components for each of the possible arguments.
\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{gnls}}, \code{\Link{lmeScale}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# decrease the maximum number iterations in the ms call and
# request that information on the evolution of the ms iterations be printed
gnlsControl(msMaxIter = 20, msVerbose = TRUE)
\end{ExampleCode}
\end{Examples}

