Skip to content

[diagnostic-regression-panel] Regression Diagnostic Panel (Four-Plot Display) #5242

@MarkusNeusinger

Description

@MarkusNeusinger

Description

A 2×2 panel of diagnostic plots for evaluating linear regression model assumptions: (1) Residuals vs Fitted values, (2) Normal Q-Q plot of residuals, (3) Scale-Location plot (sqrt standardized residuals vs fitted), and (4) Residuals vs Leverage with Cook's distance contours. This is the standard diagnostic display in R's plot(lm) and is widely used but missing from the catalog.

Applications

  • Validating linear regression assumptions in statistical analysis
  • Checking for heteroscedasticity, non-linearity, and influential outliers
  • Academic statistics courses and textbooks
  • Regulatory model validation in finance and pharma

Data

  • fitted (float) — fitted/predicted values
  • residuals (float) — model residuals
  • std_residuals (float) — standardized residuals
  • leverage (float) — hat values / leverage
  • cooks_d (float) — Cook's distance
  • Size: 50–500 observations

Notes

  • Four subplots in a 2×2 grid layout
  • Highlight influential points (high Cook's distance) with labels
  • Add reference lines (zero line, 45-degree QQ line, Cook's distance contours)
  • LOWESS smoother on residual plots

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedApproved for implementationspec-readySpecification merged to main

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions