Logo

statsmodels.graphics.regressionplots.plot_ccpr

statsmodels.graphics.regressionplots.plot_ccpr(res, exog_idx=None, grid=None, fig=None)[source]

Generate CCPR plots against a set of regressors, plot in a grid.

Generates a grid of CCPR (component and component-plus-residual) plots.

Parameters :

res : result instance

uses exog and params of the result instance

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 ax is None, the created figure. Otherwise the figure to which ax is connected.

See also

plot_ccpr_ax
Creates CCPR plot for a single regressor.

Notes

Partial residual plots are formed as:

Res + Betahat(i)*Xi versus Xi

and CCPR adds:

Betahat(i)*Xi versus Xi

References

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

Previous topic

statsmodels.graphics.regressionplots.plot_partregress

Next topic

statsmodels.graphics.tsaplots.plotacf

This Page