Monday, August 5, 2013

Stats: Repeated Measures ANOVA


Last time we looked at how to do an independent ANOVA, today we look at the (one-way) repeated measures ANOVA. This examines whether the means of 2 or more related samples (i.e., using the same people) are significantly different. An example might be a pretest, immediate posttest, and a posttest 6 mon. later. Our research question is – are the means for the 3 times significantly different from each other? The independent variable is time (pretest, immediate posttest, 6 mon posttest), the dependent variable is the scores on a test. Our null hypothesis is that there will be no difference between the time periods. An important point: our ANOVA will only tell us if there is a significant difference present, it will NOT tell us, which groups are different from each other. To find this out, we will need to post hoc tests (more on this later). Let's do an example together. So open SPSS and enter the following data for your samples: 

Under Variable view (see tab at bottom of page), It should look like: 

Name
Type
Width
Decimals
Label
Values
Ignore the rest
prettest
numeric
8
0
Pretest
None
Ignore the rest
posttest1
numeric
8
0
Immediate Posttest
None
 
posttest2
numeric
8
0
6mon Posttest
None
Ignore the rest

 Go back to Data View and enter the following: 

Pretest
Immediate Posttest
6mon Posttest
3
6
9
5
8
3
2
5
5
4
9
7
1
6
4

 Go to Analyze/ General Linear Model/ Repeated Measures. For the first screen (Within Subject Factor) write in Time where says Factor 1, give it 3 levels. Press Define. Move all of your variables into Within Subjects Variables box. Press Options and the Descriptive statistics and Estimates of effect size boxes in the area labeled display. Request post hoc tests by selecting Time in the Factor and Factor Interactions sections and moving it in Display Means box. Tick compare main effects. In the Confidence interval adjustment section, click on the down arrow and choose the option Bonferroni. Press continue and ok. 

You will get a lot of tables for this- we are only going to use the following: 

Descriptive Statistics
 
Mean
Std. Deviation
N
Pretest
3.00
1.581
5
Immediate Posttest
6.80
1.643
5
6mon Posttest
5.60
2.408
5

 
Multivariate Testsa
Effect
Value
F
Hypothesis df
Error df
Sig.
Partial Eta Squared
time
Pillai's Trace
.939
22.971b
2.000
3.000
.015
.939
Wilks' Lambda
.061
22.971b
2.000
3.000
.015
.939
Hotelling's Trace
15.314
22.971b
2.000
3.000
.015
.939
Roy's Largest Root
15.314
22.971b
2.000
3.000
.015
.939
a. Design:  Within Subjects Design: time
b. Exact statistic

 
Pairwise Comparisons
Measure: MEASURE_1
(I) time
(J) time
Mean Difference (I-J)
Std. Error
Sig.b
95% Confidence Interval for Differenceb
Lower Bound
Upper Bound
1
2
-3.800*
.490
.004
-5.740
-1.860
3
-2.600
1.288
.341
-7.703
2.503
2
1
3.800*
.490
.004
1.860
5.740
3
1.200
1.319
1.000
-4.025
6.425
3
1
2.600
1.288
.341
-2.503
7.703
2
-1.200
1.319
1.000
-6.425
4.025
Based on estimated marginal means
*. The mean difference is significant at the .05 level.
b. Adjustment for multiple comparisons: Bonferroni.

What does this mean? There is a significant difference between the 3 times (see where I marked in yellow above). This does not tell you which groups are different from each other, to find this out we did Bonferroni post hoc tests and found that the pretest varied significantly from the immediate posttest (see data marked in yellow above), no other groups differed. So let's write it up as you would in your paper: 

