Regression, NCA and PCA

Investigate unusual residuals, influential cases and ordered errors in OLS

A regression can run successfully even when a number was mistyped. It can also flag a surprising observation that is perfectly valid. Find the original row and check whether the value was recorded correctly before deciding how to handle it.

Use the 120-case reference CSV, then the separate challenge file linked in the QuickPLS Pro Regression guide. Keep them separate so you know whether you are checking a diagnostic, investigating a data problem or testing a statistical assumption.

Identify why a case stands out

In Analyze… → Regression, select Ordinary least squares, choose continuous y as the outcome and x, z and m as predictors, and retain the intercept. The documented unweighted reference has 120 complete cases. Confirm the case count in the completed run and open the case-level diagnostics for that same equation.

A residual is observed minus fitted outcome. A studentized residual scales the discrepancy by an estimated standard deviation. Leverage concerns the values of the predictors rather than the outcome: is the predictor combination unusual relative to the fitted sample? Cook's distance uses both residual and leverage information to flag cases with potential influence on the fitted coefficients.

Reference case Residual Leverage Cook's distance
o046 1.8912 0.0657 0.0971
o090 −1.0517 0.0986 0.0484
o119 −1.9255 0.0335 0.0479

The published independent diagnostics show that o119 has the largest absolute residual among these three, but o046 has the greatest Cook's distance. Case o090 has the highest leverage here and a smaller residual. Inspect all relevant information rather than using one statistic as a verdict.

Correct only a documented problem

Save the baseline result, then open a working copy of the challenge file. Its notes identify a factor-of-ten error in y for o017 and the missing code −888 in z for o042. Check the field definitions and source: the reference CSV records o017's y as 0.294860 and o042's z as −0.795138. In a real project, do not replace a missing code with a plausible value unless you can verify the original. Treat it appropriately as missing when no correct value is known.

Keep the uncorrected file, log the changes and rerun the same equation. Compare sample counts before comparing slopes. If a case turns out to be valid but influential, report the primary fit and a justified sensitivity analysis rather than silently excluding it. Check predictor rank or collinearity if separate coefficients are unstable; that is an equation-level problem, not proof that a specific row is wrong.

Check adjacent residuals only where row order means something

Workshop case IDs are not a time index. For a separate chronological OLS dataset, retain the original order of complete cases. In the documented setup, open Residual autocorrelation, select Include Durbin-Watson probability, and choose the Autocorrelation alternative before viewing the result. Choose the Probability procedure and confirm Null assumptions only if the fixed-design, Gaussian equal-variance assumptions are defensible. Examine whether missing rows turn separated periods into neighbours. The guide documents conditional Gaussian support up to 512 cases and uses it in automatic mode below 100 cases; automatic otherwise uses a normal-moment approximation. A lagged outcome predictor is outside this documented probability procedure.

A hand calculation shows how much order matters. For illustrative residuals −1, −1, 1, 1, the sum of squared adjacent differences and sum of squared residuals both equal four, so DW = 1. Alternating the same values as −1, 1, −1, 1 gives DW = 3. These are arithmetic examples, not probability tests. A statistic near two is a descriptive reference, not a universal pass. Report the procedure and an unavailable reason instead of equating an unavailable probability with zero or with no dependence.

Example report: “We inspected o046 because of its relative influence. It was not excluded on that basis. Separately documented corrections were made in a logged copy. The teaching rows had no chronological order, so we did not interpret adjacent residuals as temporal evidence.”

Related articles