Statistics Glossary → Residual plots and residual diagnostics
Residual plots and residual diagnosticsconcept
Checking a model's assumptions and fit by examining its residuals (observed minus predicted values) with plots and summary statistics.
A residual is what the model fails to explain for each observation: e = y - ŷ. In a well-specified model the residuals scatter randomly around zero and show no pattern against the fitted values or the predictors. In a residual-versus-fitted plot, a funnel shape points to non-constant variance and a curved pattern to a missing nonlinear term. Histograms, P-P and Q-Q plots show whether the residuals are normal; standardized residuals (|r| > 2 or 3) flag outlying observations; leverage and Cook's distance reveal observations that single-handedly drive the results.
In generalized linear models, deviance or Pearson residuals are used instead of raw residuals because the variance of the response depends on its mean; in count models a rootogram compares observed and expected frequencies. In mixed models, conditional residuals (including the random effects) are distinguished from marginal ones. Residual diagnostics are not a pass-or-fail test but a way of discovering where the model falls short; several plots should be read together rather than relying on one.
An everyday example
A navigation app predicts arrival times. When you plot the gap between predicted and actual times, you see that the errors are small for short trips and very large for long ones. This funnel shape shows that the model does not account for the extra uncertainty of long trips; without a residual plot, the average error alone would have hidden the problem.
In MerQur
It is offered as the 'Diagnostic plot' option in Multiple Linear Regression (residual vs fitted, ZRESID × ZPRED, histogram, P-P, Q-Q, partial regression plots), as 'Residual diagnostics + rootogram' in Poisson / Negative Binomial Regression and as 'Residual diagnostics + random-effect predictions (BLUP)' in Linear Mixed Models. Two-Way ANOVA draws the residual vs fitted and residual Q-Q plots and Nonlinear Regression draws residual plots; the chi-square tests, the Log-Linear Model and Crosstab give cell residuals, Logistic Regression and Meta-Analysis give influence diagnostics, ARIMA and VAR give residual diagnostics, and Cox regression gives residual summaries.
Analyses where this concept appears
Two-Way ANOVAANCOVAChi-Square IndependenceChi-Square Goodness of FitLog-Linear ModelCrosstabMeta-AnalysisMultiple Linear RegressionLogistic RegressionPoisson / Negative Binomial Regression (Count Regression)Linear Mixed Models (LMM)Nested Mixed Model (Nested LMM, Multi-Level Hierarchical Mixed Model)Panel Data RegressionConfirmatory Factor Analysis (CFA)Generalized Additive Model (GAM, Nonlinear Regression)Nonlinear RegressionBayesian ANOVASAR (Spatial Autoregressive Lag)Path AnalysisCox Regression (Proportional Hazards Model)Time-dependent Cox RegressionSTL Seasonal DecompositionARIMA ForecastVAR (Vector Autoregression)GARCH (Volatility Model)LOESS (Local Regression)Unobserved Components Model (Structural Time Series)
Related concepts
HeteroscedasticityQ-Q and P-P plotsInfluence diagnostics (Cook's distance, leverage, DFBETAS)