DETECTANOMALY
Identifies unusual cases: cases far from their peer group (cluster) and the variables responsible.
Syntax
Section titled “Syntax”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].Synopsis
Section titled “Synopsis”| 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 |
Examples
Section titled “Examples”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.
Related
Section titled “Related”Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.