程序代碼
PROC CLUSTER data=Arndata.drink
method=ave outtree=drink_OUT; /* method:指定聚類距離的計算方法, outtree:將分析結果輸出,並制定輸出到的數據集名稱*/
var calorie caffeine sodium price;
run;
輸出結果
SAS 系統 2012年05月26日 星期六 下午10時43分25秒 1
The CLUSTER Procedure
Average Linkage Cluster Analysis
Eigenvalues of the Covariance Matrix
Eigenvalue Difference Proportion Cumulative
1 3710.98205 3703.43040 0.9964 0.9964
2 7.55165 2.42941 0.0020 0.9984
3 5.12224 4.24639 0.0014 0.9998
4 0.87585 0.0002 1.0000 1.0000
Root-Mean-Square Total-Sample Standard Deviation = 30.51447
Root-Mean-Square Distance Between Observations = 86.30796
Cluster History
Norm T
RMS i
NCL --Clusters Joined--- FREQ Dist e
15 OB5 OB15 2 0.042
14 OB4 OB13 2 0.059
13 OB2 CL14 3 0.07
12 OB6 OB9 2 0.0963
11 OB1 OB10 2 0.1174
10 OB8 OB11 2 0.1421
9 CL15 OB16 3 0.1632
8 CL13 CL10 5 0.2072
7 OB12 OB14 2 0.2081
6 OB3 CL12 3 0.2482
5 CL9 OB7 7 0.4389
3 CL6 CL5 7 0.4855
2 CL4 CL3 14 0.9187
1 CL11 CL2 16 1.6141