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

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

observedbool

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

Returns:
score_factorndarray, 2-D

A 2d weight vector used in the calculation of the score_obs.

(-jbb, -jbg, -jgg)tuple

A tuple with 3 hessian factors, corresponding to the upper triangle of the Hessian matrix. TODO: check why there are minus


Last update: Nov 14, 2024