T-Tests & ANOVA

Document Sample

```					T-Tests & ANOVA

JACOB SEYBERT
9/24/09
Proc TTEST

INPUT LAB5EXAMPLE.XLS
INTO SAS.

OPEN THE SYNTAX FILE
TTESTCODE.SAS
Three Types of T-Tests

 Independent Sample t-test

 Single Sample t-test

 Paired/Dependent Sample t-test
Proc TTEST –Single Sample

Proc TTEST H0=Value to test;
var variabletotest;
Run;

Proc TTEST H0=16.5;
var performance1;
Title ‘Simple t-test’;
Run;
Single Sample t-test

 Results:
Proc TTEST –Paired Sample

PROC TTEST;
Paired variable1*variable2;
Run;

PROC TTEST;
Paired performance1*performance2;
Title ‘Paired t-test’;
Run;
Paired Sample t-test

 Results:
One-way ANOVA

OPEN
SIMPLEONEWAYANOVA.SAS
Resources for you:

 Hays chapter 10
 Pages 396-410 are great for learning these calculations.

 Online web video to supplement the example.
 See how to do it in SAS!
Proc GLM Syntax

PROC GLM DATA = dataset name;
CLASS name(s) of categorical variable (s);
MODEL dependent var(s) = independent var(s);
MEANS name(s) of categorical variable(s)/
[Post-Hoc-Test Hovtest];
Syntax Explained

 DATA specifies the dataset to be analyzed.
 CLASS tells SAS which variables are categorical.
 MODEL tells SAS what your IV(s) and DV(s) are.
DV=IV
 TEST allows you to test your own test effects.
(especially for repeated-measure design)
 OUTPUT allows you to output predicted and residual
values along with your original variables.
The Explanation Continues…

 MEANS tells SAS to compute means and SDs for
each level of the specified categorical variable.
 Can specify post-hoc tests such as Tukey (tukey) and
Scheffe (scheffe)
 Can test for Homogeneity of Variance (Hovtest)
Simple One-Way ANOVA with 3 Groups

 Open “SimpleOneWayANOVAp400.txt”

Proc GLM DATA = Data1;
CLASS Condition;
MODEL retention=condition;
Run;
SAS Output

 Interpreting the output.
ANOVA “Source Table”

 Total Sum of Squares (“Corrected Total”) = Within
SS (“Error”) + Between SS (“Model”); 233.87 +
535.60 = 769.47

 Mean Squareb = SSb/dfb, 233.87 /2 = 116.93
 Mean Squarew = SSw/dfw, 535.60 /27 = 19.84

 F-value = MSb/MSw = 116.93 / 19.84 = 5.89
..more source

 R-square (sometimes called η²)
= SSbetween/SStotal = 233.87 / 769.47 = .304.
   Estimates the population strength of association. (Hays p. 408)

 Power, Hays Eq 10.21.2 and, Table XII, Appendix F

SS between  ( J  1) MS within
 2

SS total  MS within

233.87  (3  1)19.84
 2
 .246
769.47  19.84
Presenting Results!
General guidelines.

 APA 6th pages 116-167.
 Should provide basic descriptive statistics either in
text or in a table.
   Typically is shown in a Mean, SD, and Correlation table.
More Guidelines

 Include enough information to allow reader to
understand analyses conducted.
   Single sample t-test? Paired-sample? Independent sample?
 Follow standard procedure for reporting:
 t(df)= tvalue, p < .01

 F(dfbetween, dfwithin)= Fvalue, p <.01

 F(dfbetween, dfwithin)= Fvalue, MSE= value, p <.01, ω²=
value.
T-Test Examples:
ANOVA Examples:

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 40 posted: 4/1/2012 language: Latin pages: 21