depictr.qq_plot#

depictr.qq_plot(model, title=None)#

Normal quantile-quantile plot of the residuals, with a reference line.

The sample residual quantiles are plotted against the matching standard-normal quantiles. Points near the line mean the residuals are close to normal; a systematic bend away from it flags skew or heavy tails. The line is drawn through the first and third quartiles, the robust choice R’s qqline uses, so a few outliers do not tilt it.

Parameters:
  • model (statsmodels results object or array-like) – A fitted OLS/GLM result, from which the internally studentised residuals are read (the raw residuals if studentised ones are not available), or a 1-D array of residuals to plot directly.

  • title (str, optional) – Plot title.

Return type:

plotnine.ggplot