Skip to content
Technical & algorithm documentationSource reviewed

Review potential outliers

Use distribution and quality evidence to identify observations that need researcher review.

Overview

Quality diagnostics flag unusual values and response patterns for review; they never delete cases automatically.

Theoretical foundation

A standard z score measures distance from the sample mean in standard-deviation units. A modified z score uses the median and MAD. Tukey fences use 1.5 IQR. Squared Mahalanobis distance measures multivariate distance using the inverse sample covariance matrix.

Key equations

Modified z score
M_i=\frac{0.6745(x_i-\tilde{x})}{\operatorname{MAD}}
Squared Mahalanobis distance
D_i^2=(x_i-\bar{x})^\top S^{-1}(x_i-\bar{x})

Algorithm and computation

Univariate flags use |z| > 3, |0.6745(x−median)/MAD| > 3.5 and values outside Q1−1.5IQR or Q3+1.5IQR. Mahalanobis flags use a chi-square 0.999 cutoff when 2–50 selected numeric variables have an invertible, sufficiently conditioned covariance matrix. Exact duplicates use full-row equality. Straightlining, longest run and within-person SD operate only on a researcher-selected numeric item battery.

Required data

Numeric variables for univariate checks; at least two selected numeric variables and more complete cases than variables for Mahalanobis; at least three related items for response-pattern checks.

Assumptions

Mahalanobis chi-square calibration is a diagnostic approximation. Survey design and substantive plausibility determine whether a flagged case is problematic.

Available settings

Researcher-selected variables or item battery. Flag decisions are separately recorded as retain, exclude or dismiss with annotation.

Worked example

A synthetic respondent with a long string of identical responses is flagged for review. The record remains included until the researcher approves and documents a treatment.

Limitations and non-claims

No automatic deletion, robust covariance distance, isolation forest or response-time detection is implemented.

Validation notes

Threshold logic, covariance safeguards and non-destructive review states are covered by quality-lab tests.

Was this article helpful?

Your response helps the methodology team improve this documentation.