/* Lesson 12-04 */
/* File Name = les1204.sas 01/11/22 */
options nocenter linesize=78 pagesize=30;
options locale='en_US';
/* options locale='ja_JP'; */
proc printto print = 'StatM21/les1204-Results.txt' new;
data gakusei;
infile 'StatM21/StudAll21d.csv'
firstobs=9 dlm=',' dsd missover
encoding=sjis termstr=crlf;
input sex $ shintyou taijyuu kyoui
jitaku : $10. kodukai carryer $ tsuuwa;
if sex=" " or shintyou="." or taijyuu="." then delete;
proc print data=gakusei(obs=5);
run;
proc sort data=gakusei;
by sex;
run;
proc univariate data=gakusei plot; : 分布が正規分布とみなせるか
var shintyou taijyuu kyoui kodukai; : 各変量ごとに
by sex; : 性別ごとに計算
run;
proc ttest data=gakusei; : 平均値の差の検定
class sex; : 性別の違いによる比較
var shintyou taijyuu kyoui kodukai; : 各変量ごとに
run;
Sunday, January 9, 2022 06:54:33 PM 424
The TTEST Procedure
Variable: shintyou
sex Method N Mean Std Dev Std Err
F 94 158.6 5.5907 0.5766
M 323 171.9 5.3847 0.2996
Diff (1-2) Pooled -13.3360 5.4316 0.6365
Diff (1-2) Satterthwaite -13.3360 0.6498
sex Method Minimum Maximum
F 145.0 170.0
M 156.0 186.5
Diff (1-2) Pooled
Diff (1-2) Satterthwaite
sex Method Mean 95% CL Mean Std Dev
F 158.6 157.5 159.8 5.5907
M 171.9 171.4 172.5 5.3847
Diff (1-2) Pooled -13.3360 -14.5873 -12.0848 5.4316
Diff (1-2) Satterthwaite -13.3360 -14.6202 -12.0518
sex Method 95% CL Std Dev
F 4.8898 6.5280
M 4.9990 5.8354
Diff (1-2) Pooled 5.0859 5.8281
Diff (1-2) Satterthwaite
Method Variances DF t Value Pr > |t|
Pooled Equal 415 -20.95 <.0001
Satterthwaite Unequal 146.9 -20.52 <.0001
Equality of Variances
Method Num DF Den DF F Value Pr > F
Folded F 93 322 1.08 0.6283
Sunday, January 9, 2022 06:54:33 PM 426
The TTEST Procedure
Variable: taijyuu
sex Method N Mean Std Dev Std Err
F 94 49.2872 5.7855 0.5967
M 323 62.0966 8.0332 0.4470
Diff (1-2) Pooled -12.8094 7.5876 0.8892
Diff (1-2) Satterthwaite -12.8094 0.7456
sex Method Minimum Maximum
F 35.0000 78.0000
M 42.0000 100.0
Diff (1-2) Pooled
Diff (1-2) Satterthwaite
sex Method Mean 95% CL Mean Std Dev
F 49.2872 48.1022 50.4722 5.7855
M 62.0966 61.2172 62.9760 8.0332
Diff (1-2) Pooled -12.8094 -14.5573 -11.0614 7.5876
Diff (1-2) Satterthwaite -12.8094 -14.2792 -11.3395
sex Method 95% CL Std Dev
F 5.0602 6.7555
M 7.4578 8.7055
Diff (1-2) Pooled 7.1047 8.1415
Diff (1-2) Satterthwaite
Method Variances DF t Value Pr > |t|
Pooled Equal 415 -14.41 <.0001
Satterthwaite Unequal 207.75 -17.18 <.0001
Equality of Variances
Method Num DF Den DF F Value Pr > F
Folded F 322 93 1.93 0.0002
Sunday, January 9, 2022 06:54:34 PM 428
The TTEST Procedure
Variable: kyoui
sex Method N Mean Std Dev Std Err
F 49 83.1837 5.6630 0.8090
M 107 88.2897 8.7906 0.8498
Diff (1-2) Pooled -5.1060 7.9489 1.3711
Diff (1-2) Satterthwaite -5.1060 1.1733
sex Method Minimum Maximum
F 70.0000 108.0
M 46.0000 112.0
Diff (1-2) Pooled
Diff (1-2) Satterthwaite
sex Method Mean 95% CL Mean Std Dev
F 83.1837 81.5571 84.8103 5.6630
M 88.2897 86.6049 89.9746 8.7906
Diff (1-2) Pooled -5.1060 -7.8147 -2.3974 7.9489
Diff (1-2) Satterthwaite -5.1060 -7.4262 -2.7859
sex Method 95% CL Std Dev
F 4.7225 7.0748
M 7.7499 10.1569
Diff (1-2) Pooled 7.1516 8.9478
Diff (1-2) Satterthwaite
Method Variances DF t Value Pr > |t|
Pooled Equal 154 -3.72 0.0003
Satterthwaite Unequal 136.9 -4.35 <.0001
Equality of Variances
Method Num DF Den DF F Value Pr > F
Folded F 106 48 2.41 0.0009
Sunday, January 9, 2022 06:54:34 PM 430
The TTEST Procedure
Variable: kodukai
sex Method N Mean Std Dev Std Err
F 85 48476.5 48816.5 5294.9
M 295 41494.9 50309.4 2929.1
Diff (1-2) Pooled 6981.6 49981.5 6152.9
Diff (1-2) Satterthwaite 6981.6 6051.1
sex Method Minimum Maximum
F 0 300000
M 0 350000
Diff (1-2) Pooled
Diff (1-2) Satterthwaite
sex Method Mean 95% CL Mean Std Dev
F 48476.5 37947.0 59005.9 48816.5
M 41494.9 35730.2 47259.6 50309.4
Diff (1-2) Pooled 6981.6 -5116.7 19079.8 49981.5
Diff (1-2) Satterthwaite 6981.6 -4982.1 18945.2
sex Method 95% CL Std Dev
F 42420.0 57502.3
M 46550.9 54733.2
Diff (1-2) Pooled 46658.5 53818.0
Diff (1-2) Satterthwaite
Method Variances DF t Value Pr > |t|
Pooled Equal 378 1.13 0.2572
Satterthwaite Unequal 139.55 1.15 0.2506
Equality of Variances
Method Num DF Den DF F Value Pr > F
Folded F 294 84 1.06 0.7570
/* Lesson 12-05 */
/* File Name = les1205.sas 01/11/22 */
options nocenter linesize=78 pagesize=30;
options locale='en_US';
/* options locale='ja_JP'; */
proc printto print = 'StatM21/les1205-Results.txt' new;
data gakusei;
infile 'StatM21/StudAll21d.csv'
firstobs=9 dlm=',' dsd missover
encoding=sjis termstr=crlf;
input sex $ shintyou taijyuu kyoui
jitaku : $10. kodukai carryer $ tsuuwa;
if sex=" " or shintyou="." or taijyuu="." then delete;
proc print data=gakusei(obs=5);
run;
proc npar1way data=gakusei wilcoxon; : Wilcoxon 検定
class sex; : 分類したい特性変数の指定
var shintyou taijyuu kyoui kodukai; : 比較したい変量名
run;
Sunday, January 9, 2022 06:54:43 PM 433
The NPAR1WAY Procedure
Wilcoxon Scores (Rank Sums) for Variable shintyou
Classified by Variable sex
Sum of Expected Std Dev Mean
sex N Scores Under H0 Under H0 Score
F 94 5574.0 19646.0 1027.55974 59.297872
M 323 81579.0 67507.0 1027.55974 252.566563
Average scores were used for ties.
Wilcoxon Two-Sample Test
t Approximation
Statistic Z Pr < Z Pr > |Z| Pr < Z Pr > |Z|
5574.000 -13.6941 <.0001 <.0001 <.0001 <.0001
Z includes a continuity correction of 0.5.
Sunday, January 9, 2022 06:54:43 PM 434
The NPAR1WAY Procedure
Kruskal-Wallis Test
Chi-Square DF Pr > ChiSq
187.5415 1 <.0001
Sunday, January 9, 2022 06:54:43 PM 435
The NPAR1WAY Procedure
Wilcoxon Scores (Rank Sums) for Variable taijyuu
Classified by Variable sex
Sum of Expected Std Dev Mean
sex N Scores Under H0 Under H0 Score
F 94 6569.0 19646.0 1027.50549 69.882979
M 323 80584.0 67507.0 1027.50549 249.486068
Average scores were used for ties.
Wilcoxon Two-Sample Test
t Approximation
Statistic Z Pr < Z Pr > |Z| Pr < Z Pr > |Z|
6569.000 -12.7265 <.0001 <.0001 <.0001 <.0001
Z includes a continuity correction of 0.5.
Sunday, January 9, 2022 06:54:43 PM 436
The NPAR1WAY Procedure
Kruskal-Wallis Test
Chi-Square DF Pr > ChiSq
161.9750 1 <.0001
Sunday, January 9, 2022 06:54:43 PM 437
The NPAR1WAY Procedure
Wilcoxon Scores (Rank Sums) for Variable kyoui
Classified by Variable sex
Sum of Expected Std Dev Mean
sex N Scores Under H0 Under H0 Score
F 49 2464.50 3846.50 260.957108 50.295918
M 107 9781.50 8399.50 260.957108 91.415888
Average scores were used for ties.
Wilcoxon Two-Sample Test
t Approximation
Statistic Z Pr < Z Pr > |Z| Pr < Z Pr > |Z|
2464.500 -5.2940 <.0001 <.0001 <.0001 <.0001
Z includes a continuity correction of 0.5.
Sunday, January 9, 2022 06:54:43 PM 438
The NPAR1WAY Procedure
Kruskal-Wallis Test
Chi-Square DF Pr > ChiSq
28.0464 1 <.0001
Sunday, January 9, 2022 06:54:43 PM 439
The NPAR1WAY Procedure
Wilcoxon Scores (Rank Sums) for Variable kodukai
Classified by Variable sex
Sum of Expected Std Dev Mean
sex N Scores Under H0 Under H0 Score
F 85 18189.0 16192.50 882.905715 213.988235
M 295 54201.0 56197.50 882.905715 183.732203
Average scores were used for ties.
Wilcoxon Two-Sample Test
t Approximation
Statistic Z Pr > Z Pr > |Z| Pr > Z Pr > |Z|
18189.00 2.2607 0.0119 0.0238 0.0122 0.0243
Z includes a continuity correction of 0.5.
Sunday, January 9, 2022 06:54:43 PM 440
The NPAR1WAY Procedure
Kruskal-Wallis Test
Chi-Square DF Pr > ChiSq
5.1134 1 0.0237
/* Lesson 13-01 */
/* File Name = les1301.sas 01/18/22 */
options nocenter linesize=78 pagesize=30;
options locale='en_US';
/* options locale='ja_JP'; */
proc printto print = 'StatM21/les1301-Results.txt' new;
data pair;
input x y @@; : 改行せずに続けて読むことの指定
dif=x-y; : 前後の差を計算
cards;
3.51 3.39 3.07 3.39 3.29 3.20 3.03 3.11 : 2つ1組みでデータを列挙
3.38 3.17 3.30 3.09 3.15 3.17 3.25 3.09 :
;
proc print data=pair;
run;
proc univariate data=pair plot; : 基礎統計量の算出。
var dif; : 指定した変量について
run;
Monday, January 17, 2022 01:54:43 PM 6
Obs x y dif
1 3.51 3.39 0.12
2 3.07 3.39 -0.32
3 3.29 3.20 0.09
4 3.03 3.11 -0.08
5 3.38 3.17 0.21
6 3.30 3.09 0.21
7 3.15 3.17 -0.02
8 3.25 3.09 0.16
Monday, January 17, 2022 01:54:43 PM 7
The UNIVARIATE Procedure
Variable: dif
Moments
N 8 Sum Weights 8
Mean 0.04625 Sum Observations 0.37
Std Deviation 0.18062886 Variance 0.03262679
Skewness -1.3152288 Kurtosis 1.51109886
Uncorrected SS 0.2455 Corrected SS 0.2283875
Coeff Variation 390.54889 Std Error Mean 0.06386195
Basic Statistical Measures
Location Variability
Mean 0.046250 Std Deviation 0.18063
Median 0.105000 Variance 0.03263
Mode 0.210000 Range 0.53000
Interquartile Range 0.23500
Monday, January 17, 2022 01:54:43 PM 8
The UNIVARIATE Procedure
Variable: dif
Tests for Location: Mu0=0
Test -Statistic- -----p Value------
Student's t t 0.724218 Pr > |t| 0.4924
Sign M 1 Pr >= |M| 0.7266
Signed Rank S 7 Pr >= |S| 0.3594
Quantiles (Definition 5)
Level Quantile
100% Max 0.210
99% 0.210
95% 0.210
90% 0.210
75% Q3 0.185
50% Median 0.105
25% Q1 -0.050
10% -0.320
5% -0.320
1% -0.320
0% Min -0.320
Monday, January 17, 2022 01:54:43 PM 9
The UNIVARIATE Procedure
Variable: dif
Extreme Observations
----Lowest---- ----Highest---
Value Obs Value Obs
-0.32 2 0.09 3
-0.08 4 0.12 1
-0.02 7 0.16 8
0.09 3 0.21 5
0.12 1 0.21 6
cards;
5.1 4.7 6.2 6.1 6.8 7.2 7.4 7.3 3.9 3.6
3.5 3.7 5.3 4.8 4.5 4.4 5.9 5.5 4.8 4.6
data example2021;
infile 'StatM21/foo1.csv'
firstobs=2
dlm=',' dsd
missover truncover
encoding=sjis termstr=crlf
;
input No $ Univ : $30. SName : $40. Faculty : $50. Dept : $50.
Center1 : $8. Center2 : $8. Sel1 : $8. Sel2 : $8.
Book1 : $10. Book2 : $10.
Vol0 VolS VolT
ZenKou $ ScoreS ScoreT KoKouSi
;
data example2021;
infile 'StatM21/foo2.txt'
firstobs=2
dlm='09'x
missover truncover
encoding=sjis termstr=crlf
;
data math;
infile 'StatM21/foo3.csv'
firstobs=2
dlm=',' dsd
lrecl=230
;
data math;
infile 'StatM21/foo4.csv'
firstobs=2
dlm=',' dsd
lrecl=230 truncover
;
input
UketsukeID 1- 6
JyukenID 7- 11
BirthDay 13- 20
Area $ 32- 41
s_scor01 103-104
s_scor02 105-106
s_scor03 107-108
;
/* Lesson 13-02 */
/* File Name = les1302.sas 01/18/22 */
options nocenter linesize=78 pagesize=30;
options locale='en_US';
/* options locale='ja_JP'; */
proc printto print = 'StatM21/les1302-Results.txt' new;
data gakusei;
infile 'StatM21/StudAll21d.csv'
firstobs=9 dlm=',' dsd missover
encoding=sjis termstr=crlf;
input sex $ shintyou taijyuu kyoui
jitaku : $10. kodukai carryer $ tsuuwa;
/* if shintyou="." or taijyuu="." or kyoui="." then delete; */
if carryer="DoCoMo" then carryer="docomo"; : 名称の不揃いを統一する
if carryer="DoCoMo+w" then carryer="docomo+W";
if carryer="vodafone" then carryer="Vodafone";
if carryer="au+willc" then carryer="au+Willc";
proc print data=gakusei(obs=5);
run;
title '*** 通常の頻度集計、クロス集計(アルファベット順になる) ***';
proc freq data=gakusei; : オプションなし=アルファベット順
tables sex jitaku carryer;
run;
proc freq data=gakusei; : オプションなし=アルファベット順
tables sex*jitaku;
tables sex*carryer;
tables jitaku*carryer;
run;
title '*** 頻度の大きい順に表示 ***';
proc freq data=gakusei order=freq; : 頻度順に
tables sex jitaku carryer;
run;
proc freq data=gakusei order=freq; : 頻度順に
tables sex*jitaku;
tables sex*carryer;
tables jitaku*carryer;
run;
title '*** 頻度の大きい順に表示(頻度のみ) ***';
proc freq data=gakusei order=freq; : 頻度順に
tables sex jitaku carryer / nopercent norow nocol; : 頻度のみ
run;
proc freq data=gakusei order=freq; : 頻度順に
tables sex*jitaku / nopercent norow nocol; : 頻度のみ
tables sex*carryer / nopercent norow nocol; : 頻度のみ
tables jitaku*carryer / nopercent norow nocol; : 頻度のみ
run;
*** 通常の頻度集計、クロス集計(アルファベット順にな 12
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Cumulative Cumulative
sex Frequency Percent Frequency Percent
--------------------------------------------------------
F 141 29.81 141 29.81
M 332 70.19 473 100.00
Frequency Missing = 125
Cumulative Cumulative
jitaku Frequency Percent Frequency Percent
--------------------------------------------------------------
下宿生 185 34.84 185 34.84
自宅生 346 65.16 531 100.00
Frequency Missing = 67
*** 通常の頻度集計、クロス集計(アルファベット順にな 13
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Cumulative Cumulative
carryer Frequency Percent Frequency Percent
-------------------------------------------------------------
DDIp 2 1.34 2 1.34
J-PHONE 10 6.71 12 8.05
KDDI 1 0.67 13 8.72
No 5 3.36 18 12.08
OCN 1 0.67 19 12.75
UQ-mobil 1 0.67 20 13.42
Vodafone 21 14.09 41 27.52
Willcom 1 0.67 42 28.19
au 39 26.17 81 54.36
au+Willc 1 0.67 82 55.03
docomo 65 43.62 147 98.66
docomo+w 1 0.67 148 99.33
softbank 1 0.67 149 100.00
Frequency Missing = 449
*** 通常の頻度集計、クロス集計(アルファベット順にな 14
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by jitaku
sex jitaku
Frequency|
Percent |
Row Pct |
Col Pct |下宿 |自宅 | Total
|生 |生 |
---------+--------+--------+
F | 39 | 83 | 122
| 9.35 | 19.90 | 29.26
| 31.97 | 68.03 |
| 26.17 | 30.97 |
---------+--------+--------+
M | 110 | 185 | 295
| 26.38 | 44.36 | 70.74
| 37.29 | 62.71 |
| 73.83 | 69.03 |
---------+--------+--------+
Total 149 268 417
35.73 64.27 100.00
Frequency Missing = 181
*** 通常の頻度集計、クロス集計(アルファベット順にな 15
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by carryer
sex carryer
Frequency|
Percent |
Row Pct |
Col Pct |DDIp |J-PHONE |KDDI |No |OCN | Total
---------+--------+--------+--------+--------+--------+
F | 1 | 4 | 0 | 1 | 0 | 56
| 0.68 | 2.74 | 0.00 | 0.68 | 0.00 | 38.36
| 1.79 | 7.14 | 0.00 | 1.79 | 0.00 |
| 50.00 | 44.44 | 0.00 | 20.00 | . |
---------+--------+--------+--------+--------+--------+
M | 1 | 5 | 1 | 4 | 0 | 90
| 0.68 | 3.42 | 0.68 | 2.74 | 0.00 | 61.64
| 1.11 | 5.56 | 1.11 | 4.44 | 0.00 |
| 50.00 | 55.56 | 100.00 | 80.00 | . |
---------+--------+--------+--------+--------+--------+
Total 2 9 1 5 0 146
1.37 6.16 0.68 3.42 0.00 100.00
(Continued)
*** 通常の頻度集計、クロス集計(アルファベット順にな 16
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by carryer
sex carryer
Frequency|
Percent |
Row Pct |
Col Pct |UQ-mobil|Vodafone|Willcom |au |au+Willc| Total
---------+--------+--------+--------+--------+--------+
F | 0 | 9 | 1 | 12 | 1 | 56
| 0.00 | 6.16 | 0.68 | 8.22 | 0.68 | 38.36
| 0.00 | 16.07 | 1.79 | 21.43 | 1.79 |
| . | 42.86 | 100.00 | 30.77 | 100.00 |
---------+--------+--------+--------+--------+--------+
M | 0 | 12 | 0 | 27 | 0 | 90
| 0.00 | 8.22 | 0.00 | 18.49 | 0.00 | 61.64
| 0.00 | 13.33 | 0.00 | 30.00 | 0.00 |
| . | 57.14 | 0.00 | 69.23 | 0.00 |
---------+--------+--------+--------+--------+--------+
Total 0 21 1 39 1 146
0.00 14.38 0.68 26.71 0.68 100.00
(Continued)
*** 通常の頻度集計、クロス集計(アルファベット順にな 17
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by carryer
sex carryer
Frequency|
Percent |
Row Pct |
Col Pct |docomo |docomo+w|softbank| Total
---------+--------+--------+--------+
F | 26 | 0 | 1 | 56
| 17.81 | 0.00 | 0.68 | 38.36
| 46.43 | 0.00 | 1.79 |
| 40.00 | 0.00 | 100.00 |
---------+--------+--------+--------+
M | 39 | 1 | 0 | 90
| 26.71 | 0.68 | 0.00 | 61.64
| 43.33 | 1.11 | 0.00 |
| 60.00 | 100.00 | 0.00 |
---------+--------+--------+--------+
Total 65 1 1 146
44.52 0.68 0.68 100.00
Frequency Missing = 452
≪中略≫
*** 頻度の大きい順に表示 *** 21
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Cumulative Cumulative
sex Frequency Percent Frequency Percent
--------------------------------------------------------
M 332 70.19 332 70.19
F 141 29.81 473 100.00
Frequency Missing = 125
Cumulative Cumulative
jitaku Frequency Percent Frequency Percent
--------------------------------------------------------------
自宅生 346 65.16 346 65.16
下宿生 185 34.84 531 100.00
Frequency Missing = 67
*** 頻度の大きい順に表示 *** 22
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Cumulative Cumulative
carryer Frequency Percent Frequency Percent
-------------------------------------------------------------
docomo 65 43.62 65 43.62
au 39 26.17 104 69.80
Vodafone 21 14.09 125 83.89
J-PHONE 10 6.71 135 90.60
No 5 3.36 140 93.96
DDIp 2 1.34 142 95.30
KDDI 1 0.67 143 95.97
OCN 1 0.67 144 96.64
UQ-mobil 1 0.67 145 97.32
Willcom 1 0.67 146 97.99
au+Willc 1 0.67 147 98.66
docomo+w 1 0.67 148 99.33
softbank 1 0.67 149 100.00
Frequency Missing = 449
*** 頻度の大きい順に表示 *** 23
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by jitaku
sex jitaku
Frequency|
Percent |
Row Pct |
Col Pct |自宅 |下宿 | Total
|生 |生 |
---------+--------+--------+
M | 185 | 110 | 295
| 44.36 | 26.38 | 70.74
| 62.71 | 37.29 |
| 69.03 | 73.83 |
---------+--------+--------+
F | 83 | 39 | 122
| 19.90 | 9.35 | 29.26
| 68.03 | 31.97 |
| 30.97 | 26.17 |
---------+--------+--------+
Total 268 149 417
64.27 35.73 100.00
Frequency Missing = 181
*** 頻度の大きい順に表示 *** 24
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by carryer
sex carryer
Frequency|
Percent |
Row Pct |
Col Pct |docomo |au |Vodafone|J-PHONE |No | Total
---------+--------+--------+--------+--------+--------+
M | 39 | 27 | 12 | 5 | 4 | 90
| 26.71 | 18.49 | 8.22 | 3.42 | 2.74 | 61.64
| 43.33 | 30.00 | 13.33 | 5.56 | 4.44 |
| 60.00 | 69.23 | 57.14 | 55.56 | 80.00 |
---------+--------+--------+--------+--------+--------+
F | 26 | 12 | 9 | 4 | 1 | 56
| 17.81 | 8.22 | 6.16 | 2.74 | 0.68 | 38.36
| 46.43 | 21.43 | 16.07 | 7.14 | 1.79 |
| 40.00 | 30.77 | 42.86 | 44.44 | 20.00 |
---------+--------+--------+--------+--------+--------+
Total 65 39 21 9 5 146
44.52 26.71 14.38 6.16 3.42 100.00
(Continued)
≪中略≫
*** 頻度の大きい順に表示(頻度のみ) *** 30
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Cumulative
sex Frequency Frequency
------------------------------
M 332 332
F 141 473
Frequency Missing = 125
Cumulative
jitaku Frequency Frequency
------------------------------------
自宅生 346 346
下宿生 185 531
Frequency Missing = 67
*** 頻度の大きい順に表示(頻度のみ) *** 31
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Cumulative
carryer Frequency Frequency
-----------------------------------
docomo 65 65
au 39 104
Vodafone 21 125
J-PHONE 10 135
No 5 140
DDIp 2 142
KDDI 1 143
OCN 1 144
UQ-mobil 1 145
Willcom 1 146
au+Willc 1 147
docomo+w 1 148
softbank 1 149
Frequency Missing = 449
*** 頻度の大きい順に表示(頻度のみ) *** 32
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by jitaku
sex jitaku
Frequency|自宅 |下宿 | Total
|生 |生 |
---------+--------+--------+
M | 185 | 110 | 295
---------+--------+--------+
F | 83 | 39 | 122
---------+--------+--------+
Total 268 149 417
Frequency Missing = 181
*** 頻度の大きい順に表示(頻度のみ) *** 33
Monday, January 17, 2022 01:55:08 PM
The FREQ Procedure
Table of sex by carryer
sex carryer
Frequency|docomo |au |Vodafone|J-PHONE |No | Total
---------+--------+--------+--------+--------+--------+
M | 39 | 27 | 12 | 5 | 4 | 90
---------+--------+--------+--------+--------+--------+
F | 26 | 12 | 9 | 4 | 1 | 56
---------+--------+--------+--------+--------+--------+
Total 65 39 21 9 5 146
(Continued)
≪後略≫
≪前略≫
if carryer="DoCoMo" then carryer="docomo";
if carryer="DoCoMo+w" then carryer="docomo+W";
if carryer="vodafone" then carryer="Vodafone";
if carryer="au+willc" then carryer="au+Willc";
≪後略≫
≪前略≫
title '*** 頻度の大きい順に表示 ***';
proc freq data=gakusei order=freq;
tables sex jitaku carryer;
run;
proc freq data=gakusei order=freq;
tables sex*jitaku;
tables sex*carryer;
tables jitaku*carryer;
run;
≪後略≫
≪前略≫
title '*** 頻度の大きい順に表示(頻度のみ) ***';
proc freq data=gakusei order=freq;
tables sex jitaku carryer / nopercent norow nocol;
run;
proc freq data=gakusei order=freq;
tables sex*jitaku / nopercent norow nocol;
tables sex*carryer / nopercent norow nocol;
tables jitaku*carryer / nopercent norow nocol;
run;
≪後略≫
≪前略≫
title '*** 3重クロス集計 ***';
proc freq data=gakusei;
tables sex*jitaku*carryer;
run;
≪前略≫
proc corr data=gakusei; : 相関係数
var shintyou taijyuu kyoui : 行列形式で表現される
kodukai tsuuwa;
run;
title "Scatterplot Matrix";
proc sgscatter data=gakusei; : 散布図行列
matrix shintyou taijyuu kyoui : 変量を指定
kodukai tsuuwa;
run;
title "Scatterplot Matrix grouped sex";
proc sgscatter data=gakusei; : 散布図行列
matrix shintyou taijyuu kyoui : 変量を指定
kodukai tsuuwa
/ group=sex; : 区別する変量を指定
run;