/* Lesson 13-01 */ /* File Name = les1301.sas 02/01/18 */ options nocenter linesize=78 pagesize=30; proc printto print = 'Kougi19/les1301_Results.txt' new; data pair; input x y @@; : 改行せずに続けて読むことの指定 dif=y-x; : 前後の差を計算 cards; 5.1 4.7 6.2 6.1 6.8 7.2 7.4 7.3 3.9 3.6 : 2つ1組みでデータを列挙 3.5 3.7 5.3 4.8 4.5 4.4 5.9 5.5 4.8 4.6 : ; proc print data=pair; run; : Stem and Leaf を表示させるには ods listing; : 以下の plot オプション用に指定。 ods graphics off; : 以下の plot オプション用に指定。 proc univariate data=pair plot; : 基礎統計量の算出。plot オプションを指定。 var dif; : 指定した変量について run;
Monday, January 13, 2020 09:56:55 PM 11 Obs x y dif 1 5.1 4.7 -0.4 2 6.2 6.1 -0.1 3 6.8 7.2 0.4 4 7.4 7.3 -0.1 5 3.9 3.6 -0.3 6 3.5 3.7 0.2 7 5.3 4.8 -0.5 8 4.5 4.4 -0.1 9 5.9 5.5 -0.4 10 4.8 4.6 -0.2 Monday, January 13, 2020 09:56:55 PM 12 The UNIVARIATE Procedure Variable: dif Moments N 10 Sum Weights 10 Mean -0.15 Sum Observations -1.5 Std Deviation 0.27988093 Variance 0.07833333 Skewness 0.83622187 Kurtosis 0.2797646 Uncorrected SS 0.93 Corrected SS 0.705 Coeff Variation -186.58728 Std Error Mean 0.08850612 Basic Statistical Measures Location Variability Mean -0.15000 Std Deviation 0.27988 Median -0.15000 Variance 0.07833 Mode -0.10000 Range 0.90000 Interquartile Range 0.30000 Monday, January 13, 2020 09:56:55 PM 13 The UNIVARIATE Procedure Variable: dif Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t -1.6948 Pr > |t| 0.1244 Sign M -3 Pr >= |M| 0.1094 Signed Rank S -15.5 Pr >= |S| 0.1211 Quantiles (Definition 5) Level Quantile 100% Max 0.40 99% 0.40 95% 0.40 90% 0.30 75% Q3 -0.10 50% Median -0.15 25% Q1 -0.40 10% -0.45 5% -0.50 1% -0.50 0% Min -0.50 Monday, January 13, 2020 09:56:55 PM 14 The UNIVARIATE Procedure Variable: dif Extreme Observations ----Lowest---- ----Highest--- Value Obs Value Obs -0.5 7 -0.1 2 -0.4 9 -0.1 4 -0.4 1 -0.1 8 -0.3 5 0.2 6 -0.2 10 0.4 3 Stem Leaf # Boxplot 4 0 1 0 2 0 1 | 0 | -0 000 3 +--+--+ -2 00 2 | | -4 000 3 +-----+ ----+----+----+----+ Multiply Stem.Leaf by 10**-1 ≪後略≫
/* Lesson 13-02 */ /* File Name = les1302.sas 01/14/20 */ options nocenter linesize=78 pagesize=30; options locale='en_US'; /* options locale='ja_JP'; */ proc printto print = 'Kougi19/les1302-Results.txt' new; data gakusei; infile 'Kougi19/all19b.csv' firstobs=2 dlm=',' dsd missover encoding=sjis termstr=crlf; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if shintyou="." or taijyuu="." or kyoui="." then delete; proc print data=gakusei(obs=5); run; proc means data=gakusei; run; : 計算結果を outclustに、クラス数を 2に指定 proc fastclus data=gakusei out=outclust maxclusters=2; var shintyou taijyuu kyoui; : 変量を指定 run; proc plot data=outclust; plot shintyou*taijyuu=cluster; : プロット場所にクラスター番号を表示 plot taijyuu*kyoui=cluster; plot kyoui*shintyou=cluster; run; proc print data=outclust(obs=20); : 計算結果の出力(形式1) run; /* Output to text file */ : 計算結果をテキストファイルに書き出す(形式2) data _null_; : ファイルに書き出す set outclust; : 書き出すデータセットを指定 file 'Kougi19/les1302-OutValue.txt'; : ファイル名を指定 put shintyou taijyuu kyoui cluster distance; : 書き出す変量を指定 run; /* Output to CSV file */ : 計算結果をCSVファイルに書き出す(形式3) proc export data=outclust : 書き出すデータセットを指定 outfile= "Kougi19/les1302-OutCSV.csv" : ファイル名を指定 dbms=CSV replace; run;
Tuesday, January 14, 2020 10:45:11 AM 88 The MEANS Procedure Variable N Mean Std Dev Minimum Maximum -------------------------------------------------------------------------- shintyou 122 167.7467213 8.6343843 146.7000000 185.0000000 taijyuu 122 59.0606557 10.6815478 35.0000000 100.0000000 kyoui 122 86.0606557 8.1876298 46.0000000 112.0000000 kodukai 118 55233.05 62255.25 0 350000.00 tsuuwa 45 7177.56 4753.40 350.0000000 25000.00 -------------------------------------------------------------------------- Tuesday, January 14, 2020 10:45:11 AM 89 The FASTCLUS Procedure Replace=FULL Radius=0 Maxclusters=2 Maxiter=1 Initial Seeds Cluster shintyou taijyuu kyoui ------------------------------------------------------------- 1 178.0000000 100.0000000 112.0000000 2 168.0000000 54.0000000 56.0000000 Criterion Based on Final Seeds = 7.3708 Cluster Summary Maximum Distance RMS Std from Seed Radius Nearest Cluster Frequency Deviation to Observation Exceeded Cluster ----------------------------------------------------------------------------- 1 37 6.5659 31.2304 2 2 85 7.4779 47.6495 1 Tuesday, January 14, 2020 10:45:11 AM 90 The FASTCLUS Procedure Replace=FULL Radius=0 Maxclusters=2 Maxiter=1 Cluster Summary Distance Between Cluster Cluster Centroids ----------------------------- 1 21.7461 2 21.7461 Statistics for Variables Variable Total STD Within STD R-Square RSQ/(1-RSQ) ------------------------------------------------------------------ shintyou 8.63438 7.34011 0.283299 0.395283 taijyuu 10.68155 7.63404 0.493434 0.974076 kyoui 8.18763 6.63872 0.348000 0.533741 OVER-ALL 9.23193 7.21638 0.394032 0.650252 Pseudo F Statistic = 78.03 Tuesday, January 14, 2020 10:45:11 AM 91 The FASTCLUS Procedure Replace=FULL Radius=0 Maxclusters=2 Maxiter=1 Approximate Expected Over-All R-Squared = 0.34407 Cubic Clustering Criterion = 2.219 WARNING: The two values above are invalid for correlated variables. Cluster Means Cluster shintyou taijyuu kyoui ------------------------------------------------------------- 1 174.6837838 70.3864865 93.3513514 2 164.7270588 54.1305882 82.8870588 Cluster Standard Deviations Cluster shintyou taijyuu kyoui ------------------------------------------------------------- 1 5.201950143 8.030018755 6.147340058 2 8.085177329 7.457898075 6.838507708 Tuesday, January 14, 2020 10:45:11 AM 92 Plot of shintyou*taijyuu. Symbol is value of CLUSTER. 200 + | | | | 1 | 2 1 1 1 180 + 2 2 2 1 1 | 222 112 1 11 1 | 221 1111 2 shintyou | 2 22222 111 1 1 | 2 222 222 1 | 22 22 2 21 160 + 2222 22 | 2 222222 2 | 2 2 22 2 | 2 | 22 | 140 + ---+------------+------------+------------+------------+-- 20 40 60 80 100 taijyuu NOTE: 46 obs hidden. Tuesday, January 14, 2020 10:45:11 AM 93 Plot of taijyuu*kyoui. Symbol is value of CLUSTER. 100 + 1 | | 1 | 1 | 2 | 1 1 75 + 1 1 | 1 11 11 1 | 2 1 211111 1 1 taijyuu | 2 2 221 1 1 | 22 22222 2 | 2 2 2 222 22 22 50 + 2 2 22 2 2 | 2 222 22 | 2 2 | | 2 | 25 + ---+-------------+-------------+-------------+-------------+-- 40 60 80 100 120 kyoui NOTE: 58 obs hidden. Tuesday, January 14, 2020 10:45:11 AM 94 Plot of kyoui*shintyou. Symbol is value of CLUSTER. kyoui | 125 + | | 1 | 1 100 + 1 1 1 | 2 11 11 11 1 11 1 1 | 2 2 2 2 2 22 22 222 22 122 221212 1 22 2 1 | 2 2 22222 222 22 222 2 2 21 2 75 + 22 2 2 2 2 2 2 2 | 2 2 | | 2 50 + | 2 | | 25 + | -+-------------+-------------+-------------+-------------+-------------+ 140 150 160 170 180 190 shintyou NOTE: 44 obs hidden. Tuesday, January 14, 2020 10:45:11 AM 95 Obs sex shintyou taijyuu kyoui jitaku kodukai carryer tsuuwa CLUSTER DISTANCE 1 F 146.7 41.0 85 J 10000 Vodafone 6000 2 24.5971 2 F 148.0 43.0 80 J 50000 DoCoMo 4000 2 22.6748 3 F 150.0 46.0 86 40000 . 2 19.1358 4 F 151.7 41.5 80 J 35000 . 2 20.8285 5 F 152.0 35.0 77 J 60000 DoCoMo 2000 2 26.2100 6 F 153.0 46.5 87 G 10000 . 2 16.5328 7 F 153.0 55.0 78 J 30000 . 2 14.5147 8 F 154.4 44.0 75 J 9000 au 2000 2 18.9920 9 F 155.0 48.0 83 G 180000 . 2 13.7659 10 F 156.0 42.0 85 J 0 DoCoMo 15000 2 17.3003 11 F 156.0 46.0 82 J 10000 Vodafone 7000 2 14.3665 12 F 156.0 48.0 70 J 30000 . 2 18.9739 13 F 156.0 49.0 85 J 25000 . 2 12.3970 14 F 156.0 50.0 82 J 40000 Vodafone 10000 2 11.9661 15 M 156.0 61.0 90 J 0 . 2 12.9700 16 F 156.5 45.0 80 G 60000 au 10000 2 15.1243 17 F 157.0 53.0 84 J 30000 . 2 9.6835 18 F 158.0 46.0 80 27500 Willcom 3000 2 13.4529 19 F 158.0 49.0 85 J 0 . 2 10.8043 20 F 158.0 50.0 85 J 30000 DoCoMo 10000 2 10.1947
≪前略≫
proc print data=outclust(obs=20); : 計算結果の出力(形式1)
run;
/* Output to text file */ : 計算結果をテキストファイルに書き出す(形式2)
data _null_; : ファイルに書き出す
set outclust; : 書き出すデータセットを指定
file 'Kougi19/les1302-OutValue.txt'; : ファイル名を指定
put shintyou taijyuu kyoui cluster distance; : 書き出す変量を指定
run;
/* Output to CSV file */ : 計算結果をCSVファイルに書き出す(形式3)
proc export data=outclust : 書き出すデータセットを指定
outfile= "Kougi19/les1302-OutCSV.csv" : ファイル名を指定
dbms=CSV replace;
run;
data example2019; infile 'Kougi19/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 example2019; infile 'Kougi19/foo2.txt' firstobs=2 dlm='09'x missover truncover encoding=sjis termstr=crlf ;
data math; infile 'Kougi19/foo3.csv' firstobs=2 dlm=',' dsd lrecl=230 ;
data math; infile 'Kougi19/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-03 */ /* File Name = les1303.sas 01/14/20 */ options nocenter linesize=78 pagesize=30; options locale='en_US'; /* options locale='ja_JP'; */ proc printto print = 'Kougi19/les1303-Results.txt' new; data gakusei; infile 'Kougi19/all19b.csv' firstobs=2 dlm=',' dsd missover encoding=sjis termstr=crlf; input sex $ shintyou taijyuu kyoui jitaku $ 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;
*** 通常の頻度集計、クロス集計(アルファベット順にな 334 Tuesday, January 14, 2020 12:55:00 PM The FREQ Procedure Cumulative Cumulative sex Frequency Percent Frequency Percent -------------------------------------------------------- F 124 33.51 124 33.51 M 246 66.49 370 100.00 Frequency Missing = 29 Cumulative Cumulative jitaku Frequency Percent Frequency Percent ----------------------------------------------------------- G 128 37.10 128 37.10 J 217 62.90 345 100.00 Frequency Missing = 54 *** 通常の頻度集計、クロス集計(アルファベット順にな 335 Tuesday, January 14, 2020 12:55:00 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 = 250 *** 通常の頻度集計、クロス集計(アルファベット順にな 336 Tuesday, January 14, 2020 12:55:00 PM The FREQ Procedure Table of sex by jitaku sex jitaku Frequency| Percent | Row Pct | Col Pct |G |J | Total ---------+--------+--------+ F | 36 | 70 | 106 | 11.29 | 21.94 | 33.23 | 33.96 | 66.04 | | 30.25 | 35.00 | ---------+--------+--------+ M | 83 | 130 | 213 | 26.02 | 40.75 | 66.77 | 38.97 | 61.03 | | 69.75 | 65.00 | ---------+--------+--------+ Total 119 200 319 37.30 62.70 100.00 Frequency Missing = 80 *** 通常の頻度集計、クロス集計(アルファベット順にな 337 Tuesday, January 14, 2020 12:55:00 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) *** 通常の頻度集計、クロス集計(アルファベット順にな 338 Tuesday, January 14, 2020 12:55:00 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) *** 通常の頻度集計、クロス集計(アルファベット順にな 339 Tuesday, January 14, 2020 12:55:00 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 = 253 ≪中略≫ *** 頻度の大きい順に表示 *** 343 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Cumulative Cumulative sex Frequency Percent Frequency Percent -------------------------------------------------------- M 246 66.49 246 66.49 F 124 33.51 370 100.00 Frequency Missing = 29 Cumulative Cumulative jitaku Frequency Percent Frequency Percent ----------------------------------------------------------- J 217 62.90 217 62.90 G 128 37.10 345 100.00 Frequency Missing = 54 *** 頻度の大きい順に表示 *** 344 Tuesday, January 14, 2020 12:55:01 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 = 250 *** 頻度の大きい順に表示 *** 345 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Table of sex by jitaku sex jitaku Frequency| Percent | Row Pct | Col Pct |J |G | Total ---------+--------+--------+ M | 130 | 83 | 213 | 40.75 | 26.02 | 66.77 | 61.03 | 38.97 | | 65.00 | 69.75 | ---------+--------+--------+ F | 70 | 36 | 106 | 21.94 | 11.29 | 33.23 | 66.04 | 33.96 | | 35.00 | 30.25 | ---------+--------+--------+ Total 200 119 319 62.70 37.30 100.00 Frequency Missing = 80 *** 頻度の大きい順に表示 *** 346 Tuesday, January 14, 2020 12:55:01 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) *** 頻度の大きい順に表示 *** 347 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Table of sex by carryer sex carryer Frequency| Percent | Row Pct | Col Pct |DDIp |KDDI |OCN |UQ-mobil|Willcom | Total ---------+--------+--------+--------+--------+--------+ M | 1 | 1 | 0 | 0 | 0 | 90 | 0.68 | 0.68 | 0.00 | 0.00 | 0.00 | 61.64 | 1.11 | 1.11 | 0.00 | 0.00 | 0.00 | | 50.00 | 100.00 | . | . | 0.00 | ---------+--------+--------+--------+--------+--------+ F | 1 | 0 | 0 | 0 | 1 | 56 | 0.68 | 0.00 | 0.00 | 0.00 | 0.68 | 38.36 | 1.79 | 0.00 | 0.00 | 0.00 | 1.79 | | 50.00 | 0.00 | . | . | 100.00 | ---------+--------+--------+--------+--------+--------+ Total 2 1 0 0 1 146 1.37 0.68 0.00 0.00 0.68 100.00 (Continued) *** 頻度の大きい順に表示 *** 348 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Table of sex by carryer sex carryer Frequency| Percent | Row Pct | Col Pct |au+Willc|docomo+w|softbank| Total ---------+--------+--------+--------+ M | 0 | 1 | 0 | 90 | 0.00 | 0.68 | 0.00 | 61.64 | 0.00 | 1.11 | 0.00 | | 0.00 | 100.00 | 0.00 | ---------+--------+--------+--------+ F | 1 | 0 | 1 | 56 | 0.68 | 0.00 | 0.68 | 38.36 | 1.79 | 0.00 | 1.79 | | 100.00 | 0.00 | 100.00 | ---------+--------+--------+--------+ Total 1 1 1 146 0.68 0.68 0.68 100.00 Frequency Missing = 253 ≪中略≫ *** 頻度の大きい順に表示(頻度のみ) *** 352 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Cumulative sex Frequency Frequency ------------------------------ M 246 246 F 124 370 Frequency Missing = 29 Cumulative jitaku Frequency Frequency --------------------------------- J 217 217 G 128 345 Frequency Missing = 54 *** 頻度の大きい順に表示(頻度のみ) *** 353 Tuesday, January 14, 2020 12:55:01 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 = 250 *** 頻度の大きい順に表示(頻度のみ) *** 354 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Table of sex by jitaku sex jitaku Frequency|J |G | Total ---------+--------+--------+ M | 130 | 83 | 213 ---------+--------+--------+ F | 70 | 36 | 106 ---------+--------+--------+ Total 200 119 319 Frequency Missing = 80 *** 頻度の大きい順に表示(頻度のみ) *** 355 Tuesday, January 14, 2020 12:55:01 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) *** 頻度の大きい順に表示(頻度のみ) *** 356 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Table of sex by carryer sex carryer Frequency|DDIp |KDDI |OCN |UQ-mobil|Willcom | Total ---------+--------+--------+--------+--------+--------+ M | 1 | 1 | 0 | 0 | 0 | 90 ---------+--------+--------+--------+--------+--------+ F | 1 | 0 | 0 | 0 | 1 | 56 ---------+--------+--------+--------+--------+--------+ Total 2 1 0 0 1 146 (Continued) *** 頻度の大きい順に表示(頻度のみ) *** 357 Tuesday, January 14, 2020 12:55:01 PM The FREQ Procedure Table of sex by carryer sex carryer Frequency|au+Willc|docomo+w|softbank| Total ---------+--------+--------+--------+ M | 0 | 1 | 0 | 90 ---------+--------+--------+--------+ F | 1 | 0 | 1 | 56 ---------+--------+--------+--------+ Total 1 1 1 146 Frequency Missing = 253 ≪後略≫
≪前略≫ 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;