

   NNoonnlliinneeaarr RReeggrreessssiioonn

        nlr(y, mu=NULL, p=NULL, dist="normal", wt=1, delta=1,
        print.level=0, typsiz=abs(p), ndigit=10, gradtol=0.00001,
        stepmax=10*sqrt(p%*%p), steptol=0.00001, iterlim=100, fscale=1)

   AArrgguummeennttss::

          y: The response vector.

         mu: A function of `p' giving the regression equation
             for the mean.

          p: Vector of initial estimates of the parameters.

       dist: The distribution to be used: normal, gamma, or
             inverse Gauss.

         wt: Weight vector.

      delta: Scalar or vector giving the unit of measurement
             for each response value, set to unity by default.
             For example, if a response is measured to two dec-
             imals, delta=0.01. If the response is transformed,
             this must be multiplied by the Jacobian. For exam-
             ple, with a log transformation, `delta=1/y'.

     others: Arguments controlling `nlm'.

   DDeessccrriippttiioonn::

        `nlr' fits a user-specified nonlinear regression equa-
        tion by least squares (normal) or its generalization
        for the gamma and inverse Gauss distributions.

   VVaalluuee::

        A list of class nlr is returned.  The printed output
        includes the -log likelihood (not the deviance), the
        corresponding AIC, the parameter estimates, standard
        errors, and correlations. A list is returned that con-
        tains all of the relevant information calculated,
        including error codes.

   SSeeee AAllssoo::

        `lm', `glm', `glmm', `gnlmm', `gnlr', `gnlr3', `fmr'.

   EExxaammpplleess::

        # linear regression
        mu1 <- function(p) p[1]+p[2]*x
        summary(lm(y~x))
        nlr(y,mu=mu1,p=c(3,2))
        # nonlinear regression
        mu2 <- function(p) p[1]+p[2]*x^p[3]
        nlr(y,mu=mu2,p=c(3,2,1))

