Calculates least squares estimates using a genetic algorithm



[q, info, endPop, bPop, traceInfo] = garegr(func, p, varargin)


Calculates least squares estimates using a genetic algorithm


   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 (not used)
   p(:,2) binaries with yes or no iteration
   p(:,[2 3]) boundaries for iterated parameters
   xywi(:,1) independent variable i
   xywi(:,2) dependent variable i
   xywi(:,3) weight coefficients i (optional)
   xywi(:,>3) data-point specific information data (optional)
   The number of data matrices xyw1, xyw2, ... is optional but >0



Set options with garegr_options. Similar to nrregr, but slower and a larger bassin of attraction.

Modified from gaot package version 1996/02/02: C.R. Houck, J.Joines, and M.Kay. A genetic algorithm for function optimization: A Matlab implementation. ACM Transactions on Mathmatical Software, Submitted 1996; binary and order options removed

garegr calls for:
  User-defined function: 'func'
  Crossover Operators:
    simplexover heuristicxover arithxover
  Mutation Operators:
    boundarymutation multinonunifmutation nonunifmutation unifmutation
  Selection Functions:
    normgeomselect roulette tournselect
  Utility functions:

Example of uss

See mydata_regr