nmregr

Calculates least squares estimates using Nelder Mead's simplex method

Contents

Syntax

[q, info] = nmregr (func, p, varargin)

Description

Calculates least squares estimates using Nelder Mead's simplex method

Input

   f = func (p, xyw) with
     p: k-vector with parameters; xyw: (n,c)-matrix; f: n-vector
   [f1, f2, ...] = func (p, xyw1, xyw2, ...) with  p: k-vector  and
    xywi: (ni,k)-matrix; fi: ni-vector with model predictions
   The dependent variable in the output f; For xyw see below.
   p(:,1) initial guesses for parameter values
   p(:,2) binaries with yes or no iteration (optional)
   xywi(:,1) independent variable i
   xywi(:,2) dependent variable i
   xywi(:,3) weight coefficients i (optional)
   xywi(:,>3) data-pont specific information data (optional)
   The number of data matrices xyw1, xyw2, ... is optional but >0
   Default for xywi(:,3) is (number of data points in the set i)^-1

Output

Remarks

Calls user-defined function 'func' Set options with nmregr_options See nrregr for Newton-Raphson method, garegr for genetic algorithm, nrregr2 for 2 independent variables, and nmvcregr for standard deviations proportional to the mean. It is usually a good idea to run nrregr on the result of nmregr.

Example of use

See mydata_regr