Grocer Function

NAME

maxlik - maximization function

CALLING SEQUENCE

[results]=maxlik(func,xarg,varargin)

PARAMETERS

Input

Output

DESCRIPTION

Maximizes a (minus log likelihood) function func must take the form func(b,varargin) where:
  • b = parameter vector (k x 1)
  • varargin = arguments passed to the function
  • EXAMPLE

    1) rd=maxlik('f_ssr',init,chdelta, varargin(:),chftol)
    2) oresult = maxlik('to_llike',b0,y,x,vtrunc,lopt(:))
    3) oresult = maxlik('filter0',param,func,y,x,F,varargin(:))

    These examples are taken from the functions nls, tobit and kalman. The functions maximized are f_ssr, to_llike and filter. The initial parameters are respectively init, b0 and param. In example 2 and 3, y, x and vtrunc (in example 2) or F (in example 3) are the parameters other than b0 of function to_llike. chdelta, chftol, lopt(:) are varargin(:) are options for maxlik.

    AUTHOR

    Eric Dubois 2002