spss and anova
TRANSCRIPT
-
8/8/2019 SPSS and Anova
1/25
1
SPSS
t-test and ANOVA
By the end of this lecture you shouldunderstand
Carrying out a t-test
Why we need ANOVA
Entering data and running a 1-way ANOVA
Interpreting a 1-way ANOVA
H0 : =
2
Basic Stats. RevisionH0 : =
Assumptions and requirements
All data are independent (no data point canappear twice) (APPLIES TO ALL TESTS)
Variances must be homogenous (can be fixedusing transformations)
For ANOVA and t tests the assumption of anormal distribution of the data is least importantand can effectively be ignored
-
8/8/2019 SPSS and Anova
2/25
3
Errors
Null Hyp. True
Null Hyp. False
Accept Reject
Type I errorby conventionp(type I) =
= 0.05
Type II error
p (type II) =
H0 : =
4
Comparing 2 means (t test), robust, reliable.
A t-test
A B
H0 : =
-
8/8/2019 SPSS and Anova
3/25
5
A Basic t-testH0 : =
Investigation into group size in kangaroos. Theliterature says that the average group size is 10
Model: You are testing the model that yourgroup is representative of other studies
Hypothesis is that your mean is statistically notdifferent from 10
Collect data from 25 groups
6
A Basic t-testH0 : =
2 ways of doing this
1. Excel using the formula, with n-1 degrees offreedom
-
8/8/2019 SPSS and Anova
4/25
7
A Basic t-testH0 : =
8
A Basic t-testH0 : =
Use a statistical programme
Good example is SPSS
Is NOT a spreadsheet
1. copy and paste data into cells, then namecells
-
8/8/2019 SPSS and Anova
5/25
9
10
Then double click on
var00001
-
8/8/2019 SPSS and Anova
6/25
11
Code Label(will appear in print-outs) Grouping
12
-
8/8/2019 SPSS and Anova
7/25
13
14
Mean is significantly less than10, t24 = 9.28, P < 0.001
-
8/8/2019 SPSS and Anova
8/25
15
A Basic t-testH0 : =
2-sample t-test to compare 2 means
Model: You are testing the model that yourgroups are different from another 20 groups fromdifferent habitats
Hypothesis is that the average group size differsbetween groups seen in area A ) (bush) and areaB (grass
Collect data from 20 groups in each habitat
16
Need to code the groups
-
8/8/2019 SPSS and Anova
9/25
17
18
-
8/8/2019 SPSS and Anova
10/25
19
So, the mean size of groups of kangaroos ineach habitat was not significantly differentt38 = 0.662, NS
P > 0.05
20
ANOVA
By the end of this lecture you shouldunderstand
Why we need ANOVA
Entering data and running a 1-way ANOVA
Interpreting a 1-way ANOVA
Entering data and running a 2 wayorthogonal ANOVA
Interpretation of such an ANOVA
H0 : =
-
8/8/2019 SPSS and Anova
11/25
21
Basic Stats. RevisionH0 : =
Assumptions and requirements
All data are independent (no data point canappear twice) (APPLIES TO ALL TESTS)
Variances must be homogenous (can be fixedusing transformations)
For ANOVA and t tests the assumption of anormal distribution of the data is least importantand can effectively be ignored
22
Comparing 2 means (t test), robust, reliable.
What happens for 3 levels of a treatment,e.g. 3 diets affecting growth of shrimps?
t tests look for differences in treatmentmeans, consider overlap of tails
Why ANOVA?
A B
H0 : =
-
8/8/2019 SPSS and Anova
12/25
23
3 means, now have 11 possible tails......OW!
Instead of using 1 test, could use 3 tests
A vs B, A vs C, and B vs C
This approach... 2 problems...
1. Problems of independence
2. Increased probability of type I error (on 3tests rises to 0.14 from 0.05)
Can get round pt 2 by corrections(Bonferroni), but this increases probability oftype II error and gives reduced power
t testsH0 : =
24
ANOVA
Can use an ANOVA for >2 means
Allows development of complex designs
H0 : =
-
8/8/2019 SPSS and Anova
13/25
25
Language Break!
Response variable: the thing you are measuringMost people think in terms of treatment(s)
Clumsy and ambiguous term
Example.... To investigate the effect of growthenhancers on the cattle.
Treatment (T) effect:Diet
T1 = normal dietT2 = diet + xT3 = diet + 2x
Factor: Diet3 Levels
L1 = normal dietL2 = diet + xL3 = diet + 2x
H0 : =
26
1-way ANOVA on SPSS
Model: Temperature controls themetamorphosis rate of barnacles cyprids
Hypothesis: If temperature increases, timetaken for metamorphosis is reduced (H1:
time at high T0C < time at medium T0C 0.31.1397.332194.7Ve x Di> 0.50.6959.112118.2Disturbance Di
< 0.00152.904556.2514556.3Vegetation Ve
PFMSdfSSSource
Effect of Vegetation Type on Success Rates of Foraging Kestrels
Vegetation
Grass Complex
SuccessR
ates(Killsperday)
0
5
10
15
20
25
30
35
40
High Dist
Med Dist
Low dist
Interpret?
44
2-way Factorial ANOVA : SPSS
Too simplistic?
Madeitup, I (1989) redid the experiment
Kestrels 2 data set,
-
8/8/2019 SPSS and Anova
23/25
45
3613269.0Total
97.63302928.8Residual
< 0.017.15697.8621395.7Ve x Di
< 0.054.3420.192840.4Disturbance Di
< 0.018.71850.691850.7Vegetation Ve
PFMSdfSSSource
2-way Factorial ANOVA : SPSS
46
Effect of Vegetation Type on Success Rates of Foraging Kestrels
Vegetation
Grass Complex
SuccessRates(Killsperday)
0
5
10
15
20
25
30
low Dist
Med Dist
High dist
-
8/8/2019 SPSS and Anova
24/25
47
2-way Factorial ANOVA on
SPSSWhat have I missed?
Assumptions of independence.. DESIGN
Assumptions of Homogeneity of Variance..Test data
stat, ANOVA, Homogeneity of Variance
use Levenes test?
H0 : =
48
Homogeneity of Variance
Do ANOVAand Interpret
Non SignificantResult
YesDo ANOVAand interpret
ANOVA NSAbsolutely Fine
YesProbably OK
NoInterpret with
caution, treat as pilot
Design Large?N > 30, a > 6
ANOVA Sig.
NoDo ANOVA
Fixed Problemof heterogeneity?
Transform Dataand re-test
SignificantResult
Test Homogeneity ofVariance
-
8/8/2019 SPSS and Anova
25/25
49
Summary and survival guide
ANOVA is more powerful in terms of flexibility data must be independent
variances must be homogeneous
Normality is not important
Nearly all biological hypotheses are aboutinteractions... Know what that means!
SPSS is useful for general purposes
All detailed in your refs + Dytham, C. (1999)
Choosing and using statistics. Blackwell. (note heis wrong about assumptions of normality.. Ignore it!)