Download presentation
Presentation is loading. Please wait.
1
Decision trees part II
2
CHAID method : Chi-Squared Automatic Interaction Detection
LESSON TOPICS CHAID method : Chi-Squared Automatic Interaction Detection Chi-square test Bonferroni correction factor Examples
3
Principal features of CHAID method
4
CHAID merges categories of the predictor that are homogeneous with respect to the dependent variable , but keeps distinct all the categories which are heterogeneous
5
CHAID uses Bonferroni multiplier for doing the needed adjustments in order for making simultaneous statistical inferences
6
CHAID, a differenza di altri metodi di partizione iterativa, è limitato a caratteri di tipo ordinale e nominale
7
It uses chi-square test for veryfing indipendence between characters (together with Bonferroni factor) for assessing significativity of partition
8
Chi-square test of independence
i j ( n ij - nij )2 * nij x2 =
9
where nij is the empirical frequency corresponding to the combination of modality i of the first character with modality j of the second character
10
nij = ninj * Is the corresponding theoretical frequency according to the hypothesis of indipendence between the two characters
11
EXAMPLE Families according to residence and personal computer ownership (empirical frequencies)
12
Geographic zone Ownership of personal computer North-Center South
Total YES NO 150 500 650 100 250 350 750 1000
13
Families according to residence and personal computer ownership (theoretical frequencies)
14
Geographic zone Ownership of personal computer North-Center South
Total YES NO 162,5 487,5 650,0 87,5 262,5 350,0 250,0 750,0 1000,0
15
Test calculations: (500-487,5)2/487,5+ (87,5-100)2/87,5+
(162,5-150)2/162,5+ ( ,5)2/262,5=
16
Bonferroni adjustment factor
Let us consider the dependent variable R and the predictors B, with five modalities, and A, with two Let us take that a is the first type error of the indipendence test in a two entry table with B e R (for example a =0,05)
17
There are 24 -1 = 15 different ways to make dichotomous variable B
If the 15 test of hypothesis were indipendent, the probability of making a first type error would be: 1-(1-a)15 > a
18
In the above example, 15 is called Bonferroni factor
If a è piccolo 1 - (1-a)M = Ma For the predictor A the probability of making a first type error is simply a
19
In the CHAID method we compare the value of a associated with the test of indipendence for the variable A with the value of a for the variable B corrected with Bonferroni factor
20
Basic components of CHAID:
21
1 2 3 A categorical dependent variable
A set of independent variables, categorical too, combinations of which are used for defining the partitions 3 A set of parameters
22
In each step of the analysis, each subgroup is analyzed and we get the best predictor, defined as that which has the smallest value of a corrected by the smallest Bonferroni factor
23
Kinds of predictive variables in CHAID
Monotonic 1 Free 2 Floating 3
24
The CHAID algorithm: STEP 1: Merging Step 2: Splitting
Step 3: Stopping
25
Merging
26
For each predictor
27
Construct the complete two ways table
1
28
For each couple of categories that can be merged calculate chi-square test. For each couple which is not significative merge and go to step 3. If all the remaining couples are significative go to step 4 2
29
For each categories resulting from the merge of three or more categories originarie controlla con il test chi-quadrato se ogni categoria originaria può essere separata dalle altre. Torna al passo 2 3
30
Merge categories which have a too small number of observations, taking those which have the smallest value of chi-squared 4 Calculate the value of a corrected by Bonferroni factor on the table resulting by the merging process 5
31
Splitting Take as the best predictor that which has the smallest value of a corrected by Bonferroni factor If no predictor shows a significant value of a, do not split that subgroup
32
Stopping Come back to step 1 and analyze the next subgroup. Stop when every subgroup has been analyzed or has too few observations
33
Example of chaid method
Dependent variable: Response rate to a promotional offer of subscribing a magazine
34
Indipendent Variables
35
Head of the family age - 5 categories -floating (AGE)
gender - 2 categories -monotonic - (GENDER) Presence of children - 2 categories - monotonic (KIDS) Family income - 8 categories - monotonic (INCOME)
36
Credit card - 2 categories - monotonic (BANKCARD)
Number of components - 6 categories - floating - (HHSIZE) Occupational status -4 categories - free (OCCUP)
37
Representation of the partition process by a dendrogram
38
Total ,040 HHSIZE ,384 ,132 ,198 ? ,326 OCCUP GENDER -1- -4- W ,758 BO? ,374 M ,531 F ,795 -2- -3- -5- -6-
39
Interpretation of results
Comparison of response accordin to the variable household size before and after merging
40
% of responses HHSIZE Frequency Before merging After merging 1 2 3 4 5 Missing value 25384 11240 4892 3187 3011 33326 1,09 1,49 1,59 1,79 2,06 0,87 1,52 1,92
41
Ranking of segments according to response rate
42
Rank Number Description Response rate 1 2 Segment 2 Segment 4 2,39
Household with two or tre components, head white collar 2,39 1,92 Households with four components and more
43
Household with one component
Rank Number Description Response rate 3 4 Segment 3 Segment 1 Household with two or three components, head with occupational staus different from white collar 1,42 1,09 Household with one component
44
Household with missing number of components, head male
Rank Number Description Response rate 5 Segment 6 Segment 5 Household with missing number of components, head female 1,o6 0,81 Household with missing number of components, head male
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.