Upload
roberta-payne
View
222
Download
2
Embed Size (px)
Citation preview
Robust Between Groups Factorial and Robust RM
Brief examples
Robustitude
• As in most statistical situations there would be a more robust method for going about factorial anova
• Instead of using means, we might prefer trimmed means or medians so as to have tests based on estimates not so heavily influenced by outliers.
• And, there’s nothing to it.
Between subjects factorial using trimmed means
Main effects
Interaction
Robustitude
• Or using R you type in something along the lines of – t2way(A, B, x, grp=c(1:p), tr=.2, alpha=.05)*
• Again, don’t be afraid to try robust methods as they are often easily implemented with appropriate software.
Robust Repeated Measure
Robust RM
• One can perform robust procedures for repeated measures designs
• Consider our previous dataset regarding stress and test taking
• I changed the values for the first subject to create an outlier case– This person was stressed before
and after but not the week of the exam
Before During After36.00 15.00 35.0034.00 33.00 22.0026.00 28.00 25.0030.00 33.00 17.0035.00 33.00 30.0016.00 31.00 23.0027.00 28.00 28.0028.00 33.00 18.0028.00 34.00 27.0025.00 27.00 25.00
Compare results
• SPSS output for this data
Not significant
Tests of Within-Subjects Effects
Measure: MEASURE_1
99.800 2 49.900 1.394 .274
99.800 1.602 62.292 1.394 .274
99.800 1.895 52.656 1.394 .274
99.800 1.000 99.800 1.394 .268
644.200 18 35.789
644.200 14.419 44.677
644.200 17.058 37.766
644.200 9.000 71.578
Sphericity Assumed
Greenhouse-Geisser
Huynh-Feldt
Lower-bound
Sphericity Assumed
Greenhouse-Geisser
Huynh-Feldt
Lower-bound
Sourcefactor1
Error(factor1)
Type III Sumof Squares df Mean Square F Sig.
Compare results
• Wilcox’s libraries provide a simple way to perform an RM analysis for trimmed means
• TITLE: Function rmanova
• USAGE: rmanova(x, tr, grp)
• x refers to the dataset, tr the amount of trimming, and grp can be used to test a subset of the variables
R output• rmanova(stressdata, tr=.2)
– 20% off both ends
• Results (generalized Hunyh-Feldt correction, provides the epsilon used)
• Trimmed means (non-trimmed in parentheses):– 28.8 (28.5)– 31.0 (29.5)– 25.0 (25.2)
• F(2,10) = 3.94, p = .05 sig outcome unlike before
• To perform a bootstrapped F:– rmanovab(stressdata, tr=.2, alpha = .05, nboot = 1000)
Multiple comparisons
• Again, the omnibus F in RM is most likely uninteresting, so perhaps we want to test to see what the specifics of the situation are
• Function rmmcp can be used– rmmcp(x, con=0,tr=.2, alpha=.05, dif=F)– dif=T uses difference scores, dif=F the marginal means– To test a specific contrast, one can add the con function with appropriate weights
or specify a matrix of weights• The procedure for testing pairwise comparisons uses Rom’s
correction (a modified Bonferonni) for multiple comparisons– Order p-values in descending order– Test largest at .05, if less than .05 reject and all subsequent– If not test next at corrected critical. If less than .05 reject and all subsequent. If
not continue until rejection or all hypes have been tested• But as mentioned previously, one could use an FDR method also
that may be more powerful
R output
• rmmcp(stressdata, tr=.1, con=c(0,1,-1),alpha=.05, dif=F)
– Compares ‘during’ and ‘after’ times
• Results from the contrast– t= 2.7, p = .03
• Once again, do not be afraid to implement robust procedures when necessary