statsmodels.regression.linear_model.OLS.hessian#
- OLS.hessian(params, scale=None)[source]#
Evaluate the Hessian function at a given point.
- Parameters:
- paramsarray_like
The parameter vector at which the Hessian is computed.
- scale
float,optional If None, return the Hessian of the profile (concentrated) log-likelihood (profiled over the scale parameter), else return the Hessian of the log-likelihood using the given scale value.
- Returns:
ndarrayThe Hessian matrix.
Notes
With
scale=Nonethe Hessian of the profile log-likelihood is-n / 2 * (2 X'X / SSR - g g' / SSR**2), whereSSRis the sum of squared residuals andgis its gradient with respect toparams.Changed in version 0.15.1: The Hessian with
scale=Nonewas corrected. The first term was previously too small by a factor of 2.