Rev 7620 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File nlme/man/lmeControl.Rd% Part of the nlme package for R% Distributed under GPL 2 or later: see ../LICENCE.note\name{lmeControl}\title{Specifying Control Values for lme Fit}\alias{lmeControl}\description{The values supplied in the \code{lmeControl()} call replace thedefaults, and a \code{\link{list}} with all settings (i.e., values forall possible arguments) is returned. The returned list isused as the \code{control} argument to the \code{lme} function.}\usage{lmeControl(maxIter = 50, msMaxIter = 50, tolerance = 1e-6, niterEM = 25,msMaxEval = 200,msTol = 1e-7, msVerbose = FALSE,returnObject = FALSE, gradHess = TRUE, apVar = TRUE,.relStep = .Machine$double.eps^(1/3), minAbsParApVar = 0.05,opt = c("nlminb", "optim"),optimMethod = "BFGS", natural = TRUE,sigma = NULL,allow.n.lt.q = FALSE,\dots)}\arguments{\item{maxIter}{maximum number of iterations for the \code{lme}optimization algorithm. Default is \code{50}.}\item{msMaxIter}{maximum number of iterationsfor the optimization step inside the \code{lme} optimization.Default is \code{50}.}\item{tolerance}{tolerance for the convergence criterion in the\code{lme} algorithm. Default is \code{1e-6}.}\item{niterEM}{number of iterations for the EM algorithm used to refinethe initial estimates of the random effects variance-covariancecoefficients. Default is \code{25}.}\item{msMaxEval}{maximum number of evaluations of the objectivefunction permitted for \code{\link{nlminb}}. Default is \code{200}.}\item{msTol}{tolerance for the convergence criterion on the firstiteration when \code{optim} is used. Default is \code{1e-7}.}\item{msVerbose}{a logical value passed as the \code{trace} argument to\code{\link{nlminb}} or \code{\link{optim}}. Default is \code{FALSE}.}\item{returnObject}{a logical value indicating whether the fittedobject should be returned with a \code{\link{warning}} (instead of anerror via \code{\link{stop}()}) when the maximum number ofiterations is reached without convergence of the algorithm. Defaultis \code{FALSE}.}\item{gradHess}{a logical value indicating whether numerical gradientvectors and Hessian matrices of the log-likelihood function shouldbe used in the internal optimization. This option is only availablewhen the correlation structure (\code{corStruct}) and the variancefunction structure (\code{varFunc}) have no "varying" parameters andthe \code{pdMat} classes used in the random effects structure are\code{pdSymm} (general positive-definite), \code{pdDiag} (diagonal),\code{pdIdent} (multiple of the identity), or\code{pdCompSymm} (compound symmetry). Default is \code{TRUE}.}\item{apVar}{a logical value indicating whether the approximatecovariance matrix of the variance-covariance parameters should becalculated. Default is \code{TRUE}.}\item{.relStep}{relative step for numerical derivativescalculations. Default is \code{.Machine$double.eps^(1/3)}.}\item{opt}{the optimizer to be used, either \code{"\link{nlminb}"} (thedefault) or \code{"\link{optim}"}.}\item{optimMethod}{character - the optimization method to be used withthe \code{\link{optim}} optimizer. The default is\code{"BFGS"}. An alternative is \code{"L-BFGS-B"}.}\item{minAbsParApVar}{numeric value - minimum absolute parameter valuein the approximate variance calculation. The default is \code{0.05}.}\item{natural}{a logical value indicating whether the \code{pdNatural}parametrization should be used for general positive-definite matrices(\code{pdSymm}) in \code{reStruct}, when the approximate covariancematrix of the estimators is calculated. Default is \code{TRUE}.}\item{sigma}{optionally a positive number to fix the residual error at.If \code{NULL}, as by default, or \code{0}, sigma is estimated.}\item{allow.n.lt.q}{\code{\link{logical}} indicating if it is ok to haveless observations than random effects for each group. The default,\code{FALSE} signals an error; if \code{NA}, such a situation only givesa warning, as in \pkg{nlme} versions prior to 2019; if true, no messageis given at all.}%% msg: "fewer observations than random effects in all level <Q> groups"\item{\dots}{further named control arguments to be passed, depending on\code{opt}, to \code{\link{nlminb}} (those from \code{abs.tol} down)or \code{\link{optim}} (those except \code{trace} and \code{maxit};\code{reltol} is used only from the second iteration).}}\value{a list with components for each of the possible arguments.}\author{José Pinheiro and Douglas Bates \email{bates@stat.wisc.edu}; the\code{sigma} option: Siem Heisterkamp and Bert van Willigen.}\seealso{\code{\link{lme}}, \code{\link{nlminb}}, \code{\link{optim}}}\examples{# decrease the maximum number iterations in the ms call and# request that information on the evolution of the ms iterations be printedstr(lCtr <- lmeControl(msMaxIter = 20, msVerbose = TRUE))## This should always work:do.call(lmeControl, lCtr)}\keyword{models}