Logo

statsmodels.graphics.regressionplots.plot_fit

statsmodels.graphics.regressionplots.plot_fit(res, exog_idx, exog_name='', y_true=None, ax=None, fontsize='small')[source]

Plot fit against one regressor.

This creates one graph with the scatterplot of observed values compared to fitted values.

Parameters :

res : result instance

result instance with resid, model.endog and model.exog as attributes

exog_idx : int

index of regressor in exog matrix

y_true : array_like

(optional) If this is not None, then the array is added to the plot

ax : Matplotlib AxesSubplot instance, optional

If given, this subplot is used to plot in instead of a new figure being created.

Returns :

fig : Matplotlib figure instance

If ax is None, the created figure. Otherwise the figure to which ax is connected.

Notes

This is currently very simple, no options or varnames yet.

Previous topic

statsmodels.graphics.functional.banddepth

Next topic

statsmodels.graphics.regressionplots.plot_regress_exog

This Page