/* Lesson 6-1 */ /* File Name = les0601.sas 05/23/02 */ data gakusei; : infile 'waseda02.prn'; : ファイル名の変更 input sex $ shintyou taijyuu kyoui : jitaku $ kodukai carryer $ tsuuwa; : : proc print data=gakusei(obs=5); : run; : proc means data=gakusei; : 平均、標準偏差、最大最小値の算出 run; : proc chart data=gakusei; : ヒストグラムを描く hbar shintyou taijyuu; : 水平棒グラフで。変量を指定 vbar shintyou taijyuu; : 垂直棒グラフで。変量を指定 run; : proc plot data=gakusei; : 散布図を描く plot shintyou*taijyuu; : 散布図の変量を指定(縦軸、横軸の順) plot taijyuu*shintyou; : run; : : proc chart data=gakusei; : hbar shintyou / midpoints=150 to 180 by 5; : 区切りの指定 hbar taijyuu / midpoints=35 to 75 by 5; : hbar kodukai / midpoints=0 to 300000 by 10000; : : vbar shintyou / midpoints=150 to 180 by 5; : 垂直棒グラフ vbar taijyuu / midpoints=35 to 75 by 5; : vbar kodukai / midpoints=0 to 300000 by 10000; : : hbar shintyou / midpoints=150 to 180 by 10 axis=0 5 10 15 20; : 頻度側の指定 hbar taijyuu / midpoints=35 to 75 by 10 axis=0 3 6 9 12 15; : hbar kodukai / midpoints=0 to 300000 by 20000 axis=0 to 12 by 2; : run; : proc plot data=gakusei; plot shintyou*taijyuu / vaxis=150 to 180 by 10 haxis=30 to 80 by 10; run;
SAS システム 2 15:41 Wednesday, May 22, 2002 Variable N Mean Std Dev Minimum Maximum -------------------------------------------------------------------- SHINTYOU 38 165.8921053 8.6980390 148.0000000 181.5000000 TAIJYUU 36 54.0138889 9.5815046 35.0000000 74.5000000 KYOUI 9 82.0000000 5.1720402 75.0000000 90.0000000 KODUKAI 36 44888.89 57705.05 0 300000.00 TSUUWA 31 8120.97 5186.07 2000.00 30000.00 -------------------------------------------------------------------- SAS システム 3 15:41 Wednesday, May 22, 2002 SHINTYOU Cum. Cum. Midpoint Freq Freq Percent Percent | 150 |**** 2 2 5.26 5.26 156 |************** 7 9 18.42 23.68 162 |********** 5 14 13.16 36.84 168 |************************ 12 26 31.58 68.42 174 |**************** 8 34 21.05 89.47 180 |******** 4 38 10.53 100.00 | ----+---+---+---+---+---+ 2 4 6 8 10 12 Frequency SAS システム 6 15:41 Wednesday, May 22, 2002 Frequency | ***** ***** 8 + ***** ***** | ***** ***** ***** 6 + ***** ***** ***** | ***** ***** ***** 4 + ***** ***** ***** ***** | ***** ***** ***** ***** ***** ***** 2 + ***** ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** ***** ***** -------------------------------------------------------------------- 36 42 48 54 60 66 72 TAIJYUU Midpoint SAS システム 7 15:41 Wednesday, May 22, 2002 プロット : SHINTYOU*TAIJYUU. 凡例: A = 1 OBS, B = 2 OBS, ... (NOTE: 2 オブザベーションが欠損値です.) 180 + A A A | A A A A SHINTYOU | B AAA A A | A A A A A A | A A B 160 + BA A | B A | A A A A | A | 140 + -+-----------+-----------+-----------+-----------+-----------+- 30 40 50 60 70 80 TAIJYUU SAS システム 9 15:41 Wednesday, May 22, 2002 SHINTYOU Cum. Cum. Midpoint Freq Freq Percent Percent | 150 |**** 2 2 5.26 5.26 155 |************ 6 8 15.79 21.05 160 |********** 5 13 13.16 34.21 165 |**************** 8 21 21.05 55.26 170 |**************** 8 29 21.05 76.32 175 |************ 6 35 15.79 92.11 180 |****** 3 38 7.89 100.00 | ----+---+---+---+ 2 4 6 8 Frequency SAS システム 10 15:41 Wednesday, May 22, 2002 TAIJYUU Cum. Cum. Midpoint Freq Freq Percent Percent | 35 |** 1 1 2.78 2.78 40 |****** 3 4 8.33 11.11 45 |************** 7 11 19.44 30.56 50 |******** 4 15 11.11 41.67 55 |**************** 8 23 22.22 63.89 60 |************** 7 30 19.44 83.33 65 |**** 2 32 5.56 88.89 70 |**** 2 34 5.56 94.44 75 |**** 2 36 5.56 100.00 | ----+---+---+---+ 2 4 6 8 Frequency SAS システム 11 15:41 Wednesday, May 22, 2002 KODUKAI Cum. Cum. Midpoint Freq Freq Percent Percent | 0 |******************** 10 10 27.78 27.78 10000 |**** 2 12 5.56 33.33 20000 |******** 4 16 11.11 44.44 30000 |******** 4 20 11.11 55.56 40000 |****** 3 23 8.33 63.89 50000 |**** 2 25 5.56 69.44 60000 |****** 3 28 8.33 77.78 70000 |**** 2 30 5.56 83.33 80000 | 0 30 0.00 83.33 90000 | 0 30 0.00 83.33 100000 |**** 2 32 5.56 88.89 110000 | 0 32 0.00 88.89 120000 |**** 2 34 5.56 94.44 130000 |** 1 35 2.78 97.22 140000 | 0 35 0.00 97.22 150000 | 0 35 0.00 97.22 160000 | 0 35 0.00 97.22 170000 | 0 35 0.00 97.22 180000 | 0 35 0.00 97.22 190000 | 0 35 0.00 97.22 200000 | 0 35 0.00 97.22 210000 | 0 35 0.00 97.22 220000 | 0 35 0.00 97.22 230000 | 0 35 0.00 97.22 240000 | 0 35 0.00 97.22 250000 | 0 35 0.00 97.22 260000 | 0 35 0.00 97.22 270000 | 0 35 0.00 97.22 280000 | 0 35 0.00 97.22 290000 | 0 35 0.00 97.22 300000 |** 1 36 2.78 100.00 | ----+---+---+---+---+ 2 4 6 8 10 Frequency SAS システム 14 15:41 Wednesday, May 22, 2002 Frequency 8 + ***** ***** | ***** ***** 6 + ***** ***** ***** ***** | ***** ***** ***** ***** ***** 4 + ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** ***** 2 + ***** ***** ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** ***** ***** -------------------------------------------------------------------- 150 155 160 165 170 175 180 SHINTYOU Midpoint SAS システム 15 15:41 Wednesday, May 22, 2002 Frequency 8 + ***** | ***** ***** ***** 6 + ***** ***** ***** | ***** ***** ***** 4 + ***** ***** ***** ***** | ***** ***** ***** ***** ***** 2 + ***** ***** ***** ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** ***** ***** ***** ***** ------------------------------------------------------------------ 35 40 45 50 55 60 65 70 75 TAIJYUU Midpoint SAS システム 16 15:41 Wednesday, May 22, 2002 Frequency | * 8 + * | * 4 + * * * * * | * * * * * * * * * * * * ---------------------------------------------------------------- 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KODUKAI Midpoint SAS システム 17 15:41 Wednesday, May 22, 2002 SHINTYOU Cum. Cum. Midpoint Freq Freq Percent Percent | 150 |***** 5 5 13.16 13.16 | 160 |********* 9 14 23.68 36.84 | 170 |****************** 18 32 47.37 84.21 | 180 |****** 6 38 15.79 100.00 | -----+----+----+----+ 5 10 15 20 Frequency SAS システム 18 15:41 Wednesday, May 22, 2002 TAIJYUU Cum. Cum. Midpoint Freq Freq Percent Percent | 35 |** 1 1 2.78 2.78 | 45 |************************ 12 13 33.33 36.11 | 55 |************************** 13 26 36.11 72.22 | 65 |************** 7 33 19.44 91.67 | 75 |****** 3 36 8.33 100.00 | ------+-----+-----+-----+-----+ 3 6 9 12 15 Frequency SAS システム 19 15:41 Wednesday, May 22, 2002 KODUKAI Cum. Cum. Midpoint Freq Freq Percent Percent | 0 |********************** 11 11 30.56 30.56 20000 |************ 6 17 16.67 47.22 40000 |************ 6 23 16.67 63.89 60000 |********** 5 28 13.89 77.78 80000 |**** 2 30 5.56 83.33 100000 |**** 2 32 5.56 88.89 120000 |****** 3 35 8.33 97.22 140000 | 0 35 0.00 97.22 160000 | 0 35 0.00 97.22 180000 | 0 35 0.00 97.22 200000 | 0 35 0.00 97.22 220000 | 0 35 0.00 97.22 240000 | 0 35 0.00 97.22 260000 | 0 35 0.00 97.22 280000 | 0 35 0.00 97.22 300000 |** 1 36 2.78 100.00 | ----+---+---+---+---+---+ 2 4 6 8 10 12 Frequency SAS システム 21 15:41 Wednesday, May 22, 2002 プロット : SHINTYOU*TAIJYUU. 凡例: A = 1 OBS, B = 2 OBS, ... (NOTE: 2 が欠損値です. 1 OBS が範囲外です.) SHINTYOU | 180 + A A A | A A A | A A A A 170 + A A A A | A A B A A A A | A A 160 + B A | B A A | A A A A 150 + -+-----------+-----------+-----------+-----------+-----------+- 30 40 50 60 70 80 TAIJYUU
/* Lesson 6-2 */ /* File Name = les0602.sas 05/23/02 */ data gakusei; infile 'waseda02.prn'; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; proc print data=gakusei(obs=5); run; proc freq data=gakusei; : 頻度を取る tables sex jitaku carryer; : 指定した変量について計算 run; :
SAS システム 2 14:37 Wednesday, May 22, 2002 Cumulative Cumulative SEX Frequency Percent Frequency Percent ------------------------------------------------- F 17 45.9 17 45.9 M 20 54.1 37 100.0 Frequency Missing = 1 Cumulative Cumulative JITAKU Frequency Percent Frequency Percent ---------------------------------------------------- G 13 37.1 13 37.1 J 22 62.9 35 100.0 Frequency Missing = 3 Cumulative Cumulative CARRYER Frequency Percent Frequency Percent ----------------------------------------------------- DDIp 1 3.4 1 3.4 DoCoMo 14 48.3 15 51.7 J-PHONE 7 24.1 22 75.9 No 3 10.3 25 86.2 au 4 13.8 29 100.0 Frequency Missing = 9