iv. $BE}7W4XO"(B
/* Lesson 09-1 */
/* File Name = les0901.sas 11/28/07 */
data gakusei;
infile 'all07be.prn'
firstobs=2;
input sex $ shintyou taijyuu kyoui
jitaku $ kodukai carryer $ tsuuwa;
if sex^='M' & sex^='F' then delete; : $B@-JLITL@$O=|30$9$k(B
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 $B%7%9%F%`(B 8
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=F ---------------------------------
Univariate Procedure
Variable=SHINTYOU
Normal Probability Plot
172.5+ +*++*
| ******+*+**
| **********++
| *********+
| ********+
147.5+*++*+*+**
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 15
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=F ---------------------------------
Univariate Procedure
Variable=TAIJYUU
Normal Probability Plot
62.5+ *+
| *****+*+*+++
| **********+*+
| ***********+
| *+***+**+*++
37.5++*++*++
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 22
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=F ---------------------------------
Univariate Procedure
Variable=KYOUI
Normal Probability Plot
92.5+ +++*+++
| **********++**+++*
82.5+ ******+**+**+++++
| ++*+*+**+++++
72.5++++*+
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 29
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=F ---------------------------------
Univariate Procedure
Variable=KODUKAI
Normal Probability Plot
325000+ *
|
| *
175000+ *** ++
| ******++++++
| +**********
25000+* * **********************
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 36
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=M ---------------------------------
Univariate Procedure
Variable=SHINTYOU
Normal Probability Plot
187.5+ *+*
| *********++
| *********+
172.5+ ************
| **********+
| *********+
157.5+*++
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 43
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=M ---------------------------------
Univariate Procedure
Variable=TAIJYUU
Normal Probability Plot
105+ *
| * *
| ***+++
75+ **********+++
| ***************
| *****************+
45+*++*++++++
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 50
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=M ---------------------------------
Univariate Procedure
Variable=KYOUI
Normal Probability Plot
115+ * +*+
| +***+*++++
| ***********+*
| ************++
| *+***+++++
|+++++++
| *
45+ *
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
SAS $B%7%9%F%`(B 57
11:02 Tuesday, November 27, 2007
-------------------------------- SEX=M ---------------------------------
Univariate Procedure
Variable=KODUKAI
Normal Probability Plot
375000+ *
| *
|
| *
| ***** ***+++
| ******+++++
| ++******+
25000+* ***************************
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
/* Lesson 09-2 */
/* File Name = les0902.sas 11/28/07 */
data gakusei;
infile 'all07be.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$B8!Dj(B
class sex; : $BJ,N`$7$?$$FC@-JQ?t$N;XDj(B
var shintyou taijyuu kyoui kodukai; : $BHf3S$7$?$$JQNLL>(B
run; :
SAS $B%7%9%F%`(B 2
11:02 Tuesday, November 27, 2007
TTEST PROCEDURE
Variable: SHINTYOU
SEX N Mean Std Dev Std Error
-----------------------------------------------------------------------
F 121 159.02231405 5.33865600 0.48533236
M 244 172.16557377 5.37439089 0.34406012
Variances T DF Prob>|T|
---------------------------------------
Unequal -22.0926 240.9 0.0001
Equal -22.0429 363.0 0.0000
For H0: Variances are equal, F' = 1.01 DF = (243,120) Prob>F' = 0.9470
SAS $B%7%9%F%`(B 3
11:02 Tuesday, November 27, 2007
TTEST PROCEDURE
Variable: TAIJYUU
SEX N Mean Std Dev Std Error
-----------------------------------------------------------------------
F 85 48.69411765 4.67226755 0.50677857
M 244 62.17540984 7.92711460 0.50748151
Variances T DF Prob>|T|
---------------------------------------
Unequal -18.7974 250.0 0.0001
Equal -14.8002 327.0 0.0000
For H0: Variances are equal, F' = 2.88 DF = (243,84) Prob>F' = 0.0000
SAS $B%7%9%F%`(B 4
11:02 Tuesday, November 27, 2007
TTEST PROCEDURE
Variable: KYOUI
SEX N Mean Std Dev Std Error
-----------------------------------------------------------------------
F 44 82.93181818 3.88436177 0.58558957
M 71 88.09859155 9.68526853 1.14942990
Variances T DF Prob>|T|
---------------------------------------
Unequal -4.0052 100.1 0.0001
Equal -3.3701 113.0 0.0010
For H0: Variances are equal, F' = 6.22 DF = (70,43) Prob>F' = 0.0000
SAS $B%7%9%F%`(B 5
11:02 Tuesday, November 27, 2007
TTEST PROCEDURE
Variable: KODUKAI
SEX N Mean Std Dev Std Error
-----------------------------------------------------------------------
F 117 47846.15384615 44343.94671293 4099.59932384
M 234 48350.42735043 52359.24376404 3422.83084192
Variances T DF Prob>|T|
---------------------------------------
Unequal -0.0944 269.0 0.9248
Equal -0.0894 349.0 0.9288
For H0: Variances are equal, F' = 1.39 DF = (233,116) Prob>F' = 0.0449
/* Lesson 09-3 */
/* File Name = les0903.sas 11/28/07 */
data gakusei;
infile 'all07be.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 $B8!Dj(B
class sex; : $BJ,N`$7$?$$FC@-JQ?t$N;XDj(B
var shintyou taijyuu kyoui kodukai; : $BHf3S$7$?$$JQNLL>(B
run; :
SAS $B%7%9%F%`(B 2
11:02 Tuesday, November 27, 2007
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 121 8512.0 22143.0 948.311374 70.347107
M 244 58283.0 44652.0 948.311374 238.864754
Average Scores Were Used for Ties
Wilcoxon 2-Sample Test (Normal Approximation)
(with Continuity Correction of .5)
SAS $B%7%9%F%`(B 3
11:02 Tuesday, November 27, 2007
N P A R 1 W A Y P R O C E D U R E
S = 8512.00 Z = -14.3734 Prob > |Z| = 0.0001
T-Test Approx. Significance = 0.0001
Kruskal-Wallis Test (Chi-Square Approximation)
CHISQ = 206.61 DF = 1 Prob > CHISQ = 0.0001
SAS $B%7%9%F%`(B 4
11:02 Tuesday, November 27, 2007
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 85 4619.5000 14025.0 754.518918 54.347059
M 244 49665.5000 40260.0 754.518918 203.547131
Average Scores Were Used for Ties
Wilcoxon 2-Sample Test (Normal Approximation)
(with Continuity Correction of .5)
SAS $B%7%9%F%`(B 5
11:02 Tuesday, November 27, 2007
N P A R 1 W A Y P R O C E D U R E
S = 4619.50 Z = -12.4649 Prob > |Z| = 0.0001
T-Test Approx. Significance = 0.0001
Kruskal-Wallis Test (Chi-Square Approximation)
CHISQ = 155.39 DF = 1 Prob > CHISQ = 0.0001
SAS $B%7%9%F%`(B 6
11:02 Tuesday, November 27, 2007
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 44 1702.0 2552.0 172.876794 38.6818182
M 71 4968.0 4118.0 172.876794 69.9718310
Average Scores Were Used for Ties
Wilcoxon 2-Sample Test (Normal Approximation)
(with Continuity Correction of .5)
SAS $B%7%9%F%`(B 7
11:02 Tuesday, November 27, 2007
N P A R 1 W A Y P R O C E D U R E
S = 1702.00 Z = -4.91390 Prob > |Z| = 0.0001
T-Test Approx. Significance = 0.0001
Kruskal-Wallis Test (Chi-Square Approximation)
CHISQ = 24.175 DF = 1 Prob > CHISQ = 0.0001
SAS $B%7%9%F%`(B 8
11:02 Tuesday, November 27, 2007
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 117 21577.0 20592.0 891.720488 184.418803
M 234 40199.0 41184.0 891.720488 171.790598
Average Scores Were Used for Ties
Wilcoxon 2-Sample Test (Normal Approximation)
(with Continuity Correction of .5)
SAS $B%7%9%F%`(B 9
11:02 Tuesday, November 27, 2007
N P A R 1 W A Y P R O C E D U R E
S = 21577.0 Z = 1.10405 Prob > |Z| = 0.2696
T-Test Approx. Significance = 0.2703
Kruskal-Wallis Test (Chi-Square Approximation)
CHISQ = 1.2202 DF = 1 Prob > CHISQ = 0.2693
/* Lesson 09-4 */
/* File Name = les0904.sas 11/28/07 */
data pair; :
input x y @@; : @@ $B$O(B 1$B9T$KJ#?t$N%G!<%?$,$"$k$3$H$r<($9(B
dif=x-y; : $B:9(B(difference)$B$r7W;;$9$k(B
cards; : $B%G!<%?$r%W%m%0%i%`Fb$K5-=R$9$k(B
3.51 3.39 3.07 3.39 3.29 3.20 3.03 3.11 : x1,y1, x2,y2, x3,y3, x4,y4,
3.38 3.17 3.30 3.09 3.15 3.17 3.25 3.09 : x5,y5, x6,y6, x7,y7, x8,y8
; :
:
proc print data=pair; :
run; :
proc univariate data=pair plot; :
var dif; : $B:9$K$D$$$F(B
run; :
SAS $B%7%9%F%`(B 1
11:02 Tuesday, November 27, 2007
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
SAS $B%7%9%F%`(B 2
11:02 Tuesday, November 27, 2007
Univariate Procedure
Variable=DIF
Moments
N 8 Sum Wgts 8
Mean 0.04625 Sum 0.37
Std Dev 0.180629 Variance 0.032627
Skewness -1.31523 Kurtosis 1.511099
USS 0.2455 CSS 0.228388
CV 390.5489 Std Mean 0.063862
T:Mean=0 0.724218 Pr>|T| 0.4924
Num ^= 0 8 Num > 0 5
M(Sign) 1 Pr>=|M| 0.7266
Sgn Rank 7 Pr>=|S| 0.3594
SAS $B%7%9%F%`(B 5
11:02 Tuesday, November 27, 2007
Univariate Procedure
Variable=DIF
Stem Leaf # Boxplot
2 11 2 |
1 26 2 +-----+
0 9 1 | + |
-0 82 2 +-----+
-1 |
-2 |
-3 2 1 |
----+----+----+----+
Multiply Stem.Leaf by 10**-1
SAS $B%7%9%F%`(B 6
11:02 Tuesday, November 27, 2007
Univariate Procedure
Variable=DIF
Normal Probability Plot
0.25+ *++++*
| *++*+++
| *++++
-0.05+ *+++*++
| +++++
| ++++++
-0.35+ +++++ *
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2