statsmodels.stats.outliers_influence.OLSInfluence.get_resid_studentized_external

OLSInfluence.get_resid_studentized_external(sigma=None)[source]

计算学生化残差

Parameters:
sigmaNone or float

残差标准差的估计值。如果为 None,则使用回归结果中的估计值。

Returns:
stzd_residndarray

学生化残差

注释

学生化残差定义为

resid / sigma / np.sqrt(1 - hii)

其中 resid 是回归的残差,sigma 是对残差标准差的估计,hii 是 hat_matrix 的对角线。


Last update: Oct 16, 2024