Skip to content

DETECTANOMALY

Identifies unusual cases: cases far from their peer group (cluster) and the variables responsible.

DETECTANOMALY /VARIABLES [CATEGORICAL=varlist] [SCALE=varlist] [ID=var] [EXCEPT=varlist] [/CRITERIA PCTANOMALOUSCASES=5 | NUMANOMALOUSCASES=n ANOMALYCUTPOINT=2 NUMREASONS=1 MINPEERGROUPS=1 MAXPEERGROUPS=15] [/MISSING=EXCLUDE|INCLUDE] [/PRINT CPS ANOMALYLIST NORMS REASONSUMMARY NONE] [/SAVE ANOMALY PEERID PEERSIZE PEERPCTSIZE REASONVAR REASONMEASURE].
Kind Procedure (reads data, produces output)
Body main /SUBCOMMAND[=] …
Changes data yes, undoable
Subcommands /CRITERIA, /MISSING, /PRINT, /SAVE, /VARIABLES
Menu Analyze ▸ Data Preparation
Slot: Categorical Variables 0+ variable(s); levels: nominal, ordinal, scale; types: numeric, string
Slot: Scale Variables 0+ variable(s); levels: scale, ordinal; types: numeric
Slot: Case Identifier 0–1 variable(s); levels: nominal, ordinal, scale; types: numeric, string
DETECTANOMALY /VARIABLES CATEGORICAL=region SCALE=income age ID=id /CRITERIA NUMANOMALOUSCASES=10 /SAVE ANOMALY.
  • Peer groups come from k-means with the number of groups chosen by BIC; the seed comes from SET SEED.
  • The anomaly index is a case’s deviation from its peer group divided by the group’s average deviation.

VALIDATEDATA, QUICK CLUSTER


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.