TREE
Decision trees: CHAID, Exhaustive CHAID, CRT and QUEST classification and regression trees.
Syntax
Section titled “Syntax”TREE dep [n|o|s] BY predictors [n|o|s] [/METHOD TYPE=CHAID|EXHAUSTIVECHAID|CRT|QUEST] [/GROWTHLIMIT MAXDEPTH=AUTO PARENTNODE=100 CHILDNODE=50] [/VALIDATION TYPE=NONE|SPLITSAMPLE(50)|CROSSVALIDATION(10)] [/CHAID ALPHASPLIT=.05 ALPHAMERGE=.05 CHISQUARE=PEARSON|LR ADJUST=BONFERRONI|NONE INTERVALS=10] [/CRT IMPURITY=GINI|TWOING|ORDEREDTWOING MINIMPROVEMENT=.0001] [/QUEST ALPHASPLIT=.05] [/PRUNE TREE=YES SE=1] [/PRIORS FROMDATA|EQUAL|CUSTOM=value prob …] [/COSTS EQUAL|CUSTOM=actual predicted cost …] [/GAIN CATEGORY=value] [/PRINT MODELSUMMARY TREETABLE RISK CLASSIFICATION GAIN NONE] [/SAVE NODEID PREDVAL PREDPROB ASSIGNMENT] [/OUTFILE TRAININGMODEL='file.xml'].Synopsis
Section titled “Synopsis”| Kind | Procedure (reads data, produces output) |
| Body | main /SUBCOMMAND[=] … |
| Changes data | no |
| Subcommands | /CHAID, /COSTS, /CRT, /GAIN, /GROWTHLIMIT, /METHOD, /MISSING, /OUTFILE, /PRINT, /PRIORS, /PRUNE, /QUEST, /SAVE, /SURROGATES, /TREE, /VALIDATION |
| Menu | Analyze ▸ Classify |
| Slot: Dependent Variable | 1–1 variable(s); levels: nominal, ordinal, scale; types: numeric, string |
| Slot: Independent Variables | 1+ variable(s); levels: nominal, ordinal, scale; types: numeric, string |
Specifications
Section titled “Specifications”- METHOD: growing method; CHAID by default
- GROWTHLIMIT: MAXDEPTH (AUTO = 3 for CHAID, 5 for CRT and QUEST), PARENTNODE and CHILDNODE minimum (weighted) sizes
- VALIDATION: SPLITSAMPLE(p) trains on p% of cases and reports test-sample results; CROSSVALIDATION(k) reports cross-validated risk
- PRUNE: CRT and QUEST: cost-complexity pruning chosen by cross-validation with the SE-rule
- SAVE: NODEID terminal node, PREDVAL predicted value, PREDPROB class probabilities, ASSIGNMENT training/test flag
- OUTFILE: TRAININGMODEL=‘file’ writes the tree as PMML (.xml) or OrcStat JSON (.json)
Examples
Section titled “Examples”TREE churn [n] BY age income region [n] /METHOD TYPE=CHAID /GROWTHLIMIT PARENTNODE=100 CHILDNODE=50.TREE churn BY age income region /METHOD TYPE=CRT /PRUNE TREE=YES /VALIDATION TYPE=SPLITSAMPLE(70) /SAVE NODEID PREDVAL PREDPROB.TREE spend BY age region /METHOD TYPE=CRT /VALIDATION TYPE=CROSSVALIDATION(10).- A categorical dependent variable grows a classification tree, a scale one a regression tree (QUEST needs a categorical target).
- Cases missing on the split variable follow the larger child (no surrogate splits).
- The tree diagram in the Output Viewer is interactive: expand and collapse nodes with the mouse or arrow keys.
- /SURROGATES MAXNUMBER=AUTO|n (CRT, QUEST; 0 turns them off) uses surrogate splits for missing values and scoring.
- /CHAID SPLITMERGED=YES re-splits merged categories. QUEST uses Levene’s test for spread when no mean test is significant.
Related
Section titled “Related”SCORE, LOGISTIC REGRESSION, CROSSTABS
Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.