statsmodels.othermod.betareg.BetaModel.score_factor#

BetaModel.score_factor(params, endog=None)[source]#

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

This needs to be multiplied with the exog to obtain the score_obs.

Parameters:
paramsndarray

Parameter at which score is evaluated.

endogndarray, optional

Values to use instead of the model’s endog. If None, then the model’s endog is used.

Returns:
sf1ndarray

Score factor for the mean parameters.

sf2ndarray

Score factor for the precision parameters.

Notes

The score_obs can be obtained from the score factors sf1, sf2 using

  • d1 = sf1[:, None] * exog

  • d2 = sf2[:, None] * exog_precision