This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Chapter 6 SAS 1  Chapter 6 Ttests and Analysis of Variance Ttests and analysis of variance (ANOVA) are widely used statistical methods to compare group means. For example, the independent sample ttest enables you to compare annual personal income between rural and urban areas and examine the difference in the grade point average (GPA) between male and female students. Using the paired ttest, you can also compare the change in outcomes before and after a treatment is applied. While the independent sample ttest is limited to comparing the means of two groups, the oneway ANOVA (Analysis of Variance) can compare more than two groups. ANOVA use F statistic to test if all groups have the same mean. Therefore, the ttest is considered a special case of the oneway ANOVA. Chapter 6 SAS 2  6.1 TTest 1. PROC TTEST a. A single sample H o : = or 0 i. Options in the PROC TTEST line 1) ALPHA=___ 2) H0=___; 0 by default ii. VAR statement put variables of interest here iii. SAS code and partial output for testing This is basically the same test we ran before using PROC UNIVARIATE. Now lets revisit the SASDATA.blood data set and we would like to test this: H o : RBC = 5 vs. H a : RBC 5: title2 'One sample ttest' ; proc ttest data =SASDATA.blood alpha = 0.05 H0 = 5 ; var RBC; run ; One sample ttest The TTEST Procedure Variable: RBC N Mean Std Dev Std Err Minimum Maximum 916 5.4835 0.9841 0.0325 1.7100 8.7500 Mean 95% CL Mean Std Dev 95% CL Std Dev 5.4835 5.4197 5.5473 0.9841 0.9410 1.0314 DF t Value Pr > t 915 14.87 <.0001 So we would reject H at the .05 significance level. b. Two independent samples Ho: 1 2 = or 0 i. Options in the PROC TTEST line similar to the single sample case ii. CLASS statement put variable which distinguishes the population 1 from population 2. iii. VAR statement put variables of interest here Chapter 6 SAS 3  iv. SAS code and partial output for testing H o : F M =0 vs. H a : F M 0: title2 'Two sample independent ttest' ; proc ttest data =sasdata.blood alpha = 0.05 H0 = ; class gender; var RBC; run ; STAT 6360 Two sample independent ttest The TTEST Procedure Variable: RBC Gender N Mean Std Dev Std Err Minimum Maximum Female 409 5.4985 0.9823 0.0486 1.7100 8.7500 Male 507 5.4715 0.9864 0.0438 2.3300 8.4300 Diff (12) 0.0270 0.9846 0.0654 Gender Method Mean 95% CL Mean Std Dev Female 5.4985 5.4030 5.5940 0.9823 Male 5.4715 5.3854 5.5575 0.9864 Diff (12) Pooled 0.0270 0.1014 0.1554 0.9846 Diff (12) Satterthwaite 0.0270 0.1014 0.1554 Gender Method 95% CL Std Dev Female 0.9193 1.0547 Male 0.9292 1.0511 Diff (12) Pooled 0.9414 1.0319 Diff (12) Satterthwaite TTests Method Variances DF t Value Pr > t Pooled Equal 914 0.41 0.6797 Satterthwaite Unequal 874.92 0.41 0.6796 Equality of Variances Method Num DF Den DF F Value Pr > F Folded F 506 408 1.01 0.9328 Chapter 6 SAS 4  ii. There are two different tests given for the hypotheses of interest. There are two different tests given for the hypotheses of interest....
View
Full
Document
 Spring '11
 Park
 Variance

Click to edit the document details