Next: MASIGN Up: Arima Macros Help File Previous: innovest()   Contents

levmar()

Usage:
levmar(b,x,y [,f],param [,resid:residmac,deriv:deriv,crit:crvec,\
       active:active,maxit:itmax,minit:itmin,print:T])
b        REAL vector of starting values for coefficients
x        REAL variable, usually a vector or matrix with nrows(x) =
         nrows(y)
y        REAL vector of data to be fit
f        macro called as fit <- f(b,x,param)
param    vector or structure of additional parameters for f or NULL
residmac A macro called as residmac(b, x, y, param) to compute a vector
         of residuals of length nrows(y).  When f is an argument,
         'resid' should not be used and residmac(b,x,y,param) is
         essentially y - f(b,x,param)
crvect   vector(numsig, nsigsq, delta), 3 criteria for convergence
deriv    optional macro; deriv(b,x,y,param,j) computes derivative of
         f with respect to b[j]
active   LOGICAL vector the same length as b
itmax    maximum number of iterations permitted (default 30)
itmin    minimum number of iterations performed (default 1)
print    if T, partial results are printed on each iteration

returns structure(coefs,hessian,jacobian,gradient,rss,residuals,
        nobs, iter, iconv)



Keywords: nonlinear fitting
Proper help has not been written yet.  Here are comments from the
macro file.

Macro for fitting functions or estimating parameters by minimizing
sums of squares of residuals.

Usage:
levmar(b,x,y [,f],param [,resid:residmac,deriv:deriv,crit:crvec,\
       active:active,maxit:itmax,minit:itmin,print:T])
b        REAL vector of starting values for coefficients
x        REAL variable, usually a vector or matrix with nrows(x) =
         nrows(y)
y        REAL vector of data to be fit
f        macro called as fit <- f(b,x,param)
param    vector or structure of additional parameters for f or NULL
residmac A macro called as residmac(b, x, y, param) to compute a vector
         of residuals of length nrows(y).  When f is an argument,
         'resid' should not be used and residmac(b,x,y,param) is
         essentially y - f(b,x,param)
crvect   vector(numsig, nsigsq, delta), 3 criteria for convergence
         controlling the desired accuracy of coefficients and of the
         the residual sum of squares, and a target size for the norm
         of the gradient.
deriv    optional macro; deriv(b,x,y,param,j) computes derivative of
         f with respect to b[j]
active   LOGICAL vector the same length as b.  b[j] "participates"
         in the iteration only if active[j] is True (default is
         rep(T,length(b)))

itmax    maximum number of iterations permitted (default 30)
itmin    minimum number of iterations performed (default 1)
print    if T, partial results are printed on each iteration

levmar   returns structure(coefs,hessian,jacobian,gradient,rss,
         residuals,nobs,iter,iconv)

For information on the algorithm, see Brown,K.,M. and Dennis,J.,E.,
Derivative free analogues of the Levenberg-Marquardt and Gauss
algorithms for nonlinear least squares approximation, Numerische
Mathematik, Vol. 18, pp. 289-297 (1972), and Brown,K.,M., Computer
oriented methods for fitting tabular data in the linear and nonlinear
least squares sense, Technical Report No. 72-13, University of
Minnesota Department of Computer and Information Sciences.


Gary Oehlert 2003-01-15