Construct Self-starting Nonlinear Models

DESCRIPTION:

A method for the generic function selfStart for formula objects.

USAGE:

selfStart(model, initial, parameters, template) 

REQUIRED ARGUMENTS:

model
a function object defining a nonlinear model.
initial
a function object, taking three arguments: mCall, data, and LHS, representing, respectively, a matched call to the function model, a data frame in which to interpret the variables in mCall, and the expression from the left hand side of the model formula in the call to nls. This function should return initial values for the parameters in model.

OPTIONAL ARGUMENTS:

parameters, template
these arguments are included for consistency with the call to the generic function, but are not used in the default method. See the documentation on selfStart.formula.

VALUE:

a function object of class selfStart, corresponding to a self-starting nonlinear model function. An initial attribute (defined by the initial argument) is added to the function to calculate starting estimates for the parameters in the model automatically.

SEE ALSO:

EXAMPLES:

# `first.order.log.model' is a function object defining a first order 
# compartment model  
# `first.order.log.initial' is a function object which calculates initial 
# values for the parameters in `first.order.log.model' 
# self-starting first order compartment model 
SSfol <- selfStart(first.order.log.model, first.order.log.initial)