statsmodels.graphics.regressionplots.add_lowess#
- statsmodels.graphics.regressionplots.add_lowess(ax, lines_idx=0, frac=0.2, *, exog=None, endog=None, **lowess_kwargs)[source]#
Add Lowess line to a plot
- Parameters:
- ax
AxesSubplot The Axes to which to add the plot.
- lines_idx
int,optional This is the line on the existing plot to which you want to add a smoothed lowess line.
- frac
float,optional The fraction of the points to use when doing the lowess fit.
- exogarray_like,
optional Data for the x-axis. If None, it will be extracted from the axis lines.
- endogarray_like,
optional Data for the y-axis. If None, it will be extracted from the axis lines.
- lowess_kwargs
Additional keyword arguments are passes to lowess.
- ax
- Returns:
FigureThe figure that holds the instance.