This code creates a big gamblers data set by combining the training and validation gamblers data sets (also linked in the text file)
Data gamblers;
length type $8.;
input sub $ dsm1-dsm12 ga1-ga20 type $;
datalines;
1 3 3 3 1 0 0 0 1 3 0 0 2 3 0 2 3 0 1 4 3 1 1 0 4 1 1 0 3 0 0 0 4 Steady
2 2 3 4 0 4 3 4 1 2 0 3 1 1 4 1 3 4 2 2 2 1 2 1 3 4 1 4 2 1 4 3 2 Control
3 3 3 4 4 1 2 0 4 4 3 2 2 2 1 2 4 1 3 4 3 2 3 3 4 2 4 0 3 4 0 2 3 Binge
4 0 0 0 3 2 2 3 4 0 4 4 3 4 3 4 0 2 2 0 0 4 4 3 0 3 4 4 0 3 2 2 0 Binge
5 0 0 0 0 3 4 4 1 2 1 2 0 0 3 0 2 4 0 0 0 1 0 1 1 4 1 3 2 0 3 4 1 Control
6 1 0 0 2 1 1 0 1 0 2 1 1 1 2 3 1 1 1 0 1 1 1 1 1 0 1 2 1 1 1 0 0 Control
7 1 0 2 1 2 2 4 1 0 1 0 3 2 2 3 0 2 4 1 2 2 3 2 1 1 2 2 2 2 3 3 1 Control
8 3 4 4 4 3 1 3 3 1 3 1 4 3 2 3 3 0 3 3 4 3 3 4 3 2 3 3 3 3 2 2 3 Binge
9 2 2 1 2 1 2 1 1 3 1 0 2 2 2 0 1 1 0 2 1 1 1 1 2 1 0 0 1 1 1 1 2 Control
10 2 3 1 1 0 2 0 1 2 1 4 1 2 3 0 2 1 2 2 2 2 1 0 3 2 1 0 1 2 0 0 2 Control
11 2 2 2 0 0 4 0 0 3 0 4 0 0 4 0 1 0 0 1 2 0 0 0 1 4 0 1 2 0 0 0 2 Control
12 4 4 4 1 2 2 2 2 4 3 1 1 3 0 1 4 1 2 4 4 1 1 3 4 0 3 2 4 2 3 2 4 Control
13 3 1 2 4 1 3 1 4 3 4 2 4 3 3 1 2 3 4 3 3 3 3 3 2 3 3 3 2 4 2 1 1 Control
14 1 0 2 2 1 4 1 3 1 2 2 2 2 2 3 1 4 3 1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0 4 3 4 4 1 3 4 4 1 0 2 3 3 2 2 2 4 3 1 0 3 1 0 0 2 Binge
192 0 0 0 3 0 0 1 2 0 3 3 4 3 1 3 0 0 3 0 0 4 4 4 0 1 3 0 0 4 0 1 0 Binge
193 4 4 4 1 1 1 1 0 4 0 1 0 1 1 2 4 2 2 3 3 0 2 0 4 0 0 1 4 0 1 1 4 Control
194 0 0 0 3 0 0 1 0 0 0 1 0 0 2 0 0 1 0 1 0 0 0 1 2 1 0 1 0 0 0 2 0 Control
195 2 1 4 4 0 2 1 4 3 4 1 4 3 2 4 2 0 4 2 2 4 4 4 2 1 4 0 2 4 0 0 0 Binge
196 3 1 1 2 0 3 1 1 0 0 4 1 3 4 2 1 0 1 0 1 1 0 1 3 3 1 1 2 1 0 0 0 Control
197 2 2 1 4 0 4 3 3 2 4 3 3 4 3 4 2 2 4 2 3 4 4 3 1 3 4 3 1 4 2 1 2 Binge
198 1 1 0 3 0 2 2 4 1 4 3 4 4 3 3 1 0 4 1 2 4 4 4 1 2 4 0 1 4 0 0 1 Binge
199 4 4 4 4 2 4 2 4 4 3 4 4 4 3 4 4 4 3 4 4 4 4 4 4 4 3 1 4 4 3 3 4 Binge
200 0 0 1 2 0 1 1 3 0 2 4 2 1 3 3 0 2 1 0 0 3 3 2 0 3 2 0 0 2 2 1 0 Control
;
procprint data=gamblers; run;
libnameaaem " (put your path for your aaem data here) ";
dataaaem.gamblers; set gamblers; run;
1. I am wondering if the gamblers data cluster into three groups that correspond well to the 3 diagnosis groups in the data. Cluster this combined data into 3 clusters using the ga questionnaire answers and explain how well your three clusters match the three diagnosed categories produced by the psychologist. Explain which of your clusters most closely matches each diagnosed category group and be sure to mention which clustering method you used. You might want to try some different clustering methods to see which one most closely matches the diagnosed categories. For your three clusters, what do you think are the 4 most important questions in determining the clusters? What did you use to make that decision?
Note: these questions are items that we are looking for as part of a nice, well organized report.
2. Suppose I have two populations, defaulters and nondefaulters and for each population we have pairs of observations (X1,X2) that are distributed as bivariate normal. For example X1 might be something like years on the job and X2 might be debt as a percentage of income but just think of them as a pair of numbers from each individual. Suppose both of these populations have variance-covariance matrix for (X1,X2) given by
A. Find -1
B. In either group, those with the higher values of X1 tend to which, higher or lower, values of X2 (or can’t you tell)?
The mean vector for the nondefaulters is and that for defaulters is . I have an individual whose coordinates are (8,8).
B. For this individual, what are the ordinary (Euclidean) squared distances to the defaulter ____ and nondefaulter ______mean vectors? Which is closest?
C. For this individual, what are the squared Mahalanobis distances to the defaulter ______and nondefaulter ______mean vectors? Which is closest? Which population ______gives the higher probability to this individual (you should be able to tell without computing the probability).
D. For classification, which distance measure, ordinary or Mahalnobis, is preferred and why?