statsmodels.othermod.betareg.BetaModel.score_hessian_factor#

BetaModel.score_hessian_factor(params, return_hessian=False, observed=True)[source]#

Derivatives of loglikelihood function w.r.t. linear predictors

This calculates score and hessian factors at the same time, because there is a large overlap in calculations.

Parameters:
paramsndarray

Parameter at which score is evaluated.

return_hessianbool, optional

If False, then only score_factors are returned If True, the both score and hessian factors are returned

observedbool, optional

If True, then the observed Hessian is returned (default). If False, then the expected information matrix is returned.

Returns:
(sf1, sf2)tuple

The score factors, as returned by score_factor. Only returned if return_hessian is False.

(sf1, sf2), (-jbb, -jbg, -jgg)tuple of tuples

The score factors and a tuple with 3 hessian factors, corresponding to the upper triangle of the Hessian matrix. Only returned if return_hessian is True. TODO: check why there are minus