/* Lesson 12-1 */
/* File Name = les1201.sas 07/07/05 */
data gakusei;
infile 'all05a.prn'
firstobs=2;
input sex $ shintyou taijyuu kyoui
jitaku $ kodukai carryer $ tsuuwa;
proc print data=gakusei(obs=10);
run;
proc plot data=gakusei; : 散布図
plot shintyou*taijyuu; : 元の変量のプロット
run; :
proc princomp cov data=gakusei out=outprin; : 主成分分析(分散共分散行列)
var shintyou taijyuu; : 2変量
run; :
proc print data=outprin(obs=15); : 結果の出力
run; :
proc plot data=outprin; : 散布図
plot prin2*prin1/vref=0 href=0; : 主成分得点のプロット
run; :
proc sort data=outprin; : 説明のためにソートしてみる
by prin1; : 第一主成分で
run; :
proc print data=outprin; : 体重がややが効いていることの確認
run; :
SAS システム 2 23:15 Wednesday, July 6, 2005 プロット : SHINTYOU*TAIJYUU. 凡例: A = 1 OBS, B = 2 OBS, ... (NOTE: 46 オブザベーションが欠損値です.) SHINTYOU | 200 + | | B A 180 + A BDCFDDBEA B B A A A | BAFDKHTOHHCFECB BA | AEAGIIFECBCEAA AA A A 160 + ADCFDIDDBABB | A ECAEDDA A A | A BAA 140 + ---+-----------+-----------+-----------+-----------+-- 20 40 60 80 100 TAIJYUU SAS システム 3 23:15 Wednesday, July 6, 2005 Principal Component Analysis 282 Observations 2 Variables Simple Statistics SHINTYOU TAIJYUU Mean 168.4446809 58.56382979 StD 8.1382706 9.36408887 SAS システム 4 23:15 Wednesday, July 6, 2005 Principal Component Analysis Covariance Matrix SHINTYOU TAIJYUU SHINTYOU 66.23144847 54.25158628 TAIJYUU 54.25158628 87.68616037 Total Variance = 153.91760884 Eigenvalues of the Covariance Matrix Eigenvalue Difference Proportion Cumulative PRIN1 132.261 110.604 0.859296 0.85930 PRIN2 21.657 . 0.140704 1.00000 SAS システム 5 23:15 Wednesday, July 6, 2005 Principal Component Analysis Eigenvectors PRIN1 PRIN2 SHINTYOU 0.634832 0.772651 TAIJYUU 0.772651 -.634832 SAS システム 6 23:15 Wednesday, July 6, 2005 S H T K C I A J O A T N I K I D R S P P T J Y T U R U R R O S Y Y O A K Y U I I B E O U U K A E W N N S X U U I U I R A 1 2 1 F 145.0 38.0 . J 10000 . -30.7721 -5.05998 2 F 146.7 41.0 85 J 10000 Vodafone 6000 -27.3749 -5.65097 3 F 148.0 42.0 . J 50000 . -25.7770 -5.28135 <中略> SAS システム 8 23:15 Wednesday, July 6, 2005 プロット : PRIN2*PRIN1. 凡例: A = 1 OBS, B = 2 OBS, ... (NOTE: 46 オブザベーションが欠損値です.) 20 + | | | PRIN2 | A | A | A BCABABBCCA AA | A BBABDADEBFGDBJGC DE A 0 +-------------B-DAB-FC-JACEGEEFDKCACFBA-EAA-----A--------- | A AAABA CBCDAABCA C C BEEB FD A AA | AA B A A A B|BA A A AAA A | A | B | | A A -20 + | A A ---+------------+------------+------------+------------+-- -40 -20 0 20 40 PRIN1 SAS システム 9 23:15 Wednesday, July 6, 2005 S H T K C I A J O A T N I K I D R S P P T J Y T U R U R R O S Y Y O A K Y U I I B E O U U K A E W N N S X U U I U I R A 1 2 1 F 148.9 . . J 60000 . . . 2 F 153.0 . . G 120000 DoCoMo 200 . . 3 F 155.0 . . J 20000 . . . <中略> SAS システム 45 23:15 Wednesday, July 6, 2005 S H T K C I A J O A T N I K I D R S P P T J Y T U R U R R O S Y Y O A K Y U I I B E O U U K A E W N N S X U U I U I R A 1 2 289 M 180.0 64.0 90 J 35000 . 11.5359 5.4772 290 M 180.0 64.0 90 G 60000 au 10000 11.5359 5.4772 291 M 168.0 74.0 . G 120000 DDIp 15000 11.6445 -10.1430 292 M 179.0 65.0 . J 0 . 11.6738 4.0697 293 M 173.8 69.6 90 J 30000 DoCoMo 13000 11.9268 -2.8683 294 M 177.0 67.0 . 4000 DoCoMo 8000 11.9494 1.2547 295 M 180.0 65.0 88 J 30000 . 12.3086 4.8423 296 M 180.0 65.0 . G 100000 . 12.3086 4.8423 297 M 168.0 75.0 . G 150000 . 12.4171 -10.7778 298 M 179.0 66.0 . 30000 . 12.4464 3.4349 299 M 173.0 71.0 100 G 0 . 12.5007 -4.3752 300 M 178.0 67.0 . J 0 . 12.5842 2.0274 301 M 172.0 72.0 89 G 150000 . 12.6385 -5.7827 302 M 177.0 68.0 . G 80000 . 12.7220 0.6199 303 M 182.0 64.0 . G 0 . 12.8056 7.0225 304 M 165.0 78.0 . G 0 2098 12.8306 -15.0002 305 M 170.0 74.0 90 J 0 . 12.9141 -8.59765 306 M 175.0 70.0 95 G 50000 8000 12.9977 -2.19507 307 M 178.0 68.0 . J 100000 DoCoMo 4000 13.3569 1.39254 308 M 175.0 74.0 . J 0 . 16.0883 -4.73440 309 M 180.0 70.0 94 G 70000 au 5000 16.1718 1.66818 310 M 180.0 70.0 . J 40000 au 4000 16.1718 1.66818 311 M 180.0 70.0 . . . 16.1718 1.66818 312 M 180.0 70.0 . J 40000 DoCoMo 6500 16.1718 1.66818 313 M 178.7 71.2 95 0 . 16.2737 -0.0981 314 M 173.5 76.5 . G 100000 . 17.0677 -7.4805 315 M 184.0 68.0 85 30000 . 17.1659 6.0284 316 M 182.0 70.0 90 G 100000 . 17.4415 3.2135 317 M 185.0 68.0 93 J 0 . 17.8007 6.8011 318 M 175.0 77.0 95 G 130000 . 18.4062 -6.6389 319 M 179.1 74.2 . 0 au 4000 18.8456 -1.6935 320 M 176.5 78.0 96 J 10000 . 20.1311 -6.1147 321 M 177.0 78.0 . J 40000 . 20.4486 -5.7284 322 M 181.5 74.5 . G 120000 au 3000 20.6010 -0.0296 323 M 178.0 78.0 110 G 50000 . 21.0834 -4.9558 324 M 169.3 88.5 94 J 0 . 23.6732 -18.3436 325 M 186.0 82.0 . J 0 . 29.2526 -1.3139 326 M 182.0 90.0 100 J 40000 . 32.8945 -9.4831 327 M 178.0 95.0 . 1000 No . 34.2184 -15.7479 328 M 178.0 100.0 112 G 60000 . 38.0817 -18.9221
/* Lesson 12-2 */ /* File Name = les1202.sas 07/07/05 */ data gakusei; infile 'all05a.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; proc print data=gakusei(obs=10); run; proc princomp cov data=gakusei out=outprin; : 主成分分析(分散共分散行列) var shintyou taijyuu kyoui; : 3変量 run; : proc print data=outprin(obs=15); : 結果の出力 run; : proc plot data=outprin; : 散布図 plot prin2*prin1/vref=0 href=0; : 主成分得点のプロット plot prin3*prin2/vref=0 href=0; : plot prin3*prin1/vref=0 href=0; : run; :
SAS システム 3
23:16 Wednesday, July 6, 2005
Principal Component Analysis
104 Observations
3 Variables
Simple Statistics
SHINTYOU TAIJYUU KYOUI
Mean 167.2798077 58.69615385 86.49038462
StD 8.8277737 10.85357015 7.64249132
SAS システム 4
23:16 Wednesday, July 6, 2005
Principal Component Analysis
Covariance Matrix
SHINTYOU TAIJYUU KYOUI
SHINTYOU 77.9295883 70.4536109 25.3187360
TAIJYUU 70.4536109 117.7999851 54.5154966
KYOUI 25.3187360 54.5154966 58.4076736
SAS システム 5
23:16 Wednesday, July 6, 2005
Principal Component Analysis
Total Variance = 254.13724701
Eigenvalues of the Covariance Matrix
Eigenvalue Difference Proportion Cumulative
PRIN1 196.291 154.890 0.772382 0.77238
PRIN2 41.401 24.956 0.162909 0.93529
PRIN3 16.445 . 0.064709 1.00000
SAS システム 6
23:16 Wednesday, July 6, 2005
Principal Component Analysis
Eigenvectors
PRIN1 PRIN2 PRIN3
SHINTYOU 0.530874 -.657814 0.534279
TAIJYUU 0.750236 0.071616 -.657280
KYOUI 0.394105 0.749768 0.531535
SAS システム 7
23:16 Wednesday, July 6, 2005
S
H T K C
I A J O A T
N I K I D R S P P P
T J Y T U R U R R R
O S Y Y O A K Y U I I I
B E O U U K A E W N N N
S X U U I U I R A 1 2 3
1 F 145.0 38.0 . J 10000 . . . .
2 F 146.7 41.0 85 J 10000 Vodafone 6000 -24.7889 11.1529 -0.15621
3 F 148.0 42.0 . J 50000 . . . .
4 F 148.0 43.0 80 J 50000 DoCoMo 4000 -24.5689 6.6921 -3.43388
5 F 148.9 . . J 60000 . . . .
6 F 149.0 45.0 . G 60000 . . . .
7 F 150.0 46.0 86 40000 . -18.8918 10.0900 -1.14796
8 F 151.0 50.0 . G 60000 J-PHONE . . . .
9 F 151.7 41.5 80 J 35000 . -23.7300 4.1508 -0.47113
10 F 152.0 35.0 77 J 60000 DoCoMo 2000 -29.6296 1.2387 2.36687
11 F 152.0 43.0 . J 20000 au 3500 . . .
12 F 152.0 44.0 . 45000 DoCoMo 4000 . . .
13 F 153.0 41.0 . J 125000 No . . . .
14 F 153.0 42.0 . G 0 Vodafone 1000 . . .
15 F 153.0 46.5 87 G 10000 . -16.5299 8.9021 0.65777
SAS システム 9
23:16 Wednesday, July 6, 2005
プロット : PRIN2*PRIN1. 凡例: A = 1 OBS, B = 2 OBS, ...
(NOTE: 224 オブザベーションが欠損値です.)
PRIN2 | |
20 + |
| A A A | A A A A
| AA ABABBB AC | A AC A A
0 +--------A----A-AABCBCD-CAAACADD-BBBAAB-AA-------A----------------
| A A A B AAA BBAD B
| A |AAA A
-20 + |
| A |
| |
-40 + |
---+-----------+-----------+-----------+-----------+-----------+--
-40 -20 0 20 40 60
PRIN1
SAS システム 10
23:16 Wednesday, July 6, 2005
プロット : PRIN3*PRIN2. 凡例: A = 1 OBS, B = 2 OBS, ...
(NOTE: 224 オブザベーションが欠損値です.)
PRIN3 | |
10 + |
| A A AB A| A A A
| A A A AA D EBCD AABD A A
0 +----------------------A---A-A--B--A--EACBCBCBA-A-AAA-------------
| A A A A A CC CBA AA
| A AA A | AA A A
-10 + | A
| A | A
| |
-20 + |
---+-----------+-----------+-----------+-----------+-----------+--
-30 -20 -10 0 10 20
PRIN2
SAS システム 11
23:16 Wednesday, July 6, 2005
プロット : PRIN3*PRIN1. 凡例: A = 1 OBS, B = 2 OBS, ...
(NOTE: 224 オブザベーションが欠損値です.)
PRIN3 | |
10 + |
| A |B A C A A
| A A AAACA BB |ABDDBAA A D
0 +-----------AA--BCACCAC-AAAABB-CA-A--A----------------------------
| A A AA AA BA | B BBB AA
| A AA A A A A A
-10 + A |
| A | A
| |
-20 + |
---+-----------+-----------+-----------+-----------+-----------+--
-40 -20 0 20 40 60
PRIN1
/* Lesson 12-3 */
/* File Name = les1203.sas 07/07/05 */
data gakusei;
infile 'all05a.prn'
firstobs=2;
input sex $ shintyou taijyuu kyoui
jitaku $ kodukai carryer $ tsuuwa;
proc print data=gakusei(obs=10);
run; :
proc princomp data=gakusei out=outprin; : 相関係数を使って
var shintyou taijyuu kyoui; :
run; :
proc print data=outprin(obs=15);
run;
proc plot data=outprin;
plot prin2*prin1/vref=0 href=0;
plot prin3*prin2/vref=0 href=0;
plot prin3*prin1/vref=0 href=0;
run;
SAS システム 3
23:16 Wednesday, July 6, 2005
Principal Component Analysis
104 Observations
3 Variables
Simple Statistics
SHINTYOU TAIJYUU KYOUI
Mean 167.2798077 58.69615385 86.49038462
StD 8.8277737 10.85357015 7.64249132
SAS システム 4
23:16 Wednesday, July 6, 2005
Principal Component Analysis
Correlation Matrix
SHINTYOU TAIJYUU KYOUI
SHINTYOU 1.0000 0.7353 0.3753
TAIJYUU 0.7353 1.0000 0.6572
KYOUI 0.3753 0.6572 1.0000
SAS システム 5
23:16 Wednesday, July 6, 2005
Principal Component Analysis
Eigenvalues of the Correlation Matrix
Eigenvalue Difference Proportion Cumulative
PRIN1 2.19083 1.56282 0.730277 0.73028
PRIN2 0.62802 0.44686 0.209338 0.93962
PRIN3 0.18115 . 0.060385 1.00000
SAS システム 6
23:16 Wednesday, July 6, 2005
Principal Component Analysis
Eigenvectors
PRIN1 PRIN2 PRIN3
SHINTYOU 0.560340 -.648358 0.515414
TAIJYUU 0.637705 -.059382 -.767989
KYOUI 0.528537 0.759017 0.380187
/* Lesson 13-1 */ /* File Name = les1301.sas 07/14/05 */ data food; : infile 'food.dat'; : ファイルの読み込み input X01-X10; : 変量リスト、連続的に label X01='M(-15)' : 各変量に解りやすい名前を付ける X02='M(16-20)' : M : 男性 X03='M(21-30)' : F : 女性 X04='M(31-40)' : ()内 : 年齢 X05='M(41-)' : X06='F(-15)' : X07='F(16-20)' : X08='F(21-30)' : X09='F(31-40)' : X10='F(41-)'; : : proc print data=food(obs=10); : データの表示 run; : proc factor data=food; : オプションを付けないと主成分分析 var X01-X10; : 解析に使う変量リスト run; :
SAS システム 1 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 X09 X10 1 7.69 7.31 7.47 7.76 7.87 7.51 7.24 7.70 7.91 7.95 2 6.59 5.56 6.21 6.04 5.81 6.64 6.11 6.53 6.44 6.64 3 4.55 4.18 4.36 4.25 4.53 4.60 3.66 4.04 3.68 4.43 4 6.78 6.11 6.30 5.98 5.56 6.37 6.29 5.43 5.32 5.28 SAS システム 2 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Prior Communality Estimates: ONE Eigenvalues of the Correlation Matrix: Total = 10 Average = 1 1 2 3 4 5 Eigenvalue 6.8280 1.7619 0.7545 0.2624 0.1216 Difference 5.0661 1.0074 0.4921 0.1408 0.0236 Proportion 0.6828 0.1762 0.0754 0.0262 0.0122 Cumulative 0.6828 0.8590 0.9344 0.9607 0.9728 6 7 8 9 10 Eigenvalue 0.0980 0.0721 0.0441 0.0358 0.0219 Difference 0.0259 0.0280 0.0083 0.0139 Proportion 0.0098 0.0072 0.0044 0.0036 0.0022 Cumulative 0.9826 0.9898 0.9942 0.9978 1.0000 SAS システム 3 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components 2 factors will be retained by the MINEIGEN criterion. SAS システム 4 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Factor Pattern FACTOR1 FACTOR2 X01 0.74741 -0.59244 M(-15) X02 0.86579 -0.31836 M(16-20) X03 0.84491 0.22079 M(21-30) X04 0.78216 0.47602 M(31-40) X05 0.68129 0.67325 M(41-) X06 0.80647 -0.54140 F(-15) X07 0.89959 -0.33542 F(16-20) X08 0.90901 -0.04289 F(21-30) X09 0.90316 0.21817 F(31-40) X10 0.79262 0.35477 F(41-) SAS システム 5 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Variance explained by each factor FACTOR1 FACTOR2 6.827955 1.761873 Final Communality Estimates: Total = 8.589828 X01 X02 X03 X04 X05 0.909618 0.850950 0.762624 0.838371 0.917413 X06 X07 X08 X09 X10 0.943520 0.921775 0.828147 0.863298 0.754112
/* Lesson 13-2 */ /* File Name = les1302.sas 07/14/05 */ data food; infile 'food.dat'; input X01-X10; label X01='M(-15)' X02='M(16-20)' X03='M(21-30)' X04='M(31-40)' X05='M(41-)' X06='F(-15)' X07='F(16-20)' X08='F(21-30)' X09='F(31-40)' X10='F(41-)'; proc print data=food(obs=10); run; : proc factor data=food nfactor=3 out=fscore; : 因子数3、出力の保存 var X01-X10; : run; : proc plot data=fscore; : plot factor1*factor2/vref=0.0 href=0.0; : 第1因子 x 第2因子、軸 plot factor2*factor3/vref=0.0 href=0.0; : 第2因子 x 第3因子、軸 run; :
SAS システム 2 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Prior Communality Estimates: ONE Eigenvalues of the Correlation Matrix: Total = 10 Average = 1 1 2 3 4 5 Eigenvalue 6.8280 1.7619 0.7545 0.2624 0.1216 Difference 5.0661 1.0074 0.4921 0.1408 0.0236 Proportion 0.6828 0.1762 0.0754 0.0262 0.0122 Cumulative 0.6828 0.8590 0.9344 0.9607 0.9728 6 7 8 9 10 Eigenvalue 0.0980 0.0721 0.0441 0.0358 0.0219 Difference 0.0259 0.0280 0.0083 0.0139 Proportion 0.0098 0.0072 0.0044 0.0036 0.0022 Cumulative 0.9826 0.9898 0.9942 0.9978 1.0000 SAS システム 3 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components 3 factors will be retained by the NFACTOR criterion. SAS システム 4 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Factor Pattern FACTOR1 FACTOR2 FACTOR3 X01 0.74741 -0.59244 0.16808 M(-15) X02 0.86579 -0.31836 0.29190 M(16-20) X03 0.84491 0.22079 0.38417 M(21-30) X04 0.78216 0.47602 0.32604 M(31-40) X05 0.68129 0.67325 0.11067 M(41-) X06 0.80647 -0.54140 -0.07270 F(-15) X07 0.89959 -0.33542 -0.14888 F(16-20) X08 0.90901 -0.04289 -0.25110 F(21-30) X09 0.90316 0.21817 -0.27989 F(31-40) X10 0.79262 0.35477 -0.45389 F(41-) SAS システム 5 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Variance explained by each factor FACTOR1 FACTOR2 FACTOR3 6.827955 1.761873 0.754451 Final Communality Estimates: Total = 9.344279 X01 X02 X03 X04 X05 0.937870 0.936157 0.910210 0.944673 0.929662 X06 X07 X08 X09 X10 0.948805 0.943939 0.891197 0.941637 0.960129 SAS システム 6 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Scoring Coefficients Estimated by Regression Squared Multiple Correlations of the Variables with each Factor FACTOR1 FACTOR2 FACTOR3 1.000000 1.000000 1.000000 SAS システム 7 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Standardized Scoring Coefficients FACTOR1 FACTOR2 FACTOR3 X01 0.10946 -0.33626 0.22279 M(-15) X02 0.12680 -0.18069 0.38691 M(16-20) X03 0.12374 0.12531 0.50920 M(21-30) X04 0.11455 0.27018 0.43215 M(31-40) X05 0.09978 0.38212 0.14670 M(41-) X06 0.11811 -0.30729 -0.09636 F(-15) X07 0.13175 -0.19038 -0.19733 F(16-20) X08 0.13313 -0.02434 -0.33282 F(21-30) X09 0.13227 0.12383 -0.37099 F(31-40) X10 0.11609 0.20136 -0.60162 F(41-) SAS システム 8 20:31 Wednesday, July 13, 2005 プロット : FACTOR1*FACTOR2. 凡例: A = 1 OBS, B = 2 OBS, ... 5 + | | | FACTOR1 | | | A A |A B A | A A A AA BBA AAADA BB A AA A A A 0 +----A-------A----AAB--AAA----ACA---BABAAA-B--AAAAA--AA-A--A--A- | A AA A A A A A A A | ABAAABB BA A A A | A A A | A A | | A | | -5 + | --+-----------+-----------+-----------+-----------+-----------+- -3 -2 -1 0 1 2 FACTOR2 SAS システム 9 20:31 Wednesday, July 13, 2005 プロット : FACTOR2*FACTOR3. 凡例: A = 1 OBS, B = 2 OBS, ... FACTOR2 | | 2.5 + | | A A A A | AC A A A | AA ABA ADABA AB| B A AA AA A 0.0 +---BA----AAAA-CBA--A-+-ECB-A------A----A--------A-------------- | A A BAA ABB AB AABAB | B AA B AAAAA A A -2.5 + | A | | | | -5.0 + | --+---------+---------+---------+---------+---------+---------+- -2 -1 0 1 2 3 4 FACTOR3
/* Lesson 13-3 */ /* File Name = les1303.sas 07/14/05 */ data food; infile 'food.dat'; input X01-X10; label X01='M(-15)' X02='M(16-20)' X03='M(21-30)' X04='M(31-40)' X05='M(41-)' X06='F(-15)' X07='F(16-20)' X08='F(21-30)' X09='F(31-40)' X10='F(41-)'; proc print data=food(obs=10); run; proc factor data=food nfactor=3 rotate=varimax out=fscore2; var X01-X10; : 回転の指定 run; : proc print data=fscore2; run; proc plot data=fscore2; plot factor1*factor2/vref=0.0 href=0.0; plot factor2*factor3/vref=0.0 href=0.0; plot factor3*factor1/vref=0.0 href=0.0; run;
SAS システム 6 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Orthogonal Transformation Matrix 1 2 3 1 0.65751 0.53576 0.52976 2 -0.73452 0.61238 0.29234 3 0.16779 0.58134 -0.79617 SAS システム 7 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Rotated Factor Pattern FACTOR1 FACTOR2 FACTOR3 X01 0.95480 0.13534 0.08893 M(-15) X02 0.85209 0.43859 0.13319 M(16-20) X03 0.45782 0.81121 0.20628 M(21-30) X04 0.21933 0.90009 0.29393 M(31-40) X05 -0.02799 0.84163 0.46962 M(41-) X06 0.91574 0.05827 0.32684 F(-15) X07 0.81289 0.19001 0.49704 F(16-20) X08 0.58706 0.31477 0.66894 F(21-30) X09 0.38662 0.45477 0.76508 F(31-40) X10 0.18442 0.37804 0.88499 F(41-) SAS システム 8 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Variance explained by each factor FACTOR1 FACTOR2 FACTOR3 3.923686 2.875550 2.545044 Final Communality Estimates: Total = 9.344279 X01 X02 X03 X04 X05 0.937870 0.936157 0.910210 0.944673 0.929662 X06 X07 X08 X09 X10 0.948805 0.943939 0.891197 0.941637 0.960129 SAS システム 9 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Scoring Coefficients Estimated by Regression Squared Multiple Correlations of the Variables with each Factor FACTOR1 FACTOR2 FACTOR3 1.000000 1.000000 1.000000 SAS システム 10 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Standardized Scoring Coefficients FACTOR1 FACTOR2 FACTOR3 X01 0.35634 -0.01776 -0.21769 M(-15) X02 0.28101 0.18221 -0.29369 M(16-20) X03 0.07475 0.43906 -0.30323 M(21-30) X04 -0.05062 0.47805 -0.20440 M(31-40) X05 -0.19046 0.37274 0.04777 M(41-) X06 0.28720 -0.18091 0.04945 F(-15) X07 0.19335 -0.16071 0.17125 F(16-20) X08 0.04957 -0.13707 0.32839 F(21-30) X09 -0.06623 -0.06897 0.40164 F(31-40) X10 -0.17252 -0.16424 0.59935 F(41-) SAS システム 11 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 1 7.69 7.31 7.47 7.76 7.87 7.51 7.24 7.70 2 6.59 5.56 6.21 6.04 5.81 6.64 6.11 6.53 3 4.55 4.18 4.36 4.25 4.53 4.60 3.66 4.04 4 6.78 6.11 6.30 5.98 5.56 6.37 6.29 5.43 5 6.47 6.24 6.02 5.42 5.88 6.00 5.60 4.60 6 6.96 6.81 6.91 6.48 6.23 7.09 7.27 7.13 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 1 7.91 7.95 0.66848 1.82089 1.58151 2 6.44 6.64 0.16753 -0.19985 1.19223 3 3.68 4.43 -1.03317 -1.44074 -0.47196 4 5.32 5.28 0.63828 0.22675 -0.50040 5 5.40 5.95 0.18212 0.09192 -0.20819 6 6.86 7.36 0.74098 0.36705 1.34820 SAS システム 12 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 7 6.57 5.70 5.89 5.16 5.30 6.07 5.56 4.50 8 7.32 6.95 6.02 4.98 4.88 6.82 6.40 5.53 9 6.51 6.15 5.51 4.68 4.16 5.17 4.81 4.70 10 6.86 6.05 5.85 6.14 6.75 6.71 5.39 5.42 11 7.04 6.03 6.53 6.02 6.68 6.78 5.91 6.26 12 6.59 6.30 6.29 5.94 6.10 5.93 5.52 5.35 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 7 4.92 5.33 0.32212 -0.32353 -0.54867 8 5.61 5.33 1.29399 -0.70772 -0.34096 9 4.86 3.82 0.58563 -0.74996 -1.38927 10 6.03 6.59 0.02082 0.39858 0.55099 11 5.76 5.95 0.40333 0.58990 0.17654 12 5.45 5.85 0.19777 0.54869 -0.27747 SAS システム 13 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 13 5.93 4.76 5.09 5.51 5.79 5.49 4.97 4.69 14 7.00 6.31 6.82 6.26 5.26 6.69 6.27 5.94 15 6.63 5.47 5.54 4.88 4.70 5.89 4.64 4.43 16 6.56 6.57 5.74 4.76 4.39 6.56 6.29 5.61 17 5.80 5.44 4.75 4.69 4.65 5.23 4.83 4.66 18 6.39 6.14 6.21 5.48 5.40 6.32 6.19 6.44 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 13 5.30 5.61 -0.59891 -0.44433 0.31937 14 5.78 5.26 0.91545 0.42234 -0.53556 15 4.00 3.98 0.46237 -0.53286 -1.57500 16 5.22 4.72 1.11088 -1.07750 -0.45395 17 4.72 4.98 -0.13938 -1.22229 -0.20671 18 5.49 5.49 0.56235 -0.28372 0.15357 SAS システム 14 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 19 7.19 6.66 6.58 5.33 5.03 7.13 7.19 6.62 20 5.76 6.63 7.02 7.37 7.27 5.93 5.89 6.70 21 5.74 5.71 5.93 6.12 6.24 5.42 5.69 6.10 22 5.52 5.28 5.17 4.69 4.87 4.86 4.66 4.10 23 4.89 4.75 5.02 5.14 4.65 4.96 4.17 3.89 24 6.46 6.88 6.93 6.74 6.52 6.14 6.64 5.81 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 19 5.78 5.23 1.42714 -0.49423 -0.05168 20 6.82 6.97 -0.35623 1.77580 0.83460 21 6.25 6.45 -0.47556 0.23363 0.99794 22 4.62 4.10 -0.26665 -0.65259 -0.96309 23 4.61 4.01 -0.63574 -0.58237 -0.93949 24 6.14 6.59 0.33341 1.19569 0.15960 ≪略≫ SAS システム 25 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 85 6.96 5.61 4.34 4.28 4.15 6.46 5.70 5.31 86 5.71 5.58 5.46 5.10 5.57 5.46 5.94 5.19 87 5.30 5.88 5.35 5.24 5.68 5.17 5.91 5.06 88 7.09 6.39 5.60 6.18 5.81 7.12 6.69 5.96 89 6.93 6.73 5.60 5.63 6.13 7.13 6.66 6.42 90 7.46 6.19 5.42 4.70 3.68 7.33 6.73 5.58 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 85 4.77 4.19 0.89484 -2.11006 -0.27929 86 5.78 6.23 -0.28762 -0.71826 0.87305 87 5.56 6.10 -0.40623 -0.50420 0.66559 88 6.28 6.60 0.66657 -0.37147 0.91228 89 6.44 6.50 0.69692 -0.51150 1.12494 90 4.18 3.39 1.90587 -1.55808 -1.44320 SAS システム 26 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 91 6.38 5.28 5.07 3.96 4.25 6.28 5.21 4.65 92 7.41 6.97 5.91 4.96 4.86 7.19 6.72 5.98 93 7.77 6.47 5.71 5.26 4.91 7.72 7.03 6.42 94 7.96 7.13 6.36 6.18 5.71 7.92 7.59 6.87 95 7.62 6.48 5.75 4.69 4.65 7.82 7.17 6.31 96 8.44 7.52 6.82 6.88 6.05 8.48 8.33 7.25 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 91 4.49 4.64 0.50096 -1.77073 -0.41813 92 5.53 5.52 1.45131 -0.95522 -0.05731 93 5.52 5.46 1.57106 -1.13765 0.18885 94 6.77 6.43 1.56707 -0.24567 0.79587 95 5.53 5.58 1.64304 -1.55742 0.37033 96 6.83 6.55 1.98060 0.32279 0.62116 SAS システム 27 20:31 Wednesday, July 13, 2005 OBS X01 X02 X03 X04 X05 X06 X07 X08 97 7.81 7.31 6.93 7.42 6.60 8.10 7.56 7.79 98 8.29 7.45 7.00 6.76 6.69 8.14 7.09 6.83 99 7.20 6.42 6.23 5.92 5.91 6.98 6.44 6.04 100 7.62 7.33 6.91 6.90 6.47 7.33 6.69 7.23 OBS X09 X10 FACTOR1 FACTOR2 FACTOR3 97 7.82 7.67 1.18227 0.72902 1.67725 98 6.83 7.13 1.41828 0.79855 0.65451 99 6.14 6.02 0.78541 0.01100 0.33576 100 6.79 6.70 1.06526 0.90338 0.58077 SAS システム 28 20:31 Wednesday, July 13, 2005 プロット : FACTOR1*FACTOR2. 凡例: A = 1 OBS, B = 2 OBS, ... 2 + A | A | A AA A A | A A FACTOR1 | A AA |A A A A A | A B AA AB B C A A A A A | A A A B | A AA A A A 0 +-----------------A-A---------B-+AA-AA--A-AA-------------------- | A B AA AA| A A A A A | A AA A|A C AA | A A AA A AA B | A A A | A A | AA A -2 + A A A| A --+---------+---------+---------+---------+---------+---------+- -3 -2 -1 0 1 2 3 FACTOR2 SAS システム 29 20:31 Wednesday, July 13, 2005 プロット : FACTOR2*FACTOR3. 凡例: A = 1 OBS, B = 2 OBS, ... FACTOR2 | | 4 + | | | | A A | 2 + A | A A | A AA A | AAA A A A | A A A A A AAA |ABB BAB A B AA 0 +--------------------------A------B--D--AA+ACB-AAABAB-A--------- | A A AAA A C| BA BA C A A | A A CA A | A B AB A -2 + A A AA | --+---------+---------+---------+---------+---------+---------+- -4 -3 -2 -1 0 1 2 FACTOR3 SAS システム 30 20:31 Wednesday, July 13, 2005 プロット : FACTOR3*FACTOR1. 凡例: A = 1 OBS, B = 2 OBS, ... FACTOR3 | | 2.5 + | | A B |A BA A | A BABA A C ABBAA AAA AB A A A A 0.0 +-------------A-----BA-A-AAA---A--A-A-+-BAAC-AABAA-A--AC-AA----- | A AA A A A B B| B A ABBB A AA | A A |A AA A -2.5 + A A | A | A | | | -5.0 + | --+-----------+-----------+-----------+-----------+-----------+- -3 -2 -1 0 1 2 FACTOR1
/* Lesson 13-4 */ /* File Name = les1304.sas 07/14/05 */ data hobby; infile 'syumi.dat'; input code $ X1-X6; label X1='M(-29)' X2='M(30-49)' X3='M(50-)' X4='F(-29)' X5='F(30-49)' X6='F(50-)'; proc print data=hobby(obs=10); run; proc factor data=hobby nfactor=2 out=fscore; var X1-X6; run; proc plot data=fscore; : 回転前 plot factor1*factor2=code/vref=0.0 href=0.0; : コード化した記号 run; : proc factor data=hobby nfactor=2 rotate=varimax out=fscore2; var X1-X6; run; proc plot data=fscore2; : 回転後 plot factor1*factor2=code/vref=0.0 href=0.0; : コード化した記号 run; :
SAS システム 1 20:31 Wednesday, July 13, 2005 OBS CODE X1 X2 X3 X4 X5 X6 1 A 4.00 4.25 3.83 4.50 4.67 4.00 2 B 4.17 3.89 4.00 4.50 4.17 3.75 3 C 3.83 3.44 2.83 3.57 3.17 1.50 4 D 2.83 4.22 3.83 3.71 3.00 2.25 5 E 4.17 4.11 3.83 3.57 4.00 3.75 6 F 2.33 3.56 3.33 2.93 2.83 2.75 7 G 1.83 2.44 2.33 3.71 3.83 3.75 8 H 2.50 1.89 2.00 4.21 3.17 3.75 9 I 2.00 1.44 2.00 4.07 3.33 3.50 10 J 4.00 3.33 3.33 3.00 3.17 2.25 SAS システム 2 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Prior Communality Estimates: ONE Eigenvalues of the Correlation Matrix: Total = 6 Average = 1 1 2 3 Eigenvalue 2.7435 1.7477 0.7451 Difference 0.9958 1.0027 0.3571 Proportion 0.4573 0.2913 0.1242 Cumulative 0.4573 0.7485 0.8727 4 5 6 Eigenvalue 0.3879 0.2263 0.1495 Difference 0.1616 0.0768 Proportion 0.0647 0.0377 0.0249 Cumulative 0.9374 0.9751 1.0000 SAS システム 3 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components 2 factors will be retained by the NFACTOR criterion. Factor Pattern FACTOR1 FACTOR2 X1 0.52708 0.63297 M(-29) X2 0.59628 0.64623 M(30-49) X3 0.64192 0.47370 M(50-) X4 0.82757 -0.35514 F(-29) X5 0.79607 -0.43033 F(30-49) X6 0.61604 -0.62750 F(50-) SAS システム 4 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Variance explained by each factor FACTOR1 FACTOR2 2.743514 1.747721 Final Communality Estimates: Total = 4.491236 X1 X2 X3 X4 X5 X6 0.678467 0.773166 0.636447 0.810993 0.818906 0.773257 SAS システム 5 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Scoring Coefficients Estimated by Regression Squared Multiple Correlations of the Variables with each Factor FACTOR1 FACTOR2 1.000000 1.000000 SAS システム 6 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Standardized Scoring Coefficients FACTOR1 FACTOR2 X1 0.19212 0.36217 M(-29) X2 0.21734 0.36976 M(30-49) X3 0.23398 0.27104 M(50-) X4 0.30164 -0.20320 F(-29) X5 0.29016 -0.24622 F(30-49) X6 0.22454 -0.35904 F(50-) SAS システム 7 20:31 Wednesday, July 13, 2005 プロット : FACTOR1*FACTOR2. 使用するプロット文字: CODE の値. (NOTE: 1 オブザベーションを表示していません.) 2 + A B | | Z E FACTOR1 | R | | | | 3 Q M | DL O 0 +--------------HG------------S-----2--+--F-------C-------------- | I K P | V N | | U W | 1|Y | T X -2 + 4 | --+-----------+-----------+-----------+-----------+-----------+- -3 -2 -1 0 1 2 FACTOR2 SAS システム 8 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Prior Communality Estimates: ONE Eigenvalues of the Correlation Matrix: Total = 6 Average = 1 1 2 3 Eigenvalue 2.7435 1.7477 0.7451 Difference 0.9958 1.0027 0.3571 Proportion 0.4573 0.2913 0.1242 Cumulative 0.4573 0.7485 0.8727 4 5 6 Eigenvalue 0.3879 0.2263 0.1495 Difference 0.1616 0.0768 Proportion 0.0647 0.0377 0.0249 Cumulative 0.9374 0.9751 1.0000 SAS システム 9 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components 2 factors will be retained by the NFACTOR criterion. Factor Pattern FACTOR1 FACTOR2 X1 0.52708 0.63297 M(-29) X2 0.59628 0.64623 M(30-49) X3 0.64192 0.47370 M(50-) X4 0.82757 -0.35514 F(-29) X5 0.79607 -0.43033 F(30-49) X6 0.61604 -0.62750 F(50-) SAS システム 10 20:31 Wednesday, July 13, 2005 Initial Factor Method: Principal Components Variance explained by each factor FACTOR1 FACTOR2 2.743514 1.747721 Final Communality Estimates: Total = 4.491236 X1 X2 X3 X4 X5 X6 0.678467 0.773166 0.636447 0.810993 0.818906 0.773257 SAS システム 11 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Orthogonal Transformation Matrix 1 2 1 0.77751 0.62886 2 -0.62886 0.77751 SAS システム 12 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Rotated Factor Pattern FACTOR1 FACTOR2 X1 0.01176 0.82361 M(-29) X2 0.05723 0.87743 M(30-49) X3 0.20121 0.77199 M(50-) X4 0.86678 0.24430 F(-29) X5 0.88957 0.16603 F(30-49) X6 0.87359 -0.10049 F(50-) Variance explained by each factor FACTOR1 FACTOR2 2.349707 2.141529 SAS システム 13 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Final Communality Estimates: Total = 4.491236 X1 X2 X3 X4 X5 X6 0.678467 0.773166 0.636447 0.810993 0.818906 0.773257 Scoring Coefficients Estimated by Regression Squared Multiple Correlations of the Variables with each Factor FACTOR1 FACTOR2 1.000000 1.000000 SAS システム 14 20:31 Wednesday, July 13, 2005 Rotation Method: Varimax Standardized Scoring Coefficients FACTOR1 FACTOR2 X1 -0.07838 0.40241 M(-29) X2 -0.06354 0.42417 M(30-49) X3 0.01147 0.35788 M(50-) X4 0.36232 0.03170 F(-29) X5 0.38045 -0.00897 F(30-49) X6 0.40037 -0.13795 F(50-) SAS システム 15 20:31 Wednesday, July 13, 2005 プロット : FACTOR1*FACTOR2. 使用するプロット文字: CODE の値. 2 + | | | A FACTOR1 | I H G 3 | R ZB | Q | E | K S |M 0 +---------------------P-2--+------------D------------- | |F CJ L O | Y | V N | 4 1 T | U | X | W -2 + | ---+-----------+-----------+-----------+-----------+-- -2 -1 0 1 2 FACTOR2