EVOLUTION-MANAGER
Edit File: lmeControl.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Specifying Control Values for lme Fit</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for lmeControl {nlme}"><tr><td>lmeControl {nlme}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Specifying Control Values for lme Fit</h2> <h3>Description</h3> <p>The values supplied in the <code>lmeControl()</code> call replace the defaults, and a <code><a href="../../base/html/list.html">list</a></code> with all settings (i.e., values for all possible arguments) is returned. The returned list is used as the <code>control</code> argument to the <code>lme</code> function. </p> <h3>Usage</h3> <pre> 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, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>maxIter</code></td> <td> <p>maximum number of iterations for the <code>lme</code> optimization algorithm. Default is <code>50</code>.</p> </td></tr> <tr valign="top"><td><code>msMaxIter</code></td> <td> <p>maximum number of iterations for the optimization step inside the <code>lme</code> optimization. Default is <code>50</code>.</p> </td></tr> <tr valign="top"><td><code>tolerance</code></td> <td> <p>tolerance for the convergence criterion in the <code>lme</code> algorithm. Default is <code>1e-6</code>.</p> </td></tr> <tr valign="top"><td><code>niterEM</code></td> <td> <p>number of iterations for the EM algorithm used to refine the initial estimates of the random effects variance-covariance coefficients. Default is <code>25</code>.</p> </td></tr> <tr valign="top"><td><code>msMaxEval</code></td> <td> <p>maximum number of evaluations of the objective function permitted for nlminb. Default is <code>200</code>.</p> </td></tr> <tr valign="top"><td><code>msTol</code></td> <td> <p>tolerance for the convergence criterion on the first iteration when <code>optim</code> is used. Default is <code>1e-7</code>.</p> </td></tr> <tr valign="top"><td><code>msVerbose</code></td> <td> <p>a logical value passed as the <code>trace</code> argument to <code><a href="../../stats/html/nlminb.html">nlminb</a></code> or <code><a href="../../stats/html/optim.html">optim</a></code>. Default is <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>returnObject</code></td> <td> <p>a logical value indicating whether the fitted object should be returned with a <code><a href="../../base/html/warning.html">warning</a></code> (instead of an error via <code><a href="../../base/html/stop.html">stop</a>()</code>) when the maximum number of iterations is reached without convergence of the algorithm. Default is <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>gradHess</code></td> <td> <p>a logical value indicating whether numerical gradient vectors and Hessian matrices of the log-likelihood function should be used in the internal optimization. This option is only available when the correlation structure (<code>corStruct</code>) and the variance function structure (<code>varFunc</code>) have no "varying" parameters and the <code>pdMat</code> classes used in the random effects structure are <code>pdSymm</code> (general positive-definite), <code>pdDiag</code> (diagonal), <code>pdIdent</code> (multiple of the identity), or <code>pdCompSymm</code> (compound symmetry). Default is <code>TRUE</code>.</p> </td></tr> <tr valign="top"><td><code>apVar</code></td> <td> <p>a logical value indicating whether the approximate covariance matrix of the variance-covariance parameters should be calculated. Default is <code>TRUE</code>.</p> </td></tr> <tr valign="top"><td><code>.relStep</code></td> <td> <p>relative step for numerical derivatives calculations. Default is <code>.Machine$double.eps^(1/3)</code>.</p> </td></tr> <tr valign="top"><td><code>opt</code></td> <td> <p>the optimizer to be used, either <code>"<a href="../../stats/html/nlminb.html">nlminb</a>"</code> (the default) or <code>"<a href="../../stats/html/optim.html">optim</a>"</code>.</p> </td></tr> <tr valign="top"><td><code>optimMethod</code></td> <td> <p>character - the optimization method to be used with the <code><a href="../../stats/html/optim.html">optim</a></code> optimizer. The default is <code>"BFGS"</code>. An alternative is <code>"L-BFGS-B"</code>.</p> </td></tr> <tr valign="top"><td><code>minAbsParApVar</code></td> <td> <p>numeric value - minimum absolute parameter value in the approximate variance calculation. The default is <code>0.05</code>.</p> </td></tr> <tr valign="top"><td><code>natural</code></td> <td> <p>a logical value indicating whether the <code>pdNatural</code> parametrization should be used for general positive-definite matrices (<code>pdSymm</code>) in <code>reStruct</code>, when the approximate covariance matrix of the estimators is calculated. Default is <code>TRUE</code>.</p> </td></tr> <tr valign="top"><td><code>sigma</code></td> <td> <p>optionally a positive number to fix the residual error at. If <code>NULL</code>, as by default, or <code>0</code>, sigma is estimated.</p> </td></tr> <tr valign="top"><td><code>allow.n.lt.q</code></td> <td> <p><code><a href="../../base/html/logical.html">logical</a></code> indicating if it is ok to have less observations than random effects for each group. The default, <code>FALSE</code> signals an error; if <code>NA</code>, such a situation only gives a warning, as in <span class="pkg">nlme</span> versions prior to 2019; if true, no message is given at all.</p> </td></tr> </table> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>further named control arguments to be passed, depending on <code>opt</code>, to <code><a href="../../stats/html/nlminb.html">nlminb</a></code> (those from <code>abs.tol</code> down) or <code><a href="../../stats/html/optim.html">optim</a></code> (those except <code>trace</code> and <code>maxit</code>; <code>reltol</code> is used only from the second iteration).</p> </td></tr> </table> <h3>Value</h3> <p>a list with components for each of the possible arguments. </p> <h3>Author(s)</h3> <p>José Pinheiro and Douglas Bates <a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a>; the <code>sigma</code> option: Siem Heisterkamp and Bert van Willigen.</p> <h3>See Also</h3> <p><code><a href="lme.html">lme</a></code>, <code><a href="../../stats/html/nlminb.html">nlminb</a></code>, <code><a href="../../stats/html/optim.html">optim</a></code></p> <h3>Examples</h3> <pre> # decrease the maximum number iterations in the ms call and # request that information on the evolution of the ms iterations be printed str(lCtr <- lmeControl(msMaxIter = 20, msVerbose = TRUE)) ## This should always work: do.call(lmeControl, lCtr) </pre> <hr /><div style="text-align: center;">[Package <em>nlme</em> version 3.1-139 <a href="00Index.html">Index</a>]</div> </body></html>