statsmodels.stats.outliers_influence.OLSInfluence.plot_index

method

OLSInfluence.plot_index(y_var='cooks', threshold=None, title=None, ax=None, idx=None, **kwds)

index plot for influence attributes

Parameters
y_varstring

Name of attribute or shortcut for predefined attributes that will be plotted on the y-axis.

thresholdNone or float

Threshold for adding annotation with observation labels. Observations for which the absolute value of the y_var is larger than the threshold will be annotated. Set to a negative number to label all observations or to a large number to have no annotation.

titlestring

If provided, the title will replace the default “Index Plot” title.

axmatplolib axis instance

The plot will be added to the ax if provided, otherwise a new figure is created.

idxNone or integer

Some attributes require an additional index to select the y-var. In dfbetas this refers to the column indes.

kwdsoptional keywords

Keywords will be used in the call to matplotlib scatter function.