Logo

statsmodels.graphics.regressionplots.plot_partregress

statsmodels.graphics.regressionplots.plot_partregress(endog, exog, exog_idx=None, grid=None, fig=None)[source]

Plot partial regression for a set of regressors.

Parameters :

endog : ndarray

endogenous or response variable

exog : ndarray

exogenous, regressor variables

exog_idx : None or list of int

(column) indices of the exog used in the plot

grid : None or tuple of int (nrows, ncols)

If grid is given, then it is used for the arrangement of the subplots. If grid is None, then ncol is one, if there are only 2 subplots, and the number of columns is two otherwise.

fig : Matplotlib figure instance, optional

If given, this figure is simply returned. Otherwise a new figure is created.

Returns :

fig : Matplotlib figure instance

If fig is None, the created figure. Otherwise fig itself.

See also

plot_partregress_ax
Plot partial regression for a single regressor.

plot_ccpr

Notes

A subplot is created for each explanatory variable given by exog_idx. The partial regression plot shows the relationship between the response and the given explanatory variable after removing the effect of all other explanatory variables in exog.

References

See http://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/partregr.htm

Previous topic

statsmodels.graphics.regressionplots.plot_regress_exog

Next topic

statsmodels.graphics.regressionplots.plot_ccpr

This Page