\HeaderA{glsControl}{Control Values for gls Fit}{glsControl}
\keyword{models}{glsControl}
\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{gls} function.
\end{Description}
\begin{Usage}
\begin{verbatim}
glsControl(maxIter, msMaxIter, tolerance, msTol, msScale, msVerbose,
           singular.ok, qrTol, returnObject, apVar, .relStep,
           nlmStepMax, minAbsParApVar, natural)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{maxIter}] maximum number of iterations for the \code{gls}
optimization algorithm. Default is 50.
\item[\code{msMaxIter}] maximum number of iterations
for the optimization step inside the \code{gls}
optimization. Default is 50.
\item[\code{tolerance}] tolerance for the convergence criterion in the
\code{gls} algorithm. Default is 1e-6.
\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{msVerbose}] a logical value passed as the \code{trace} argument to
\code{ms} (see documentation on that function). Default is
\code{FALSE}.
\item[\code{singular.ok}] a logical value indicating whether non-estimable
coefficients (resulting from linear dependencies among the columns of
the regression matrix) should be allowed. Default is \code{FALSE}.
\item[\code{qrTol}] a tolerance for detecting linear dependencies among the
columns of the regression matrix in its QR decomposition. Default is
\code{.Machine\$single.eps}.
\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{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{\LinkA{nlm}{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}.
\item[\code{natural}] logical.  Should the natural parameterization be used
for the approximate variance calculations?  Default is \code{TRUE}.
\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{\LinkA{gls}{gls}}, \code{\LinkA{lmeScale}{lmeScale}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# decrease the maximum number iterations in the optimization call and
# request that information on the evolution of the ms iterations be printed
glsControl(msMaxIter = 20, msVerbose = TRUE)

\end{ExampleCode}
\end{Examples}

