statsmodels.regression.linear_model.WLS.hessian_factor

WLS.hessian_factor(params, scale=None, observed=True)[source]

Compute the weights for calculating the Hessian.

Parameters:
paramsndarray

The parameter at which Hessian is evaluated.

scaleNone or float

If scale is None, then the default scale will be calculated. Default scale is defined by self.scaletype and set in fit. If scale is not None, then it is used as a fixed scale.

observedbool

If True, then the observed Hessian is returned. If false then the expected information matrix is returned.

Returns:
ndarray

A 1d weight vector used in the calculation of the Hessian. The hessian is obtained by (exog.T * hessian_factor).dot(exog).


Last update: Dec 14, 2023