Top 
double (*BHHH_FUNC) (double *Param1
,gretl_matrix *Param2
,void *Param3
,int Param4
,int *Param5
);
int bhhh_max (double *theta
,int k
,gretl_matrix *M
,BHHH_FUNC callback
,double toler
,int *fncount
,int *grcount
,void *data
,gretl_matrix *V
,gretlopt opt
,PRN *prn
);
Maximize likelihood using the BHHH method, implemented via iteration of the Outer Product of the Gradient (OPG) regression with line search.
callback
is called to calculate the loglikelihood for the model
in question. The parameters passed to this function are:
(1) the current array of estimated coefficients; (2) G
;
(3) the data
pointer; (4) an integer indicator that is 1 if
the gradient should be calculated in G
, 0 if only the
loglikelihood is needed; and (5) an int pointer to receive
an error code. The return value from callback
should be the
loglikelihood (or NADBL on error).
For an example of the use of such a function, see arma.c in the
plugin
directory of the gretl source.
theta 
array of adjustable coefficients. 

k 
number of elements in 

M 
T x 

callback 
pointer to function for calculating loglikelihood and score. 

toler 
tolerance for convergence. 

fncount 
location to receive count of function evaluations. 

grcount 
location to receive count of gradient evaluations. 

data 
pointer to be passed to 

V 
matrix in which to store covariance, or 

opt 
can include 

prn 
printing struct for iteration info (or 