The One-Way Repeated-Measures ANOVA (For Within-Subjects Designs)
Logic of the Repeated-Measures ANOVA The repeated-measures ANOVA extends the analysis of variance to research situations using repeated-measures (or related-samples) research designs Much of the logic and many of the formulas for repeated-measures ANOVA are identical to the independent-measures analysis introduced in the previous lecture However, the repeated-measures ANOVA includes a second stage of analysis in which variability due to individual differences is subtracted out of the term.
Logic of the Repeated-Measures ANOVA The repeated-measures design eliminates individual differences from the between-treatments variability because the same subjects are used in every treatment condition. To balance the F-ratio, the calculations require that individual differences also be eliminated from the denominator of the F-ratio. The result is a test statistic similar to the independent-measures F-ratio but with all individual differences removed.
Comparing Independent-Measures & Repeated Measures ANOVAs The independent-measures analysis is used in research situations for which there is a separate sample for each treatment condition. The analysis compares the mean square (MS) between treatments to the mean square within treatments in the form of a ratio F MS MS between within treatment effect + (including individual diffs.) (including individual diffs.)
Comparing Independent-Measures & Repeated Measures ANOVAs In the repeated-measures study, there are no individual differences between treatments because the same individuals are tested in every treatment. This means that variability due to individual differences is not a component of the numerator of the F ratio. Therefore, the individual differences must also be removed from the denominator of the F ratio to maintain a balanced ratio with an expected value of 1.00 when there is no treatment effect.
Comparing Independent-Measures & Repeated Measures ANOVAs That is, we want the repeated-measures F-ratio to have the following structure: F treatment effect + random, unsystematic differences random, unsystematic differences
Logic of the Repeated-Measures ANOVA This is accomplished by a two-stage analysis. In the first stage, total variability (SS total ) is partitioned into variability between-treatments (SS between ) and within-treatments (SS within ). Individual differences do not appear in SS between because the same sample of subjects serves in every treatment. On the other hand, individual differences do play a role in SS total because the sample contains different subjects. In the second stage of the analysis, we measure the individual differences by computing the variability between subjects, or SS subjects This value is subtracted from SS within leaving a remainder, variability due to sampling, SS
Logic of the Repeated-Measures ANOVA Total Variance SS df SS SS total between within df df total between within SS df SS SS between total within df df between total within Between Treatments Variance SS df SS SS within total between df df within total between Within Treatments Variance SS df Between Subjects Variance SS SS subjects within df df subjects within Error Variance SS df SS SS within subjects df df within subjects
Computations for the Repeated-Measures ANOVA x x 2 Start by computing and for each group, then compute: Grand total: The overall total, computed over all scores in all groups (samples) x T Total sum of squared scores: The sum of squared scores computed over all scores in all groups x k i n j x ij k n 2 2 T xij i j
Computations for the Repeated-Measures ANOVA In addition, you will have to compute the sum of scores (across all k conditions) for each subject and/or the mean for each subject x subject k i x subject i M subject x k subject
Computations for the ANOVA: SS terms SS total : The sum of squared deviations of all observations from the grand mean or total SS x M x T 2 2 T x 2 T N SS SS SS total between within Not strictly needed for computing the F ratio, but it makes computing the needed SS terms much easier
Computations for the ANOVA: SS terms SS between : The sum of squared deviations of the sample means from the grand mean multiplied by the number of observations x xt 2 2 k k 2 i SSbetween nm i MT i i n N or SS between SS total SS within SS within : The sum of squared deviations within each sample k SSwithin SS j SS1 SS2... SS k j or SS SS SS within total between
Computations for the Repeated-Measures ANOVA SS subjects : The sum of squared deviations of the subject means from the grand mean multiplied by the number of conditions (k) SS subjects 2 2 x subject xt k M subject MT k N 2 SS : The sum of squared deviations due to sampling SS SS SS within subjects
Computations for the Repeated-Measures ANOVA df total = N-1 : degrees of freedom associated with SS total N is the total number of scores df between (df group ) = k-1 : degrees of freedom associated with SS between k is the number of groups df subjects = n-1 Degrees of freedom associated with SS subjects n is the number of subjects df = df total - df between -df subjects = N-k-n+1 : degrees of freedom associated with SS
Computing the F-statistic MS MS between SS df SS df between between F df between, df MS MS between
The Repeated-Measures ANOVA: Steps 1. State Hypotheses 2. Compute F-ratio statistic: F df between, df MS MS between For data in which I give you raw scores, you will have to compute: Sample means & subject means SS total, SS between, SS within, SS subjects, & SS df total, df between, df within, df subjects, & df 3. Use F-ratio distribution table to find critical F-value representing rejection region 4. Make a decision: does the F-statistic for your sample fall into the rejection region?
Repeated-Measures ANOVA: Example Does giving students a pedometer cause them to walk more? Measure their initial average daily number of steps over a week Follow up for 12 weeks x 1 : number of steps (in thousands) during week 1 x 2 : number of steps during week 6 x 3 : number of steps during week 12 Null Hypothesis H 0 : µ 1 = µ 2 = µ 3 Research Hypothesis H 1 : one of the population means is different Do we accept or reject the null hypothesis? Assume α = 0.05
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups subjects Total 112 1. Compute degrees of freedom df df df total between subjects within N 1 17 k 1 2 n1 5 df df df total df df df within between subjects 15 10
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups subjects Total 2. Compute SS between (or SS within ) directly between SS n M M 6 3 4 4 4 5 4 6 1 0 1 6(2) 12 T 2 2 2 2
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups Total subjects 3. Compute the missing top-level SS value (SS between or SS within ) via subtraction SS SS SS within total between 112 12 100
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups subjects Total 4. Compute SS subjects : SS k M M subjects subj T 2 3 8 4 5 4 5 4 2 4 1 4 3 4 3 16 11 4 9 1 3(32) 96 2 2 2 2 2 2
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups subjects Total 5. Compute SS by subtraction SS SS SS within subjects 100 96 4
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups Total subjects 6. Compute the MS values needed to compute the F ratio: MS between SSbetween 12 6.0 df 2 between MS SS 4 0. 4 df 10
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups subjects Total 7. Compute the F ratio: F df between, df F MS MS between 6.0 2,10 15.0 0.4
F table for α=0.05 reject H 0 df df numerator 1 2 3 4 5 6 7 8 9 10 1 161.45 199.50 215.71 224.58 230.16 233.99 236.77 238.88 240.54 241.88 2 18.51 19.00 19.16 19.25 19.30 19.33 19.35 19.37 19.38 19.40 3 10.13 9.55 9.28 9.12 9.01 8.94 8.89 8.85 8.81 8.79 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 6.00 5.96 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 4.77 4.74 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 4.10 4.06 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 3.68 3.64 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 3.39 3.35 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 3.18 3.14 10 4.96 4.10 3.71 3.48 3.33 3.22 3.14 3.07 3.02 2.98 11 4.84 3.98 3.59 3.36 3.20 3.09 3.01 2.95 2.90 2.85 12 4.75 3.89 3.49 3.26 3.11 3.00 2.91 2.85 2.80 2.75 13 4.67 3.81 3.41 3.18 3.03 2.92 2.83 2.77 2.71 2.67 14 4.60 3.74 3.34 3.11 2.96 2.85 2.76 2.70 2.65 2.60 15 4.54 3.68 3.29 3.06 2.90 2.79 2.71 2.64 2.59 2.54 16 4.49 3.63 3.24 3.01 2.85 2.74 2.66 2.59 2.54 2.49 17 4.45 3.59 3.20 2.96 2.81 2.70 2.61 2.55 2.49 2.45 18 4.41 3.55 3.16 2.93 2.77 2.66 2.58 2.51 2.46 2.41 19 4.38 3.52 3.13 2.90 2.74 2.63 2.54 2.48 2.42 2.38 20 4.35 3.49 3.10 2.87 2.71 2.60 2.51 2.45 2.39 2.35 22 4.30 3.44 3.05 2.82 2.66 2.55 2.46 2.40 2.34 2.30 24 4.26 3.40 3.01 2.78 2.62 2.51 2.42 2.36 2.30 2.25 26 4.23 3.37 2.98 2.74 2.59 2.47 2.39 2.32 2.27 2.22 28 4.20 3.34 2.95 2.71 2.56 2.45 2.36 2.29 2.24 2.19 30 4.17 3.32 2.92 2.69 2.53 2.42 2.33 2.27 2.21 2.16 40 4.08 3.23 2.84 2.61 2.45 2.34 2.25 2.18 2.12 2.08 50 4.03 3.18 2.79 2.56 2.40 2.29 2.20 2.13 2.07 2.03 60 4.00 3.15 2.76 2.53 2.37 2.25 2.17 2.10 2.04 1.99 120 3.92 3.07 2.68 2.45 2.29 2.18 2.09 2.02 1.96 1.91 200 3.89 3.04 2.65 2.42 2.26 2.14 2.06 1.98 1.93 1.88 500 3.86 3.01 2.62 2.39 2.23 2.12 2.03 1.96 1.90 1.85 1000 3.85 3.00 2.61 2.38 2.22 2.11 2.02 1.95 1.89 1.84
Thousands of Steps Student X1 X2 X3 M subj A 6 8 10 8 B 4 5 6 5 C 5 5 5 5 D 1 2 3 2 E 0 1 2 1 F 2 3 4 3 M group 3 4 5 SS 112 M 4 total T Set up a summary ANOVA table: Source df SS MS F Between groups Within groups subjects Total 8. Compare computed F statistic with F crit and make a decision F crit 4. 1 15 4.1, reject H 0
Effect Size for the Repeated-Measures ANOVA For repeated-measures ANOVAs, effect sizes are usually 2 indicated using partial eta-squared Partial eta-squared is like the eta-squared that we use to measure effect sizes in the independent-samples ANOVA, except that it removes the effect of between-subjects variability 2 variability explained by treatment effect p total variability (- subject variability) p For our example: 2 SSbetween SSbetween 12.0 SS SS SS SS 16. 0 total subject between 0.75
Post hoc test: Example (Fisher s LSD) Repeated-Measures ANOVA ANOVA Summary Table Source df SS MS F Between groups 2 12 6.0 15.0 Within groups 15 100 subjects 5 96 10 4 0.4 Total 17 112 Let s do all possible comparisons: {1,2},{1,3},{2,3} M M M n 1 2 3 3 4 5 n n 1 2 3 6 t-statistic for Fisher s LSD test when comparing {A,B}: Again, note that the denominator is the same for all comparisons: t df M M M A M MS MS 2MS n n n A B B t 10 M M M M 2 0.4 0.365 A B A B 6
t-distribution Table α t One-tailed test α/2 α/2 -t t Two-tailed test Level of significance for one-tailed test 0.25 0.2 0.15 0.1 0.05 0.025 0.01 0.005 0.0005 Level of significance for two-tailed test df 0.5 0.4 0.3 0.2 0.1 0.05 0.02 0.01 0.001 1 1.000 1.376 1.963 3.078 6.314 12.706 31.821 63.657 636.619 2 0.816 1.061 1.386 1.886 2.920 4.303 6.965 9.925 31.599 3 0.765 0.978 1.250 1.638 2.353 3.182 4.541 5.841 12.924 4 0.741 0.941 1.190 1.533 2.132 2.776 3.747 4.604 8.610 5 0.727 0.920 1.156 1.476 2.015 2.571 3.365 4.032 6.869 6 0.718 0.906 1.134 1.440 1.943 2.447 3.143 3.707 5.959 7 0.711 0.896 1.119 1.415 1.895 2.365 2.998 3.499 5.408 8 0.706 0.889 1.108 1.397 1.860 2.306 2.896 3.355 5.041 9 0.703 0.883 1.100 1.383 1.833 2.262 2.821 3.250 4.781 10 0.700 0.879 1.093 1.372 1.812 2.228 2.764 3.169 4.587 11 0.697 0.876 1.088 1.363 1.796 2.201 2.718 3.106 4.437 12 0.695 0.873 1.083 1.356 1.782 2.179 2.681 3.055 4.318 13 0.694 0.870 1.079 1.350 1.771 2.160 2.650 3.012 4.221 14 0.692 0.868 1.076 1.345 1.761 2.145 2.624 2.977 4.140 15 0.691 0.866 1.074 1.341 1.753 2.131 2.602 2.947 4.073 16 0.690 0.865 1.071 1.337 1.746 2.120 2.583 2.921 4.015 17 0.689 0.863 1.069 1.333 1.740 2.110 2.567 2.898 3.965 18 0.688 0.862 1.067 1.330 1.734 2.101 2.552 2.878 3.922 19 0.688 0.861 1.066 1.328 1.729 2.093 2.539 2.861 3.883 20 0.687 0.860 1.064 1.325 1.725 2.086 2.528 2.845 3.850 21 0.686 0.859 1.063 1.323 1.721 2.080 2.518 2.831 3.819 22 0.686 0.858 1.061 1.321 1.717 2.074 2.508 2.819 3.792 23 0.685 0.858 1.060 1.319 1.714 2.069 2.500 2.807 3.768 24 0.685 0.857 1.059 1.318 1.711 2.064 2.492 2.797 3.745 25 0.684 0.856 1.058 1.316 1.708 2.060 2.485 2.787 3.725 26 0.684 0.856 1.058 1.315 1.706 2.056 2.479 2.779 3.707 27 0.684 0.855 1.057 1.314 1.703 2.052 2.473 2.771 3.690 28 0.683 0.855 1.056 1.313 1.701 2.048 2.467 2.763 3.674 29 0.683 0.854 1.055 1.311 1.699 2.045 2.462 2.756 3.659 30 0.683 0.854 1.055 1.310 1.697 2.042 2.457 2.750 3.646 40 0.681 0.851 1.050 1.303 1.684 2.021 2.423 2.704 3.551 50 0.679 0.849 1.047 1.299 1.676 2.009 2.403 2.678 3.496 100 0.677 0.845 1.042 1.290 1.660 1.984 2.364 2.626 3.390
Post hoc tests: Example (Fisher s LSD) M M M 1 2 3 tcrit 3 4 5 2.228 Apply the t-test formula to all comparisons: {1,2} {1,3} {2,3} t M M 0.365 3 4 0.365 1 2.74 0.365 1 2 10 t M M 0.365 3 5 0.365 2 5.48 0.365 1 3 10 t M M 0.365 4 5 0.365 1 2.74 0.365 2 3 10