depictr.residual_diagnostics_plot#
- depictr.residual_diagnostics_plot(model, title=None)#
Four-panel residual report for a fitted OLS or GLM.
Composes the four checks R draws from
plot.lminto a 2x2 grid: residuals against fitted values, the scale-location plot, a normal quantile-quantile plot of the residuals, and residuals against leverage. Read together they cover the usual assumptions of a linear fit: the right functional form, constant variance, approximately normal residuals, and no single point dominating the fit.- Parameters:
model (statsmodels results object) – A fitted OLS/GLM result, the kind returned by
smf.ols(...).fit().title (str, optional) – An overall title for the composed figure.
- Returns:
A 2x2 composition with
.drawand.save.- Return type:
plotnine.composition.Compose
References
Fox, J., & Weisberg, S. (2019). An R companion to applied regression (3rd ed.). Sage.