/* Lesson 10-1 */ /* File Name = les1001.sas 12/03/08 */ data gakusei; infile 'all08ce.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if sex^='M' & sex^='F' 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;
SAS システム 8 17:20 Monday, December 1, 2008 -------------------------------- SEX=F --------------------------------- Univariate Procedure Variable=SHINTYOU Normal Probability Plot 172.5+ +*++* | *****+*+*** | **********++ | **********+ | +********+ 147.5+*++*+*+** +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 15 17:20 Monday, December 1, 2008 -------------------------------- SEX=F --------------------------------- Univariate Procedure Variable=TAIJYUU Normal Probability Plot 62.5+ * +* | *****+*++++ | ************ | ************+ | *+****+**++ 37.5+*+++*++ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 22 17:20 Monday, December 1, 2008 -------------------------------- SEX=F --------------------------------- Univariate Procedure Variable=KYOUI Normal Probability Plot 92.5+ +++*+++ | ***********+**+++* 82.5+ ********+***+*++++ | ++*+*+**+++++ 72.5++++*+ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 29 17:20 Monday, December 1, 2008 -------------------------------- SEX=F --------------------------------- Univariate Procedure Variable=KODUKAI Normal Probability Plot 325000+ * | | * 175000+ *** ++ | *****+++++++ | +********** 25000+* * ********************** +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 36 17:20 Monday, December 1, 2008 -------------------------------- SEX=M --------------------------------- Univariate Procedure Variable=SHINTYOU Normal Probability Plot 187.5+ ***+* | *********++ | ********+ 172.5+ *********** | *********+ | ********+ 157.5+*+* +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 43 17:20 Monday, December 1, 2008 -------------------------------- SEX=M --------------------------------- Univariate Procedure Variable=TAIJYUU Normal Probability Plot 105+ * | * * | ***+++ 75+ **********++ | *************** | *****************+ 45+*++*++++++ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 50 17:20 Monday, December 1, 2008 -------------------------------- SEX=M --------------------------------- Univariate Procedure Variable=KYOUI Normal Probability Plot 115+ * +*+ | ***+**++++ | *************+* | *************++ | **+**+++++ |+++++++ | * 45+ * +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 SAS システム 57 17:20 Monday, December 1, 2008 -------------------------------- SEX=M --------------------------------- Univariate Procedure Variable=KODUKAI Normal Probability Plot 550000+ * | | * * | * | *************++++ 50000+* ******************************** +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2
/* Lesson 10-2 */ /* File Name = les1002.sas 12/03/08 */ data gakusei; infile 'all08ce.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if sex^='M' & sex^='F' then delete; proc print data=gakusei(obs=10); run; proc ttest data=gakusei; : t検定 class sex; : 分類したい特性変数の指定 var shintyou taijyuu kyoui kodukai; : 比較したい変量名 run; :
SAS システム 2 17:20 Monday, December 1, 2008 TTEST PROCEDURE Variable: SHINTYOU SEX N Mean Std Dev Std Error ----------------------------------------------------------------------- F 127 158.98188976 5.25173316 0.46601596 M 261 172.25287356 5.54651323 0.34332055 Variances T DF Prob>|T| --------------------------------------- Unequal -22.9274 262.4 0.0001 Equal -22.4983 386.0 0.0000 For H0: Variances are equal, F' = 1.12 DF = (260,126) Prob>F' = 0.4914 SAS システム 3 17:20 Monday, December 1, 2008 TTEST PROCEDURE Variable: TAIJYUU SEX N Mean Std Dev Std Error ----------------------------------------------------------------------- F 88 48.84090909 4.74820320 0.50616016 M 261 62.36015326 8.02453104 0.49670600 Variances T DF Prob>|T| --------------------------------------- Unequal -19.0636 255.8 0.0001 Equal -14.9384 347.0 0.0000 For H0: Variances are equal, F' = 2.86 DF = (260,87) Prob>F' = 0.0000 SAS システム 4 17:20 Monday, December 1, 2008 TTEST PROCEDURE Variable: KYOUI SEX N Mean Std Dev Std Error ----------------------------------------------------------------------- F 45 82.97777778 3.85232450 0.57427063 M 74 88.17567568 9.63492237 1.12003697 Variances T DF Prob>|T| --------------------------------------- Unequal -4.1296 104.5 0.0001 Equal -3.4505 117.0 0.0008 For H0: Variances are equal, F' = 6.26 DF = (73,44) Prob>F' = 0.0000 SAS システム 5 17:20 Monday, December 1, 2008 TTEST PROCEDURE Variable: KODUKAI SEX N Mean Std Dev Std Error ----------------------------------------------------------------------- F 123 48089.43089431 44134.99376077 3979.51837003 M 250 49536.00000000 58676.84887907 3711.04976759 Variances T DF Prob>|T| --------------------------------------- Unequal -0.2658 311.2 0.7905 Equal -0.2418 371.0 0.8091 For H0: Variances are equal, F' = 1.77 DF = (249,122) Prob>F' = 0.0005
/* Lesson 10-3 */ /* File Name = les1003.sas 12/03/08 */ data gakusei; infile 'all08ce.prn' firstobs=2; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if sex^='M' & sex^='F' then delete; proc print data=gakusei(obs=10); run; proc npar1way data=gakusei wilcoxon; : wilcoxon 検定 class sex; : 分類したい特性変数の指定 var shintyou taijyuu kyoui kodukai; : 比較したい変量名 run; :
SAS システム 2 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E 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 127 9394.0 24701.5000 1035.90349 73.968504 M 261 66072.0 50764.5000 1035.90349 253.149425 Average Scores Were Used for Ties Wilcoxon 2-Sample Test (Normal Approximation) (with Continuity Correction of .5) SAS システム 3 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E S = 9394.00 Z = -14.7765 Prob > |Z| = 0.0001 T-Test Approx. Significance = 0.0001 Kruskal-Wallis Test (Chi-Square Approximation) CHISQ = 218.36 DF = 1 Prob > CHISQ = 0.0001 SAS システム 4 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E 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 88 5044.0 15400.0 817.684297 57.318182 M 261 56031.0 45675.0 817.684297 214.678161 Average Scores Were Used for Ties Wilcoxon 2-Sample Test (Normal Approximation) (with Continuity Correction of .5) SAS システム 5 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E S = 5044.00 Z = -12.6644 Prob > |Z| = 0.0001 T-Test Approx. Significance = 0.0001 Kruskal-Wallis Test (Chi-Square Approximation) CHISQ = 160.40 DF = 1 Prob > CHISQ = 0.0001 SAS システム 6 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E 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 45 1803.50000 2700.0 181.483384 40.0777778 M 74 5336.50000 4440.0 181.483384 72.1148649 Average Scores Were Used for Ties Wilcoxon 2-Sample Test (Normal Approximation) (with Continuity Correction of .5) SAS システム 7 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E S = 1803.50 Z = -4.93709 Prob > |Z| = 0.0001 T-Test Approx. Significance = 0.0001 Kruskal-Wallis Test (Chi-Square Approximation) CHISQ = 24.402 DF = 1 Prob > CHISQ = 0.0001 SAS システム 8 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E 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 123 24169.0 23001.0 974.245264 196.495935 M 250 45582.0 46750.0 974.245264 182.328000 Average Scores Were Used for Ties Wilcoxon 2-Sample Test (Normal Approximation) (with Continuity Correction of .5) SAS システム 9 17:20 Monday, December 1, 2008 N P A R 1 W A Y P R O C E D U R E S = 24169.0 Z = 1.19836 Prob > |Z| = 0.2308 T-Test Approx. Significance = 0.2315 Kruskal-Wallis Test (Chi-Square Approximation) CHISQ = 1.4373 DF = 1 Prob > CHISQ = 0.2306