regressionDiagnostics

Appends a self-contained section containing residual diagnostics and three standard regression diagnostic plots for rr.

Produces (inside a section titled caption or "Regression Diagnostics"):

  1. Residuals and Influence Summary DataTable — n, min/max/mean/std dev of residuals, mean and max leverage (hᵢᵢ), high-leverage count (hᵢᵢ > 2p/n), max Cook's distance, and influential-point count (Cook's D > 4/n)

  2. Threshold interpretation paragraph

  3. Diagnostic Plots sub-section containing:

    • Normal Q-Q plot of standardized residuals

    • Residuals vs fitted values (scatter)

    • Residuals vs observation order

High-leverage threshold: hᵢᵢ > 2p/n (where p = RegressionResultsIfc.numParameters). Influential-point threshold: Cook's D > 4/n.

Parameters

rr

the RegressionResultsIfc to report

caption

optional section title