Create a List of nls Objects with Common Regression Model

USAGE:
nlsList(formula, data, cluster, control)

REQUIRED ARGUMENTS:
formula:
a nonlinear model formula with the response on the left of a ~ operator, and an expression involving parameters and covariates on the right. The right hand side of formula should be a call to a self-starting model function (see the helpfile for selfStart), or else data should include initial values for the fits defined as data frame parameters (see data below).
data:
a data frame in which to do the computations. In addition to the usual data variables, the data frame may contain parameters (set, typically, by using the assignment form of parameters or param) that establish initial values for the model parameters. In the latter case, the same initial values will be used for all fits.
cluster:
an expression or formula object, specifying the partitioning of the data according to which different nls fits should be performed. If cluster is given as a formula, it should have no left side to the ~expression.

OPTIONAL ARGUMENTS:
control:
list of control values to be used in the iteration. See nls.control for the possible control options, their default settings, and their effect on the fitting.

VALUE:
a list of nls objects with as many components as the number of clusters defined by cluster. A NULL value is assigned to the components corresponding to clusters for which the nls algorithm failed to converge. Generic functions such as coef, pairs, summary, fixed.effects, random.effects, and nlme have methods that can be applied to an nlsList object.

SEE ALSO:
nls , nls.control , nlme.nlsList .

EXAMPLES:
# first.order.log is a self-starting model function

Theo.nlsList <- nlsList(conc ~ first.order.log(Dose, time, lCl, lka, lke), data = Theoph, cluster = ~ Subject)

Theo.nlsList

# Returns the following: $"1": Residual sum of squares : 4.286009 parameters: lCl lka lke -3.915838 0.5750919 -2.919581 formula: conc ~ first.order.log(Dose, time, lCl, lka, lke) 11 observations

. . .

$"12": Residual sum of squares : 2.809197 parameters: lCl lka lke -3.170138 -0.1829189 -2.248274 formula: conc ~ first.order.log(Dose, time, lCl, lka, lke) 11 observations