/* Lesson 5-1 */ /* File Name = les0501.sas 05/15/03 */ data gakusei; infile 'all03a.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; proc print data=gakusei(obs=5); run; proc means data=gakusei; run; proc univariate data=gakusei plot; : 基礎統計量の算出、plot オプション var shintyou taijyuu kyoui kodukai; : 指定した変量について計算 run; :
SAS システム 1 20:40 Wednesday, May 14, 2003 OBS SEX SHINTYOU TAIJYUU KYOUI JITAKU KODUKAI CARRYER TSUUWA 1 F 145.0 38 . J 10000 . 2 F 148.0 42 . J 50000 . 3 F 148.0 43 80 J 50000 DoCoMo 4000 4 F 148.9 . . J 60000 . 5 F 149.0 45 . G 60000 . SAS システム 2 20:40 Wednesday, May 14, 2003 Variable N Mean Std Dev Minimum Maximum --------------------------------------------------------------------- SHINTYOU 243 168.2094650 8.0126058 145.0000000 186.0000000 TAIJYUU 219 58.9305936 9.1417946 35.0000000 100.0000000 KYOUI 86 86.9651163 8.0153495 56.0000000 112.0000000 KODUKAI 230 51380.43 52427.62 0 300000.00 TSUUWA 39 8173.08 4820.85 2000.00 30000.00 --------------------------------------------------------------------- SAS システム 3 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=SHINTYOU Moments N 243 Sum Wgts 243 Mean 168.2095 Sum 40874.9 Std Dev 8.012606 Variance 64.20185 Skewness -0.40398 Kurtosis -0.16518 USS 6891082 CSS 15536.85 CV 4.763469 Std Mean 0.514009 T:Mean=0 327.2501 Pr>|T| 0.0001 Num ^= 0 243 Num > 0 243 M(Sign) 121.5 Pr>=|M| 0.0001 Sgn Rank 14823 Pr>=|S| 0.0001 SAS システム 4 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=SHINTYOU Quantiles(Def=5) 100% Max 186 99% 184 75% Q3 173.7 95% 180 50% Med 170 90% 178 25% Q1 163 10% 156 0% Min 145 5% 153.5 1% 148 Range 41 Q3-Q1 10.7 Mode 170 SAS システム 5 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=SHINTYOU Extremes Lowest Obs Highest Obs 145( 1) 182( 239) 148( 3) 183( 240) 148( 2) 184( 241) 148.9( 4) 185( 242) 149( 5) 186( 243) Missing Value . Count 9 % Count/Nobs 3.57 SAS システム 7 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=SHINTYOU Histogram # Boxplot 187.5+* 2 | .******** 16 | .***************** 34 | .*********************************** 70 +-----+ 167.5+************************ 48 | + | .******************* 38 +-----+ .*********** 21 | .***** 9 | 147.5+*** 5 0 ----+----+----+----+----+----+----+ * may represent up to 2 counts SAS システム 8 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=SHINTYOU Normal Probability Plot 187.5+ ++++* | *****+*** | ******* | ********* 167.5+ ******++ | ******* | ****** | ++***** 147.5+*++** +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 15 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KYOUI Moments N 86 Sum Wgts 86 Mean 86.96512 Sum 7479 Std Dev 8.01535 Variance 64.24583 Skewness -0.11301 Kurtosis 3.214621 USS 655873 CSS 5460.895 CV 9.216741 Std Mean 0.864317 T:Mean=0 100.6171 Pr>|T| 0.0001 Num ^= 0 86 Num > 0 86 M(Sign) 43 Pr>=|M| 0.0001 Sgn Rank 1870.5 Pr>=|S| 0.0001 SAS システム 19 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KYOUI Stem Leaf # Boxplot 11 02 2 0 10 0004 4 0 9 0000000000000002344555666 25 +-----+ 8 0000002222333334455555555555556677788888899999 46 *--+--* 7 00556788 8 0 6 5 6 1 * ----+----+----+----+----+----+----+----+----+- Multiply Stem.Leaf by 10**+1 SAS システム 21 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KODUKAI Moments N 230 Sum Wgts 230 Mean 51380.43 Sum 11817500 Std Dev 52427.62 Variance 2.7487E9 Skewness 1.661303 Kurtosis 3.710083 USS 1.237E12 CSS 6.294E11 CV 102.0381 Std Mean 3456.975 T:Mean=0 14.86283 Pr>|T| 0.0001 Num ^= 0 189 Num > 0 189 M(Sign) 94.5 Pr>=|M| 0.0001 Sgn Rank 8977.5 Pr>=|S| 0.0001 SAS システム 22 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KODUKAI Quantiles(Def=5) 100% Max 300000 99% 200000 75% Q3 70000 95% 150000 50% Med 30000 90% 127500 25% Q1 20000 10% 0 0% Min 0 5% 0 1% 0 Range 300000 Q3-Q1 50000 Mode 0 SAS システム 23 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KODUKAI Extremes Lowest Obs Highest Obs 0( 248) 180000( 15) 0( 243) 200000( 51) 0( 242) 200000( 175) 0( 237) 300000( 81) 0( 233) 300000( 222) Missing Value . Count 22 % Count/Nobs 8.73 SAS システム 25 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KODUKAI Histogram # Boxplot 325000+* 2 * . .* 2 0 175000+****** 16 0 .********* 27 | .**************** 48 +--+--+ 25000+********************************************* 135 *-----* ----+----+----+----+----+----+----+----+----+ * may represent up to 3 counts SAS システム 26 20:40 Wednesday, May 14, 2003 Univariate Procedure Variable=KODUKAI Normal Probability Plot 325000+ * | | ** 175000+ ********++++ | ******+++++ | ++*******+ 25000+* ************************** +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2
貯蓄現在高階級別世帯分布(全世帯)
分布形状と統計量
/* Lesson 5-2 */ /* File Name = les0502.sas 05/15/03 */ data gakusei; infile 'all03a.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; proc print data=gakusei(obs=5); run; proc means data=gakusei; run; proc univariate data=gakusei plot; var shintyou taijyuu kyoui kodukai; run; proc chart data=gakusei; : ヒストグラム hbar shintyou taijyuu kyoui kodukai; : 指定した変量について計算 run; : : proc sort data=gakusei; : 並べ替え(ソート) by sex; : 性別ごとに run; : : proc means data=gakusei; : 平均の計算 var shintyou taijyuu kyoui kodukai; : 指定した変量について計算 by sex; : 性別ごとに run; : proc chart data=gakusei; : ヒストグラム hbar shintyou taijyuu kyoui kodukai; : 指定した変量について計算 by sex; : 性別ごとに run; : proc chart data=gakusei; : ヒストグラム hbar shintyou taijyuu kyoui kodukai/group=sex; : 性別ごとに併置して run; : proc univariate data=gakusei plot; : 基礎統計量の計算 var shintyou taijyuu kyoui kodukai; : 指定した変量について計算 by sex; : 性別ごとに run; :
SAS システム 31 20:40 Wednesday, May 14, 2003 -------------------------------- SEX=' ' ------------------------------- Variable N Mean Std Dev Minimum Maximum --------------------------------------------------------------------- SHINTYOU 1 168.0000000 . 168.0000000 168.0000000 TAIJYUU 1 60.0000000 . 60.0000000 60.0000000 KYOUI 0 . . . . KODUKAI 2 61500.00 54447.22 23000.00 100000.00 --------------------------------------------------------------------- SAS システム 32 20:40 Wednesday, May 14, 2003 --------------------------------- SEX=F -------------------------------- Variable N Mean Std Dev Minimum Maximum --------------------------------------------------------------------- SHINTYOU 74 159.3094595 5.6124658 145.0000000 171.0000000 TAIJYUU 50 48.4000000 4.8989795 35.0000000 59.0000000 KYOUI 27 83.2962963 4.4273174 70.0000000 90.0000000 KODUKAI 69 53021.74 52627.61 0 300000.00 --------------------------------------------------------------------- SAS システム 33 20:40 Wednesday, May 14, 2003 --------------------------------- SEX=M -------------------------------- Variable N Mean Std Dev Minimum Maximum --------------------------------------------------------------------- SHINTYOU 168 172.1309524 5.3568799 156.0000000 186.0000000 TAIJYUU 168 62.0583333 7.6813283 46.0000000 100.0000000 KYOUI 59 88.6440678 8.7311624 56.0000000 112.0000000 KODUKAI 159 50540.88 52629.44 0 300000.00 --------------------------------------------------------------------- SAS システム 37 20:40 Wednesday, May 14, 2003 -------------------------------- SEX=F --------------------------------- SHINTYOU Cum. Cum. Midpoint Freq Freq Percent Percent | 146 |* 1 1 1.35 1.35 150 |****** 6 7 8.11 9.46 154 |********** 10 17 13.51 22.97 158 |***************** 17 34 22.97 45.95 162 |********************** 22 56 29.73 75.68 166 |*************** 15 71 20.27 95.95 170 |*** 3 74 4.05 100.00 | -----+----+----+----+-- 5 10 15 20 Frequency SAS システム 41 20:40 Wednesday, May 14, 2003 -------------------------------- SEX=M --------------------------------- SHINTYOU Cum. Cum. Midpoint Freq Freq Percent Percent | 158 |* 1 1 0.60 0.60 162 |***** 10 11 5.95 6.55 166 |********* 18 29 10.71 17.26 170 |************************** 52 81 30.95 48.21 174 |************************ 47 128 27.98 76.19 178 |*********** 22 150 13.10 89.29 182 |******** 15 165 8.93 98.21 186 |** 3 168 1.79 100.00 | -----+----+----+----+----+- 10 20 30 40 50 SAS システム 46 20:40 Wednesday, May 14, 2003 SEX SHINTYOU Cum. Cum. Midpoint Freq Freq Percent Percent | 145 | 0 0 0.00 0.00 150 | 0 0 0.00 0.00 155 | 0 0 0.00 0.00 160 | 0 0 0.00 0.00 165 | 0 0 0.00 0.00 170 | 1 1 0.41 0.41 175 | 0 1 0.00 0.41 180 | 0 1 0.00 0.41 185 | 0 1 0.00 0.41 | F 145 | 1 2 0.41 0.82 150 |* 7 9 2.88 3.70 155 |**** 20 29 8.23 11.93 160 |***** 25 54 10.29 22.22 165 |**** 18 72 7.41 29.63 170 |* 3 75 1.23 30.86 175 | 0 75 0.00 30.86 180 | 0 75 0.00 30.86 185 | 0 75 0.00 30.86 | M 145 | 0 75 0.00 30.86 150 | 0 75 0.00 30.86 155 | 1 76 0.41 31.28 160 |* 5 81 2.06 33.33 165 |***** 23 104 9.47 42.80 170 |************* 66 170 27.16 69.96 175 |********* 45 215 18.52 88.48 180 |***** 24 239 9.88 98.35 185 |* 4 243 1.65 100.00 | ----+---+---+- 20 40 60 Frequency SAS システム 75 20:40 Wednesday, May 14, 2003 -------------------------------- SEX=F --------------------------------- Univariate Procedure Variable=SHINTYOU Moments N 74 Sum Wgts 74 Mean 159.3095 Sum 11788.9 Std Dev 5.612466 Variance 31.49977 Skewness -0.28937 Kurtosis -0.275 USS 1880383 CSS 2299.483 CV 3.522996 Std Mean 0.652436 T:Mean=0 244.1764 Pr>|T| 0.0001 Num ^= 0 74 Num > 0 74 M(Sign) 37 Pr>=|M| 0.0001 Sgn Rank 1387.5 Pr>=|S| 0.0001 SAS システム 103 20:40 Wednesday, May 14, 2003 -------------------------------- SEX=M --------------------------------- Univariate Procedure Variable=SHINTYOU Moments N 168 Sum Wgts 168 Mean 172.131 Sum 28918 Std Dev 5.35688 Variance 28.69616 Skewness 0.031955 Kurtosis 0.138227 USS 4982475 CSS 4792.259 CV 3.112096 Std Mean 0.413292 T:Mean=0 416.4872 Pr>|T| 0.0001 Num ^= 0 168 Num > 0 168 M(Sign) 84 Pr>=|M| 0.0001 Sgn Rank 7098 Pr>=|S| 0.0001 SAS システム 131 20:40 Wednesday, May 14, 2003 Univariate Procedure Schematic Plots Variable=SHINTYOU 200 + | | 0 180 + | | | *--+--* | *--+--* | +-----+ 160 + *--+--* | | +-----+ 0 | 0 140 + ------------+-----------+-----------+----------- SEX F M SAS システム 132 20:40 Wednesday, May 14, 2003 Univariate Procedure Schematic Plots Variable=TAIJYUU | 100 + * | 0 | *--+--* | *--+--* 50 + *--+--* +-----+ | 0 | 0 + ------------+-----------+-----------+----------- SEX F M SAS システム 133 20:40 Wednesday, May 14, 2003 Univariate Procedure Schematic Plots Variable=KYOUI | 150 + | | 0 100 + +-----+ | *--0--* *--+--* | 0 0 50 + * ------------+-----------+-----------+----------- SEX F M SAS システム 134 20:40 Wednesday, May 14, 2003 Univariate Procedure Schematic Plots Variable=KODUKAI 300000 + * * | | 200000 + 0 0 | 0 | | | | 100000 + +-----+ | | | *--+--* +--+--+ +--+--+ | +-----+ *-----* *-----* 0 + | +-----+ ------------+-----------+-----------+----------- SEX F M