3.11.16.1.3. statsmodels.stats.outliers_influence.outlier_test

statsmodels.stats.outliers_influence.outlier_test(model_results, method='bonf', alpha=0.05, labels=None, order=False)[source]

Outlier Tests for RegressionResults instances.

Parameters:

model_results : RegressionResults instance

Linear model results

method : str

  • bonferroni : one-step correction
  • sidak : one-step correction
  • holm-sidak :
  • holm :
  • simes-hochberg :
  • hommel :
  • fdr_bh : Benjamini/Hochberg
  • fdr_by : Benjamini/Yekutieli

See statsmodels.stats.multitest.multipletests for details.

alpha : float

familywise error rate

order : bool

Whether or not to order the results by the absolute value of the studentized residuals. If labels are provided they will also be sorted.

Returns:

table : ndarray or DataFrame

Returns either an ndarray or a DataFrame if labels is not None. Will attempt to get labels from model_results if available. The columns are the Studentized residuals, the unadjusted p-value, and the corrected p-value according to method.

Notes

The unadjusted p-value is stats.t.sf(abs(resid), df) where df = df_resid - 1.