GLMResults.plot_ceres_residuals(focus_exog, frac=0.66, cond_means=None, ax=None)
[source]
Produces a CERES (Conditional Expectation Partial Residuals) plot for a fitted regression model.
Parameters: 


Returns: 
fig – The figure on which the partial residual plot is drawn. 
Return type: 
matplotlib.Figure instance 
RD Cook and R CroosDabrera (1998). Partial residual plots in generalized linear models. Journal of the American Statistical Association, 93:442.
RD Cook (1993). Partial residual plots. Technometrics 35:4.
cond_means
is intended to capture the behavior of E[x1  x2], where x2 is the focus exog and x1 are all the other exog variables. If all the conditional mean relationships are linear, it is sufficient to set cond_means equal to the focus exog. Alternatively, cond_means may consist of one or more columns containing functional transformations of the focus exog (e.g. x2^2) that are thought to capture E[x1  x2].
If nothing is known or suspected about the form of E[x1  x2], set cond_means
to None, and it will be estimated by smoothing each nonfocus exog against the focus exog. The values of frac
control these lowess smooths.
If cond_means contains only the focus exog, the results are equivalent to a partial residual plot.
If the focus variable is believed to be independent of the other exog variables, cond_means
can be set to an (empty) nx0 array.
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.genmod.generalized_linear_model.GLMResults.plot_ceres_residuals.html