Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Repeated Measures ANOVA in Advanced Psychological Statistics - Prof. Michael D. Byrne, Study notes of Psychology

The topic of repeated measures anova in advanced psychological statistics i course, including orthonormalized contrasts, factorial repeated measures, linear model, null hypotheses, f-ratios, and mixed designs. It includes examples, spss code, and output.

Typology: Study notes

Pre 2010

Uploaded on 08/16/2009

koofers-user-1ga
koofers-user-1ga 🇺🇸

10 documents

1 / 24

Toggle sidebar

Related documents


Partial preview of the text

Download Repeated Measures ANOVA in Advanced Psychological Statistics - Prof. Michael D. Byrne and more Study notes Psychology in PDF only on Docsity! 1 Repeated Measures ANOVA 2 Advanced Psychological Statistics I Psychology 502 November 20, 2007 2 Overview ! Questions? ! One last thing for single-factor " Orthonormalized contrasts ! Multiple within-subjects factors " Basics " Doing this in SPSS " Simple main effects ! Mixed between- and within-subjects designs " Basic ideas " Interaction issues 3 Orthonormalized Contrasts ! Remember with between-subjects ANOVA how we could partition the sum of squares between with orthogonal contrasts? " Why was this important? ! How does that work for repeated measures? ! Let!s look at contrasts generated by SPSS vs. those we generate ourselves " GLM d1 d2 d3 /WSFACTOR day 3. " GLM d1 d2 d3 /WSFACTOR day 3 SPECIAL(1 1 1 -1 0 1 1 -2 1). 4 Adding Things Up ! SPSS-generated contrasts: Tests of Within-Subjects Effects Measure: MEASURE_1 33.250 2 16.625 13.896 .000 33.250 1.498 22.189 13.896 .002 33.250 1.816 18.315 13.896 .001 33.250 1.000 33.250 13.896 .007 16.750 14 1.196 16.750 10.489 1.597 16.750 12.709 1.318 16.750 7.000 2.393 Spherici ty Assumed Greenhouse-Geisser Huynh-Feldt Lower- boun d Spherici ty Assumed Greenhouse-Geisser Huynh-Feldt Lower- boun d Source DAY Error(D AY) Type II I Sum of Squares df Mean Square F Sig. Tests of Within-Subjects Contrasts Measure: MEASURE_1 30.250 1 30.250 56.467 .000 3.000 1 3.000 1.615 .244 3.750 7 .536 13.000 7 1.857 DAY Linear Quadratic Linear Quadratic Source DAY Error(D AY) Type III Sum of Squares df Mean Square F Sig. 9 Factorial Repeated Measures ! Same basic idea as factorial between-subjects ANOVA: " Multiple independent variables " Two or more levels on each # Multiple main effects # Interactions ! But this time: " Each subject is tested on all levels of all factors " Presumably, this is randomized or some other kind of control for order effects is put into place 10 Linear Model ! Many old terms same as before " µ is grand mean, xijk is individual observation, !i is effect of being subject i, eijk random error " "j is effect of being in level j of factor A, #k is effect of being in level k of factor B, "#jk is interaction ! What!s new? " Interactions of subject and effect terms ! Usual assumptions apply " Subject interactions mean of zero, normal " Random error mean of zero, normal xijk = µ + ! i + " j + #k + "# jk + !"ij + !# ik + !a#ijk + eijk 11 Null Hypotheses ! Main effect of A (all "j = 0) ! Main effect of B (all #k = 0) ! Main effect of Subjects (all !i = 0) ! Interaction of A and B (all "#jk = 0) ! Interaction of A and Subjects (all !"ij = 0) ! Interaction of B and Subjects (all !#ik = 0) ! Interaction of A, B, and Subjects (all !"#ijk = 0) ! We won!t be able to test all of them 12 Sums of Squares ! Same basic ideas apply " Squared deviations from marginal means " Interaction cells adjust for marginals SSA = nK (x• j• !" x ) 2 SStotal = (xijk ! x ) 2 """ SS B = nJ (x••k ! x ) 2 " SS BxS = K (x i•k ! x ••k ! x i•• + x ) 2 "" 13 Degrees of Freedom ! Total degrees of freedom is: " nJK - 1 ! A has J levels, therefore J - 1 ! B has K levels, therefore K - 1 ! Subjects has n levels, therefore n - 1 ! AxB interaction has (J - 1)(K - 1) ! AxS interaction has (J - 1)(n - 1) ! BxS interaction has (K - 1)(n - 1) ! AxBxS interaction has (J - 1)(K - 1)(n - 1) ! As usual, can form mean squares by taking sum of squares and dividing by degrees of freedom 14 Expected Mean Squares ! Again, no MSE ! Form F-ratios by finding appropriate error term for each effect E(MS S ) = ! e 2 + JK! S 2 E(MS A ) = ! e 2 + K! AxS 2 + nK! A 2 E(MS AxS ) = ! e 2 + K! AxS 2 E(MS B ) = ! e 2 + J! BxS 2 + nJ! B 2 E(MS BxS ) = ! e 2 + J! BxS 2 E(MS AxB ) = ! e 2 + ! AxBxS 2 + n! AxB 2 E(MS AxBxS ) = ! e 2 + ! AxBxS 2 19 SPSS Output 1: Check Levels! ! SPSS gives you a fighting chance to make sure your WSFACTOR statement is correct Within-Subjects Factors Measure: MEASURE_1 T1D1 T1D2 T1D3 T2D1 T2D2 T2D3 DOSE 1 2 3 1 2 3 DRUG 1 2 Dependent Variable 20 Mauchly's Test of Sphericityb Measure: MEASURE_1 1.000 .000 0 . 1.000 1.000 1.000 .804 3.055 2 .217 .836 .929 .500 .654 5.940 2 .051 .743 .806 .500 Within Subjects Effect DRUG DOSE DRUG * DOSE Mauchly's W Approx. Chi-Square df Sig. Greenhous e-Geisser Huynh-Feldt Lower- bound Epsilon a Tests the null hypothesis that the error covariance matrix of the orthonor malized transformed dependent variables is proportional to an identity matrix. May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the Tests of Within-Subjects Effects table. a. Design: Intercept Within Subjects Design: DRUG+DOSE+DRUG*DOSE b. SPSS Output 2: Sphericity ! Why is epsilon for Drug exactly 1.0? 21 SPSS Output 3: Omnibus F Tests of Within-Subjects Effects Measure: MEASURE_1 348 .844 1 348.844 7.454 .015 348 .844 1.000 348.844 7.454 .015 348 .844 1.000 348.844 7.454 .015 348 .844 1.000 348.844 7.454 .015 701 .990 15 46.799 701 .990 15.000 46.799 701 .990 15.000 46.799 701 .990 15.000 46.799 758 .771 2 379.385 34.155 .000 758 .771 1.672 453.768 34.155 .000 758 .771 1.857 408.523 34.155 .000 758 .771 1.000 758.771 34.155 .000 333 .229 30 11.108 333 .229 25.082 13.285 333 .229 27.860 11.961 333 .229 15.000 22.215 12.063 2 6.031 .689 .510 12.063 1.486 8.117 .689 .471 12.063 1.612 7.485 .689 .482 12.063 1.000 12.063 .689 .420 262 .604 30 8.753 262 .604 22.292 11.780 262 .604 24.174 10.863 262 .604 15.000 17.507 Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Source DRUG Error(DRUG) DOSE Error(DOSE) DRUG * DOSE Error(DRUG*DOSE) Type III Sum of Squares df Mean Square F Sig. 22 SPSS Output 4: Trend Analysis Tests of Within-Subjects Co ntrasts Measure: MEASURE_1 348.844 1 348.844 7.454 .015 701.990 15 46.799 756.250 1 756.250 47.713 .000 2.521 1 2.521 .396 .539 237.750 15 15.850 95.479 15 6.365 6.250E-02 1 6.250E-02 .008 .930 12.000 1 12.000 1.253 .281 118.938 15 7.929 143.667 15 9.578 DOSE Linear Quadratic Linear Quadratic Linear Quadratic Linear Quadratic DRUG Linear Linear Linear Linear Source DRUG Error(DRUG) DOSE Error(DOSE) DRUG * DOSE Error(DRUG*DOSE) Type III Sum of Squares df Mean Square F Sig. ! What!s actually being tested in the Drug by Dose Linear/Linear contrast? 23 Contrasts ! Another way to form contrasts is to create new variables ! Contrasts on dose: " Linear: -1 0 1, Quadratic: 1 -2 1 ! Compute the new variables: " COMPUTE linear = -t1d1 - t2d1 + t1d3 + t2d3. COMPUTE quad = t1d1 + t2d1 - 2*t1d2 - 2*t2d2 + t1d3 + t2d3. ! Run the t-tests " TTEST /VAR linear quad /TESTVAL 0. 24 Contrast Results ! Not a big surprise given what we already saw ! Note that you can also build interaction contrasts One-Sample Test 6.907 15 .000 13.7500 9.5071 17.993 .629 15 .539 1.3750 ****** 6.0321 LINEAR QUAD t df Sig. (2-tailed) Mean Difference Lower Upper 95% Confidence Interval of the Difference Test Value = 0 29 Simple Main Effects ! Still fraught with all the same kinds of problems as simple main effects for between-subjects ANOVA " Loss of power " May not aid in interpretation # All reliable # None reliable " Still trying to accept the null ! But occasionally still useful 30 Mixing Between-subjects and Within-subjects ! It is possible to have designs with both between- subjects and within-subjects designs " Often called “mixed” designs " Could have multiple between-subjects factors ! How do these work together? " Consider a four-way design where A and B are between- subjects factors and C and D are within-subjects ! Between-subjects factors ignore the repeated measures " For each subject, take the average across all repeated conditions " Do a between-subjects ANOVA on that " Single error term (MSE) for all between-subjects main effects and all interactions that are entirely between- subjects 31 Mixed Designs ! Within-subjects factors operate normally " Main effect of D tested against SxD interaction " CxD interaction tested against SxCxD interaction ! The only tricky bit: Interactions involving between and within factors (e.g., BxC) " Tested against the within-subjects error term " Thus, BxC interaction tested against SxC interaction 32 Example ! GLM statement now includes a between-subjects variable " GLM t1d1 TO t2d3 BY group /WSFACTOR drug 2, dose 3. ! Still produces the levels report, adds info for between- subjects factor(s): Within-Subjects Factors Measure: MEASURE_1 T1D1 T1D2 T1D3 T2D1 T2D2 T2D3 DOSE 1 2 3 1 2 3 DRUG 1 2 Dependent Variable Between-Subjects Factors 8 8 1 2 GROUP N 33 SPSS Output: Sphericity ! Still get the sphericity report: Mauchly's Test of Sphericityb Measure: MEASURE_1 1.000 .000 0 . 1.000 1.000 1.000 .862 1.932 2 .381 .879 1.000 .500 .630 6.014 2 .049 .730 .851 .500 Within Subjects Effect DRUG DOSE DRUG * DOSE Mauchly's W Approx. Chi-Square df Sig. Greenhous e-Geisser Huynh-Feldt Lower- bound Epsilon a Tests the null hypothesis that the error covariance matrix of the orthonor malized transformed dependent variables is proportional to an identity matrix. May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the Tests of Within-Subjects Effects table. a. Design: Intercept+GROUP Within Subjects Design: DRUG+DOSE+DRUG*DOSE b. ! Note that it!s not quite the same as before 34 SPSS Output: Within-subjects effects and interactions Tests of Within-Subjects Effects Measure: MEASURE_1 348.844 1 348.844 13.001 .003 348.844 1.000 348.844 13.001 .003 348.844 1.000 348.844 13.001 .003 348.844 1.000 348.844 13.001 .003 326.344 1 326.344 12.163 .004 326.344 1.000 326.344 12.163 .004 326.344 1.000 326.344 12.163 .004 326.344 1.000 326.344 12.163 .004 375.646 14 26.832 375.646 14.000 26.832 375.646 14.000 26.832 375.646 14.000 26.832 758.771 2 379.385 36.510 .000 758.771 1.757 431.768 36.510 .000 758.771 2.000 379.385 36.510 .000 758.771 1.000 758.771 36.510 .000 42.271 2 21.135 2.034 .150 42.271 1.757 24.054 2.034 .156 42.271 2.000 21.135 2.034 .150 42.271 1.000 42.271 2.034 .176 290.958 28 10.391 290.958 24.603 11.826 290.958 28.000 10.391 290.958 14.000 20.783 12.063 2 6.031 .682 .514 12.063 1.459 8.265 .682 .472 12.063 1.703 7.085 .682 .493 12.063 1.000 12.063 .682 .423 14.812 2 7.406 .837 .444 14.812 1.459 10.149 .837 .413 14.812 1.703 8.700 .837 .428 14.812 1.000 14.812 .837 .376 247.792 28 8.850 247.792 20.432 12.127 247.792 23.836 10.396 247.792 14.000 17.699 Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Spher icity Assumed Greenhouse-Geisser Huynh-Feldt Lower-bound Source DRUG DRUG * GROUP Error(DRUG) DOSE DOSE * G ROUP Error(DOSE) DRUG * DOSE DRUG * DOSE * GROUP Error(DRUG*DOSE) Type III Sum of Squares df Mean Square F Sig. 39 Mixed Simple Main Effects ! Let!s say we have a 3-way ANOVA where A and B are within-subjects, and C is between-subjects " Variables A1B1 A2B1 A3B1 A1B2 A2B2 A3B2 A1B3 A2B3 A3B3 " C also has three levels ! How do we decompose that into simple main effects? " Two ways: look for effects of A at levels of C " Look for effects of C at levels of A ! Works somewhat differently depending on how you!re splitting things 40 Splitting Between Subjects ! Look for effects of A at levels of C ! Since C is between-subjects, then we simply repeat the same GLM once for each level of C: " TEMPORARY. SELECT IF (c EQ 1). GLM a1b1 a2b1 a3b1 a1b2 a2b2 a3b2 a1b3 a2b3 a3b3 /WSFACTOR b 3, a 3. " TEMPORARY. SELECT IF (c EQ 2). GLM a1b1 a2b1 a3b1 a1b2 a2b2 a3b2 a1b3 a2b3 a3b3 /WSFACTOR b 3, a 3. " And so on for each level of C ! Variable B is still in there, but we!re not looking for it ! So, what are we looking for? " Effect of A at one level of C and not at the other 41 Splitting Within Subjects ! Look for effects of C at levels of A ! Three repeated-measures one-ways ! Effects of C at level 1 of A: " GLM a1b1 a1b2 a1b3 BY c /WSFACTOR b 3; ! Effect of C at level 2 of A: " GLM a2b1 a2b2 a2b3 BY c /WSFACTOR b 3; ! Effects of C at level 3 of A: " GLM a3b1 a3b2 a3b3 BY c /WSFACTOR b 3; ! Again, B is a nuisance variable ! Looking for effects of C in some places and not others 42 Mixed Interaction Contrasts ! Somewhat more complex that either fully-within or fully- between case ! The basic idea: " Form a new variable for your within-subjects contrast " Use that new variable in a between-subjects ANOVA, and put your contrast on the between-subjects variable there C1 C2 C3 Contrast on A is (1 -2 1) Contrast on C is (1 -1 -2) 43 Doing the Interaction Contrast ! Form a new variable representing (1 -2 1) on A " Easiest way: # Form new variables representing the levels of A # Then form a variable for the contrast # COMPUTE a1 = MEAN(a1b1, a1b2, a1b3). COMPUTE a2 = MEAN(a2b1, a2b2, a2b3). COMPUTE a3 = MEAN(a3b1, a3b2, a3b3). COMPUTE aquad = a1 - 2*a2 + a3. EXECUTE. ! Now, do an ANOVA with C as independent and do the contrast on C " UNIANOVA aquad BY c /CONTRAST(c) = SPECIAL(1 1 -2). ! Questions? 44 Factorial ANOVA Redux ! First, if you have specific hypotheses (that is, ones which can be captured by contrasts), test just those " Regardless of whether they!re main effects or interactions " Bonferroni adjustments may be appropriate " If you find nothing here, then I suggest hunting with Scheffé ! If you don!t have specific hypotheses, then just run the overall ANOVA " What effects are reliable? " Often advisable to look at main effects only after considering interactions # Depends on pattern
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved