nlsLMList: Create a list of nls objects with the option of using nlsLM...

nlsLMListR Documentation

Create a list of nls objects with the option of using nlsLM in addition to nls

Description

This function is a copy of 'nlsList' from the 'nlme' package modified to use the 'nlsLM' function in addition to (optionally) 'nls'. By changing the algorithm argument it is possible to use 'nls' as well

Usage

nlsLMList(
  model,
  data,
  start,
  control,
  level,
  subset,
  na.action = na.fail,
  algorithm = c("LM", "default", "port", "plinear"),
  lower = NULL,
  upper = NULL,
  pool = TRUE,
  warn.nls = NA
)

## S3 method for class 'selfStart'
nlsLMList(
  model,
  data,
  start,
  control,
  level,
  subset,
  na.action = na.fail,
  algorithm = c("LM", "default", "port", "plinear"),
  lower = NULL,
  upper = NULL,
  pool = TRUE,
  warn.nls = NA
)

Arguments

model

either a nonlinear model formula, with the response on the left of a ~ operator and an expression involving parameters, covariates, and a grouping factor separated by the | operator on the right, or a selfStart function.

data

a data frame

start

list with starting values

control

control list, see nls

level

an optional integer specifying the level of grouping to be used when multiple nested levels of grouping are present.

subset

subset of rows to use

na.action

a function that indicates what should happen when the data contain NAs. The default action (na.fail) causes nlsList to print an error message and terminate if there are any incomplete observations.

algorithm

choice of algorithm. Default is ‘LM’ which uses ‘nlsLM’ from the minpack.lm package. Other options are: “default”, “port” and “plinear” (nls).

lower

vectors of lower and upper bounds, replicated to be as long as start. If unspecified, all parameters are assumed to be unconstrained. Bounds can only be used with the “port” algorithm. They are ignored, with a warning, if given for other algorithms.

upper

see ‘lower’

pool

an optional logical value that is preserved as an attribute of the returned value. This will be used as the default for pool in calculations of standard deviations or standard errors for summaries.

warn.nls

logical indicating if nls errors (all of which are caught by tryCatch) should be signalled as a “summarizing” warning.

Details

See function nlsList and nlsLM. This function is a copy of nlsList but with minor changes to use LM instead as the default algorithm. The authors of the original function are Pinheiro and Bates.

Value

an object of class ‘nlsList’

an object of class ‘nlsList’

Author(s)

Jose C. Pinheiro and Douglas M. Bates bates@stat.wisc.edu wrote the original nlsList. Fernando E. Miguez made minor changes to use nlsLM in addition to (optionally) nls. R-Core maintains copyright after 2006.


nlraa documentation built on May 29, 2024, 2:01 a.m.