statsmodels.base.optimizer._fit_newton#

statsmodels.base.optimizer._fit_newton(f, score, start_params, fargs, kwargs, disp=True, maxiter=100, callback=None, retall=False, full_output=True, hess=None, ridge_factor=1e-10)[source]#

Fit using Newton-Raphson algorithm

Parameters:
fcallable

Returns negative log likelihood given parameters.

scorecallable

Returns gradient of negative log likelihood with respect to params.

start_paramsarray_like

Initial guess of the solution for the loglikelihood maximization.

fargstuple

Extra arguments passed to the objective function, i.e. objective(x,*args)

kwargsdict[str, Any]

Extra keyword arguments passed to the objective function, i.e. objective(x,**kwargs)

dispbool, optional

Set to True to print convergence messages.

maxiterint, optional

The maximum number of iterations to perform.

callbackcallable, optional

Called after each iteration, as callback(xk), where xk is the current parameter vector.

retallbool, optional

Set to True to return list of solutions at each iteration. Available in Results object’s mle_retvals attribute.

full_outputbool, optional

Set to True to have all available output in the Results object’s mle_retvals attribute. The output is dependent on the solver. See LikelihoodModelResults notes section for more information.

hesscallable, optional

Method for computing the Hessian matrix of negative log likelihood with respect to params.

ridge_factorfloat, optional

Regularization factor for Hessian matrix.

Returns:
xoptndarray

The solution to the objective function

retvalsdict or None

If full_output is True then this is a dictionary which holds information returned from the solver used. If it is False, this is None.