statsmodels.graphics.regressionplots.plot_regress_exog

statsmodels.graphics.regressionplots.plot_regress_exog(results, exog_idx, fig=None) [source]

Plot regression results against one regressor.

This plots four graphs in a 2 by 2 figure: ‘endog versus exog’, ‘residuals versus exog’, ‘fitted versus exog’ and ‘fitted plus residual versus exog’

Parameters:
  • results (result instance) – result instance with resid, model.endog and model.exog as attributes
  • exog_idx (int) – index of regressor in exog matrix
  • fig (Matplotlib figure instance, optional) – If given, this figure is simply returned. Otherwise a new figure is created.
Returns:

fig

Return type:

matplotlib figure instance

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.graphics.regressionplots.plot_regress_exog.html