statsmodels.graphics.regressionplots.partial_resids#

statsmodels.graphics.regressionplots.partial_resids(results, focus_exog)[source]#

Return partial residuals for a fitted model with respect to a ‘focus predictor’

Parameters:
resultsresults instance

A fitted regression model.

focus_exogint or str

The column index of model.exog, or the variable name, with respect to which the partial residuals are calculated.

Returns:
ndarray

The partial residuals.

References

[1]

RD Cook and R Croos-Dabrera (1998). Partial residual plots in generalized linear models. Journal of the American Statistical Association, 93:442.