EVOLUTION-MANAGER
Edit File: nlsList.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: List of nls Objects with a Common Model</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 nlsList {nlme}"><tr><td>nlsList {nlme}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>List of nls Objects with a Common Model</h2> <h3>Description</h3> <p><code>Data</code> is partitioned according to the levels of the grouping factor defined in <code>model</code> and individual <code>nls</code> fits are obtained for each <code>data</code> partition, using the model defined in <code>model</code>. </p> <h3>Usage</h3> <pre> nlsList(model, data, start, control, level, subset, na.action = na.fail, pool = TRUE, warn.nls = NA) ## S3 method for class 'nlsList' update(object, model., ..., evaluate = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>an object inheriting from class <code>nlsList</code>, representing a list of fitted <code>nls</code> objects.</p> </td></tr> <tr valign="top"><td><code>model</code></td> <td> <p>either a nonlinear model formula, with the response on the left of a <code>~</code> operator and an expression involving parameters, covariates, and a grouping factor separated by the <code>|</code> operator on the right, or a <code>selfStart</code> function. The method function <code><a href="nlsList.selfStart.html">nlsList.selfStart</a></code> is documented separately. </p> </td></tr> <tr valign="top"><td><code>model.</code></td> <td> <p>changes to the model – see <code><a href="../../stats/html/update.formula.html">update.formula</a></code> for details.</p> </td></tr> <tr valign="top"><td><code>data</code></td> <td> <p>a data frame in which to interpret the variables named in <code>model</code>. </p> </td></tr> <tr valign="top"><td><code>start</code></td> <td> <p>an optional named list with initial values for the parameters to be estimated in <code>model</code>. It is passed as the <code>start</code> argument to each <code>nls</code> call and is required when the nonlinear function in <code>model</code> does not inherit from class <code>selfStart</code>. </p> </td></tr> <tr valign="top"><td><code>control</code></td> <td> <p>a list of control values passed as the <code>control</code> argument to <code>nls</code>. Defaults to an empty list. </p> </td></tr> <tr valign="top"><td><code>level</code></td> <td> <p>an optional integer specifying the level of grouping to be used when multiple nested levels of grouping are present.</p> </td></tr> <tr valign="top"><td><code>subset</code></td> <td> <p>an optional expression indicating the subset of the rows of <code>data</code> that should be used in the fit. This can be a logical vector, or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included. All observations are included by default.</p> </td></tr> <tr valign="top"><td><code>na.action</code></td> <td> <p>a function that indicates what should happen when the data contain <code>NA</code>s. The default action (<code>na.fail</code>) causes <code>nlsList</code> to print an error message and terminate if there are any incomplete observations. </p> </td></tr> <tr valign="top"><td><code>pool</code></td> <td> <p>an optional logical value that is preserved as an attribute of the returned value. This will be used as the default for <code>pool</code> in calculations of standard deviations or standard errors for summaries. </p> </td></tr> <tr valign="top"><td><code>warn.nls</code></td> <td> <p><code><a href="../../base/html/logical.html">logical</a></code> indicating if <code><a href="../../stats/html/nls.html">nls</a>()</code> errors (all of which are caught by <code><a href="../../base/html/conditions.html">tryCatch</a></code>) should be signalled as a “summarizing” <code><a href="../../base/html/warning.html">warning</a></code>.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>some methods for this generic require additional arguments. None are used in this method.</p> </td></tr> <tr valign="top"><td><code>evaluate</code></td> <td> <p>If <code>TRUE</code> evaluate the new call else return the call.</p> </td></tr> </table> <h3>Details</h3> <p>As <code><a href="../../stats/html/nls.html">nls</a>(.)</code> is called on each sub group, and convergence of these may be problematic, these calls happen with error catching. </p> <p>Since <span class="pkg">nlme</span> version <code>3.1-127</code> (2016-04), all the errors are caught (via <code><a href="../../base/html/conditions.html">tryCatch</a></code>) and if present, a “summarizing” <code><a href="../../base/html/warning.html">warning</a></code> is stored as attribute of the resulting <code>"nlsList"</code> object and signalled unless suppressed by <code>warn.nls = FALSE</code> or currently also when <code>warn.nls = NA</code> (default) <em>and</em> <code><a href="../../base/html/options.html">getOption</a>("show.error.messages")</code> is false. </p> <p><code>nlsList()</code> originally had used <code><a href="../../base/html/try.html">try</a>(*)</code> (with its default <code>silent=FALSE)</code> and hence all errors were printed to the console <em>unless</em> the global option <code>show.error.messages</code> was set to true. This still works, but has been <em>deprecated</em>. </p> <h3>Value</h3> <p>a list of <code>nls</code> objects with as many components as the number of groups defined by the grouping factor. Generic functions such as <code>coef</code>, <code>fixed.effects</code>, <code>lme</code>, <code>pairs</code>, <code>plot</code>, <code>predict</code>, <code>random.effects</code>, <code>summary</code>, and <code>update</code> have methods that can be applied to an <code>nlsList</code> object. </p> <h3>References</h3> <p>Pinheiro, J.C., and Bates, D.M. (2000), <em>Mixed-Effects Models in S and S-PLUS</em>, Springer. </p> <h3>See Also</h3> <p><code><a href="../../stats/html/nls.html">nls</a></code>, <code><a href="nlme.nlsList.html">nlme.nlsList</a></code>, <code><a href="nlsList.selfStart.html">nlsList.selfStart</a></code>, <code><a href="summary.nlsList.html">summary.nlsList</a></code> </p> <h3>Examples</h3> <pre> fm1 <- nlsList(uptake ~ SSasympOff(conc, Asym, lrc, c0), data = CO2, start = c(Asym = 30, lrc = -4.5, c0 = 52)) summary(fm1) cfm1 <- confint(fm1) # via profiling each % FIXME: only *one* message instead of one *each* stopifnot((i.ok <- which(sapply(cfm1, class) == "matrix")) %in% c(2:4,6:9, 12)) ## where as (some of) the others gave errors during profile re-fitting : str(cfm1[- i.ok]) </pre> <hr /><div style="text-align: center;">[Package <em>nlme</em> version 3.1-139 <a href="00Index.html">Index</a>]</div> </body></html>