/* Lesson 12-1 */
/* File Name = les1201.sas 07/08/04 */
data gakusei;
infile 'all04a.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 のプログラムではありません。
SAS システム 2 23:20 Thursday, July 1, 2004 プロット : SHINTYOU*TAIJYUU. 凡例: A = 1 OBS, B = 2 OBS, ... (NOTE: 42 オブザベーションが欠損値です.) SHINTYOU | 200 + | | B A 180 + A ADCDDDBEA B B A A | AAEDKHTMGGCEDCB BA | AEAGIFEDCBBEAA AA A A 160 + ADCEBHDDAABB | A EB DCDA A A | A AAA 140 + ---+-----------+-----------+-----------+-----------+-- 20 40 60 80 100 TAIJYUU SAS システム 3 23:20 Thursday, July 1, 2004 Principal Component Analysis 254 Observations 2 Variables Simple Statistics SHINTYOU TAIJYUU Mean 168.6755906 58.73031496 StD 8.0222834 9.22268568 SAS システム 4 23:20 Thursday, July 1, 2004 Principal Component Analysis Covariance Matrix SHINTYOU TAIJYUU SHINTYOU 64.35703028 52.38386543 TAIJYUU 52.38386543 85.05793113 Total Variance = 149.41496141 Eigenvalues of the Covariance Matrix Eigenvalue Difference Proportion Cumulative PRIN1 128.104 106.793 0.857371 0.85737 PRIN2 21.311 . 0.142629 1.00000 SAS システム 5 23:20 Thursday, July 1, 2004 Principal Component Analysis Eigenvectors PRIN1 PRIN2 SHINTYOU 0.634885 0.772606 TAIJYUU 0.772606 -.634885 SAS システム 6 23:20 Thursday, July 1, 2004 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 . -31.0477 -5.13053 2 F 148.0 42.0 . J 50000 . -26.0526 -5.35226 3 F 148.0 43.0 80 J 50000 DoCoMo 4000 -25.2800 -5.98714 4 F 148.9 . . J 60000 . . . 5 F 149.0 45.0 . G 60000 . -23.0999 -6.48431 6 F 150.0 46.0 86 40000 . -21.6924 -6.34659 7 F 151.0 50.0 . G 60000 J-PHONE . -17.9671 -8.11352 8 F 151.7 41.5 80 J 35000 . -24.0898 -2.17617 SAS システム 8 23:20 Thursday, July 1, 2004 プロット : PRIN2*PRIN1. 凡例: A = 1 OBS, B = 2 OBS, ... (NOTE: 42 オブザベーションが欠損値です.) PRIN2 | | 10 + A A BA | AA BB BABBAAACA B | A BC ACAGCCFFCGGFC CD A 0 +-------------BBA-AACBAI-BDBFEEDFCACCBAE--A-----A--------- | AA CABCB ABCA BB DDBADB A A | A AAAA AAA A A ABBAAC A BA AABA -10 + A A | AB A | | | | A -20 + | A A ---+------------+------------+------------+------------+-- -40 -20 0 20 40 PRIN1 SAS システム 9 23:20 Thursday, July 1, 2004 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 システム 43 23:20 Thursday, July 1, 2004 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 273 M 182.0 64.0 . G 0 . 12.5309 6.9489 274 M 165.0 78.0 . G 0 2098 12.5543 -15.0738 275 M 170.0 74.0 90 J 0 . 12.6383 -8.6713 276 M 178.0 68.0 . J 100000 DoCoMo 4000 13.0817 1.3189 277 M 175.0 74.0 . J 0 . 15.8127 -4.8082 278 M 180.0 70.0 94 G 70000 au 5000 15.8967 1.5944 279 M 180.0 70.0 . J 40000 au 4000 15.8967 1.5944 280 M 180.0 70.0 . . . 15.8967 1.5944 281 M 180.0 70.0 . J 40000 DoCoMo 6500 15.8967 1.5944 282 M 178.7 71.2 95 0 . 15.9985 -0.1719 283 M 173.5 76.5 . G 100000 . 16.7919 -7.5543 284 M 184.0 68.0 85 30000 . 16.8911 5.9545 285 M 182.0 70.0 90 G 100000 . 17.1665 3.1396 286 M 185.0 68.0 93 J 0 . 17.5259 6.7272 287 M 175.0 77.0 95 G 130000 . 18.1305 -6.7129 288 M 179.1 74.2 . 0 au 4000 18.5703 -1.7675 289 M 176.5 78.0 96 J 10000 . 19.8555 -6.1889 290 M 177.0 78.0 . J 40000 . 20.1729 -5.8026 291 M 181.5 74.5 . G 120000 au 3000 20.3258 -0.1037 292 M 178.0 78.0 110 G 50000 . 20.8078 -5.0299 293 M 169.3 88.5 94 J 0 . 23.3967 -18.4179 294 M 186.0 82.0 . J 0 . 28.9773 -1.3886 295 M 182.0 90.0 100 J 40000 . 32.6186 -9.5581 296 M 178.0 100.0 112 G 60000 . 37.8051 -18.9974
/* Lesson 12-2 */ /* File Name = les1202.sas 07/08/04 */ data gakusei; infile 'all04a.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:20 Thursday, July 1, 2004
Principal Component Analysis
93 Observations
3 Variables
Simple Statistics
SHINTYOU TAIJYUU KYOUI
Mean 167.7602151 59.19569892 86.72043011
StD 8.6631170 10.96744108 7.89794358
SAS システム 4
23:20 Thursday, July 1, 2004
Principal Component Analysis
Covariance Matrix
SHINTYOU TAIJYUU KYOUI
SHINTYOU 75.0495956 67.9609140 27.0767999
TAIJYUU 67.9609140 120.2847639 58.5074801
KYOUI 27.0767999 58.5074801 62.3775129
SAS システム 5
23:20 Thursday, July 1, 2004
Principal Component Analysis
Total Variance = 257.71187237
Eigenvalues of the Covariance Matrix
Eigenvalue Difference Proportion Cumulative
PRIN1 198.838 157.733 0.771550 0.77155
PRIN2 41.104 23.334 0.159497 0.93105
PRIN3 17.770 . 0.068953 1.00000
SAS システム 6
23:20 Thursday, July 1, 2004
Principal Component Analysis
Eigenvectors
PRIN1 PRIN2 PRIN3
SHINTYOU 0.505436 -.687310 0.521669
TAIJYUU 0.752185 0.054727 -.656675
KYOUI 0.422790 0.724299 0.544646
SAS システム 7
23:20 Thursday, July 1, 2004
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 148.0 42.0 . J 50000 . . . .
3 F 148.0 43.0 80 J 50000 DoCoMo 4000 -25.0110 7.8275 -3.33323
4 F 148.9 . . J 60000 . . . .
5 F 149.0 45.0 . G 60000 . . . .
6 F 150.0 46.0 86 40000 . -19.2069 10.9628 -0.99204
7 F 151.0 50.0 . G 60000 J-PHONE . . . .
8 F 151.7 41.5 80 J 35000 . -24.2692 5.2023 -0.41804
9 F 152.0 35.0 77 J 60000 DoCoMo 2000 -30.2751 2.4675 2.37292
10 F 152.0 43.0 . J 20000 au 3500 . . .
11 F 153.0 41.0 . J 125000 No . . . .
12 F 153.0 42.0 . G 0 Vodafone 1000 . . .
13 F 153.0 46.5 87 G 10000 . -16.8917 9.6525 0.78927
14 F 153.0 50.0 . G 70000 DoCoMo 10000 . . .
15 F 153.0 55.0 78 J 30000 . -14.3032 3.5990 -9.69428
SAS システム 9
23:20 Thursday, July 1, 2004
プロット : PRIN2*PRIN1. 凡例: A = 1 OBS, B = 2 OBS, ...
(NOTE: 203 オブザベーションが欠損値です.)
PRIN2 | |
20 + |
| A A | A A A A
| B A BCABA AA | A AB A A
0 +--------A---A---BABCCBAD--D-BF-ACBB-AAAA--------A----------------
| A A A BAAB BAC AA
| A |A A A
-20 + A |
| |
| |
-40 + |
---+-----------+-----------+-----------+-----------+-----------+--
-40 -20 0 20 40 60
PRIN1
SAS システム 10
23:20 Thursday, July 1, 2004
プロット : PRIN3*PRIN2. 凡例: A = 1 OBS, B = 2 OBS, ...
(NOTE: 203 オブザベーションが欠損値です.)
PRIN3 | |
10 + |
| A A AB A| A A A
| A A A AA AEAE|C AA ACC A
0 +--------------------------A-A--B--A--CDB-BB-CAAA--AA-------------
| AA AA CC C AAA A
| A B A | B A A
-10 + | A
| A | A
| |
-20 + |
---+-----------+-----------+-----------+-----------+-----------+--
-30 -20 -10 0 10 20
PRIN2
SAS システム 11
23:20 Thursday, July 1, 2004
プロット : PRIN3*PRIN1. 凡例: A = 1 OBS, B = 2 OBS, ...
(NOTE: 203 オブザベーションが欠損値です.)
PRIN3 | |
10 + |
| A AA A C A A
| A A AACAA C A CE BAAA CA
0 +-----------A--A-CBAACAAA--CA-DAAA--------------------------------
| AA AA A A A | AA ABBA AA
| A A AA A A A A
-10 + A |
| A | A
| |
-20 + |
---+-----------+-----------+-----------+-----------+-----------+--
-40 -20 0 20 40 60
PRIN1
/* Lesson 12-3 */
/* File Name = les1203.sas 07/08/04 */
data gakusei;
infile 'all04a.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:20 Thursday, July 1, 2004
Principal Component Analysis
93 Observations
3 Variables
Simple Statistics
SHINTYOU TAIJYUU KYOUI
Mean 167.7602151 59.19569892 86.72043011
StD 8.6631170 10.96744108 7.89794358
SAS システム 4
23:20 Thursday, July 1, 2004
Principal Component Analysis
Correlation Matrix
SHINTYOU TAIJYUU KYOUI
SHINTYOU 1.0000 0.7153 0.3957
TAIJYUU 0.7153 1.0000 0.6754
KYOUI 0.3957 0.6754 1.0000
SAS システム 5
23:20 Thursday, July 1, 2004
Principal Component Analysis
Eigenvalues of the Correlation Matrix
Eigenvalue Difference Proportion Cumulative
PRIN1 2.20118 1.59596 0.733725 0.73373
PRIN2 0.60522 0.41161 0.201739 0.93546
PRIN3 0.19361 . 0.064535 1.00000
SAS システム 6
23:20 Thursday, July 1, 2004
Principal Component Analysis
Eigenvectors
PRIN1 PRIN2 PRIN3
SHINTYOU 0.554911 -.676206 0.484582
TAIJYUU 0.633593 -.033949 -.772921
KYOUI 0.539105 0.735930 0.409601
/* Lesson 13-1 */ /* File Name = les1301.sas 07/15/04 */ 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 11:34 Sunday, July 11, 2004 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 5 6.47 6.24 6.02 5.42 5.88 6.00 5.60 4.60 5.40 5.95 SAS システム 2 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 Initial Factor Method: Principal Components 2 factors will be retained by the MINEIGEN criterion. SAS システム 4 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 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/15/04 */ 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 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 Initial Factor Method: Principal Components 3 factors will be retained by the NFACTOR criterion. SAS システム 4 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 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 11:34 Sunday, July 11, 2004 プロット : 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 11:34 Sunday, July 11, 2004 プロット : 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/15/04 */ 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 プロット : 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 11:35 Sunday, July 11, 2004 プロット : 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 11:35 Sunday, July 11, 2004 プロット : 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/15/04 */ 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 11:35 Sunday, July 11, 2004 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 SAS システム 2 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 プロット : 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 Rotation Method: Varimax Orthogonal Transformation Matrix 1 2 1 0.77751 0.62886 2 -0.62886 0.77751 SAS システム 12 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 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 11:35 Sunday, July 11, 2004 プロット : 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