statsmodels.genmod.generalized_linear_model.GLMResults.get_hat_matrix_diag¶
- GLMResults.get_hat_matrix_diag(observed=True)[source]¶
Compute the diagonal of the hat matrix
- Parameters:
- observedbool
If true, then observed hessian is used in the hat matrix computation. If false, then the expected hessian is used. In the case of a canonical link function both are the same.
- Returns:
- hat_matrix_diag
ndarray
The diagonal of the hat matrix computed from the observed or expected hessian.
- hat_matrix_diag