SPSS command: SPSS TREE
CHAID and CRT decision trees in your browser
A decision tree splits cases into segments that differ as much as possible on a target, one predictor at a time.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS TREE procedure with three growing methods: CHAID and Exhaustive CHAID, which make multiway splits backed by Bonferroni-adjusted tests, CRT, which makes binary splits by impurity reduction and can be pruned, and QUEST, which picks the split variable with ANOVA F, chi-square and Levene tests and places binary splits by quadratic discriminant analysis.
- Which predictor separates the target best at each step, and which categories or value ranges belong together (the split values on every branch).
- The profile of every node: the target distribution or mean, its size and the predicted category.
- Which terminal nodes concentrate the target category, through Gain %, Response % and Index % in the gains table.
- How often the tree misclassifies cases, by resubstitution and, optionally, V-fold cross-validation.
- For CRT, how important each predictor is, counting both primary and surrogate splits.
When to use it
Use it when
- Segmenting customers or respondents into rule-based groups you can describe in a sentence, such as Basic plan and under a year of tenure.
- Screening many categorical and scale predictors for the few that matter, including their interactions, before building a regression model.
- Targeting: ranking nodes by response rate to decide which segments to contact first.
- Nominal, ordinal or scale targets: CHAID uses chi-square, likelihood-ratio or F tests, CRT uses Gini, twoing or least squares.
Use something else when
- You need effect sizes with confidence intervals for each predictor: use binary or multinomial logistic regression.
- The sample is small: with the default minimum of 100 cases per parent and 50 per child node, a few hundred cases may give only one or two splits.
- You want groups without a target variable: that is cluster analysis (TwoStep, k-means or hierarchical).
- You need custom misclassification costs or profits: the panel uses equal costs and empirical priors.
How to run it in Crosstabs
- 01
Open the decision tree panel
Open your file in the workspace, switch to Statistics mode and choose Decision tree (TREE) in the Classify group. The data stays in your browser.
- 02
Set the dependent variable and its level
Choose the Dependent variable and confirm its Measurement level (Nominal, Ordinal or Scale); the level decides which tests and impurity measures are offered.
- 03
Tick the independent variables
Tick the Independent variables and set each one's measurement level in the dropdown beside it. Scale predictors are binned for CHAID and split at thresholds for CRT.
- 04
Pick the growing method and stopping rules
Under Growing method and criteria choose CHAID, Exhaustive CHAID or CRT, then set Maximum tree depth (3 for CHAID, 5 for CRT by default) and the minimum cases in parent and child nodes.
- 05
Tune the method-specific criteria
For CHAID set the significance levels for splitting and merging and, for a nominal target, the Pearson or likelihood-ratio chi-square. For CRT pick the impurity measure and minimum change in improvement, and optionally tick Prune tree to avoid overfitting with a standard-error rule.
- 06
Validate and run
Tick Cross-validation risk estimate and choose the sample folds, pick the target category for gains, then run. A workspace weight can be used only after you declare it a frequency weight.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
600 synthetic subscribers with a plan tier (Basic, Standard, Premium), tenure in months (1–48) and region. Churn was simulated to depend on plan and on a first-year effect; region is pure noise. A fixed seed makes every build identical. CHAID runs with the panel defaults (depth 3, parent 100, child 50, α = .05) and 10-fold cross-validation.
| Node | Yes % | N | Predicted Category | Parent Node | Primary Independent Variable | Adj. P-value | Split Values |
|---|---|---|---|---|---|---|---|
| 0 | 33.2 | 600 | No | ||||
| 1 | 32.7 | 199 | No | 0 | plan | <.001 | Standard |
| 2 | 50.5 | 188 | Yes | 0 | plan | <.001 | Basic |
| 3 | 18.3 | 213 | No | 0 | plan | <.001 | Premium |
| 4 | 52.5 | 59 | Yes | 1 | tenure | <.001 | ≤ 4; (4, 9]; (9, 14] |
| 5 | 24.3 | 140 | No | 1 | tenure | <.001 | (14, 17]; (17, 23]; (23, 28]; (28, 33]; (33, 38]; (38, 43]; > 43 |
| 6 | 68.5 | 54 | Yes | 2 | tenure | .033 | ≤ 4; (4, 9]; (9, 14] |
| 7 | 50.6 | 79 | Yes | 2 | tenure | .033 | (14, 17]; (17, 23]; (23, 28]; (28, 33] |
| 8 | 32.7 | 55 | No | 2 | tenure | .033 | (33, 38]; (38, 43]; > 43 |
Adjusted p-values use the Bonferroni method.
| Node | N | Node % | Gain % | Response % | Index % | Cumulative Gain % |
|---|---|---|---|---|---|---|
| 6 | 54 | 9.0 | 18.6 | 68.5 | 206.6 | 18.6 |
| 4 | 59 | 9.8 | 15.6 | 52.5 | 158.4 | 34.2 |
| 7 | 79 | 13.2 | 20.1 | 50.6 | 152.7 | 54.3 |
| 8 | 55 | 9.2 | 9.0 | 32.7 | 98.7 | 63.3 |
| 5 | 140 | 23.3 | 17.1 | 24.3 | 73.2 | 80.4 |
| 3 | 213 | 35.5 | 19.6 | 18.3 | 55.2 | 100.0 |
Terminal nodes are sorted by response, highest first.
| Method | Estimate | Std. Error |
|---|---|---|
| Resubstitution | 0.292 | 0.019 |
| Cross-Validation | 0.345 | 0.019 |
Risk is the proportion of cases misclassified (equal costs, empirical priors).
| Observed | No | Yes | Percent Correct |
|---|---|---|---|
| No | 317 | 84 | 79.1 |
| Yes | 91 | 108 | 54.3 |
| Overall Percentage | 68.0% | 32.0% | 70.8 |
How to read it
CHAID split the 600 cases first by plan (adjusted p < .001) and ended with 6 terminal nodes at depth 2; the noise variable region never entered the tree. The best node, 6, holds 9.0% of cases with a churn rate of 68.5% (index 206.6%). The tree misclassifies 29.2% of the cases it was grown on and 34.5% under 10-fold cross-validation. A pruned CRT tree on the same data has 3 terminal nodes and a cross-validated risk of 31.7%.
Output tables explained
- Model Summary
- Growing method, the independent variables that actually entered the tree, number of nodes and terminal nodes, depth and cases used, with a note on excluded cases.
- Tree diagram
- An interactive tree: each node shows its distribution or mean and N, each branch the predictor and split values; click a node to collapse its branch.
- Tree Table
- One row per node with the category percentages (or mean and standard deviation), N, predicted category, parent node, splitting variable, the CHAID statistic with its Bonferroni-adjusted p value or the CRT improvement, and the split values.
- Gains for Nodes
- Terminal nodes sorted by response: Gain % is the share of all target cases a node captures, Response % the rate inside it and Index % that rate relative to the whole sample; cumulative columns build the gains chart. A scale target gives the Gain Summary for Nodes by mean.
- Risk
- The misclassification rate (or within-node variance for a scale target) with its standard error, by resubstitution and by cross-validation. A large gap between the two signals overfitting.
- Classification
- Observed by predicted categories with percent correct per row and overall; CRT trees add Independent Variable Importance and, when pruned, the Cost-Complexity Pruning Sequence.
Assumptions and notes
- Trees make no distributional assumptions, but CHAID's tests treat cases as independent; repeated rows from the same person overstate significance.
- Measurement levels matter: a nominal predictor can merge any categories, while an ordinal or binned scale predictor merges only adjacent ones.
- Cases need a valid target and at least one valid predictor. CHAID keeps missing predictor values as their own category; CRT routes them with surrogate splits.
- Risk uses equal misclassification costs and priors estimated from the sample.
How the results are validated
CHAID and Exhaustive CHAID are checked node by node against the R package chaidr 0.1.0 (R 4.6.1) on a 1,200-case synthetic market dataset — nominal, ordinal and scale targets, the likelihood-ratio statistic, frequency weights and a deeper tree — with identical node sizes and merged categories, and adjusted p values and statistics within a relative 1e-6; 10-fold cross-validated risk matches chaidr to 12 decimals, and the root split agrees with the R-Forge CHAID package 0.1.2. CRT matches rpart 4.1.27 on Gini and least-squares trees and surrogate routing, a brute-force search for Gini, twoing and least-squares splits to 12 decimals, and the manual's cost-complexity pruning sequence. Validation evidence
Questions
Should I use CHAID or CRT?
CHAID gives wide, readable trees with multiway splits and a significance test at each split, which suits segmentation. CRT makes binary splits, handles missing values with surrogates and can be pruned by cost-complexity, which suits prediction. Compare their cross-validated risk on your data.
What is the difference between CHAID and Exhaustive CHAID?
Exhaustive CHAID keeps merging categories until two remain and then picks the best grouping, so it searches more thoroughly and has no separate merging significance level. It is slower and usually gives similar trees.
Why did my tree not split at all?
Usually the stopping rules: the parent node needs at least 100 cases and each child 50 by default. Lower the minimum cases in parent and child nodes for small files, or raise the significance level for splitting.
How do I read the gains table?
Pick the category you want to find as the target category for gains. A node with Index % of 200 has twice the overall response rate; Cumulative Gain % tells you what share of all target cases you reach by taking the top nodes.
Can I use weighted data?
Yes, if the workspace weight holds whole-number counts and you declare it a frequency weight. Sampling weights need a design-based analysis, so the tree is not grown with them.
Related procedures
- Binary Logistic RegressionLOGISTIC REGRESSION
- Multinomial Logistic RegressionNOMREG
- Optimal BinningOPTIMAL BINNING
- Nearest Neighbor Analysis (KNN)KNN
- TwoStep ClusterTWOSTEP CLUSTER
- Crosstabs StatisticsCROSSTABS /STATISTICS
- Free SPSS alternative: full coverage list
Run Decision Tree (CHAID, CRT) on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.