A repeated measures ANOVA was conducted to compare scores at the pretest (M = 3.0; SD = 1.58), immediate posttest (M = 6.8; SD = 1.6), and the 6 mon posttest (M = 5.6; SE = 2.4). The results (Wilks' Lambda = .061. F(2, 3) =22.97, p= .015, multivariate eta squared = .939 [large effect]) indicates that there is a significant difference between the time periods and the null hypothesis is rejected. Bonferroni post hoc tests examined which groups differed. It was found that only the pretest and immediate posttest scores differed (p< .05). 

A great resource for SPSS is

Pallant, J. (2013). The SPSS Survival Manual, 5th edition. Open University Press. 

We have examined the most common (and easy to explain in a blog) statistical tests. Next time, we will take a look at anxiety and the dissertation. Do you have an issue or a question that you would like me to discuss in a future post? Send me an email with your ideas. leann.stadtlander@waldenu.edu 

Friday, August 2, 2013

Stats: Independent ANOVA


 
Last time we looked at how to do a correlational analysis, today we look at the independent ANOVA. This examines whether the means of 2 or more separate samples are significantly different. An example might be a control group vs. a group with intervention A vs. a group with intervention B. Our research question is – are the means for the 3 groups significantly different from each other? The independent variable is condition (control, group A or group B), the dependent variable is the scores on a test. Our null hypothesis is that there will be no difference between the groups. An important point: our ANOVA will only tell us if there is a significant difference present, it will NOT tell us, which groups are different from each other. To find this out, we will need to post hoc tests (more on this later). Let's do an example together. So open SPSS and enter the following data for your samples:

Under Variable view (see tab at bottom of page). It should look like: 

Name
Type
Width
Decimals
Label
Values
Ignore the rest
Condition
numeric
8
0
Condition
*(see below)
Ignore the rest
score
numeric
8
0
Score
None
Ignore the rest

 *For condition, labels: 1= control; 2 = group A, 3 = group B 

Go back to Data View and enter the following: 

Condition
Score
1
5
1
3
1
7
1
2
1
6
2
6
2
7
2
9
2
10
2
8
3
4
3
8
3
7
3
9
3
5

Go to Analyze/ General Linear Model/ Univariate. Move your score variable into Dependent Variable. Move condition into Fixed Factors. Go to Post Hoc (button on right side of variable screen), move condition into right box for post hoc tests. For now, choose Tukey's test (note, there are many different post hoc tests, check a stats book or the SPSS book listed below to choose the correct one for your data). Press continue to return to the variable screen. Go to Options, move Overall and condition to right to display means. Also, check descriptive statistics. Press continue to return to the variable screen. Press ok. 

Your results should look like the following:
 
Descriptive Statistics
Dependent Variable: Score
Condition
Mean
Std. Deviation
N
control
4.60
2.074
5
group A
8.00
1.581
5
group B
6.60
2.074
5
Total
6.40
2.293
15
 
Tests of Between-Subjects Effects
Dependent Variable: Score
Source
Type III Sum of Squares
df
Mean Square
F
Sig.
Corrected Model
29.200a
2
14.600
3.946
.048
 
614.400
1
614.400
166.054
.000
condition
29.200
2
14.600
3.946
.048
Error
44.400
12
3.700
 
 
Total
688.000
15
 
 
 
Corrected Total
73.600
14
 
 
 
a. R Squared = .397 (Adjusted R Squared = .296)
 
Multiple Comparisons
Dependent Variable: Score
 Tukey HSD
(I) Condition
(J) Condition
Mean Difference (I-J)
Std. Error
Sig.
95% Confidence Interval
Lower Bound
Upper Bound
control
group A
-3.40*
1.217
.040
-6.65
-.15
group B
-2.00
1.217
.266
-5.25
1.25
group A
control
3.40*
1.217
.040
.15
6.65
group B
1.40
1.217
.503
-1.85
4.65
group B
control
2.00
1.217
.266
-1.25
5.25
group A
-1.40
1.217
.503
-4.65
1.85
Based on observed means.
 The error term is Mean Square(Error) = 3.700.
* The mean difference is significant at the .05 level.
 
What does this mean? There is a significant difference between the 3 groups (see where I marked in blue above). This does not tell which groups are different from each other, to find this out we did Tukey's post hoc tests and found that the control varied significantly from group A (see data marked in yellow above), no other groups differed. So let's write it up as you would in your paper: 

An independent ANOVA was conducted comparing the control group (M = 4.6; SE = .86) to group A (M = 8.0; SE = .86) and group B (M = 6.6; SE = .86). The result (F(2, 12) =3.95, p= .048) indicates that there is a significant difference between the groups and the null hypothesis is rejected. Tukey's post hoc tests examined which groups differed. It was found that only the control group and group A differed (p< .05).

A great resource for SPSS is
Pallant, J. (2013). The SPSS Survival Manual, 5th edition. Open University Press. 

Next time, we will look at repeated measures ANOVA. Do you have an issue or a question that you would like me to discuss in a future post? Send me an email with your ideas. leann.stadtlander@waldenu.edu