Alan Acock asked about multiple comparisons between pairs of levels of a
repeated-measures factor. David Airey mentioned using separate paired
Student's t-tests, and Richard Williams mentioned the -mtest()- option
of -test- after -anova-.
I believe that the experts usually favor the separate paired t-test
approach, because of concerns about sphericity. google brings up several
webpages on multiple comparisons with repeated-measures ANOVA or with
MANOVA, e.g.,
sobek.colorado.edu/LAB/STATS/SPSS/spss195.html
www.utexas.edu/cc/faqs/stat/spss/spss16.html
uvm.edu/~dhowell/StatPages/More_Stuff/RepMeasMultComp/RepMeasMultComp.html
I've tried to compare both approaches in the do-file below using the dataset
that Alan cited. The -mtest(bonferroni)- approach yields far more null
hypothesis rejections than the corresponding Bonferroni-adjusted separate
t-test approach. Such a discrepancy is surprising.
Joseph Coveney
----------------------------------------------------------------------------
set more off
use http://www.stata-press.com/data/r8/t43, clear
*
* Pooled error mean square approach
*
anova score person drug, repeated(drug)
test , showorder
matrix drug12 = (0, 0, 0, 0, 0, 0, -1, 1, 0, 0)
matrix drug13 = (0, 0, 0, 0, 0, 0, -1, 0, 1, 0)
matrix drug14 = (0, 0, 0, 0, 0, 0, -1, 0, 0, 1)
matrix drug23 = (0, 0, 0, 0, 0, 0, 0, -1, 1, 0)
matrix drug24 = (0, 0, 0, 0, 0, 0, 0, -1, 0, 1)
matrix drug34 = (0, 0, 0, 0, 0, 0, 0, 0, -1, 1)
matrix drugs = drug12 \ drug13 \ drug14 \ drug23 \ drug24 \ drug34
test , test(drugs) mtest(bonferroni)
*
* Separate paired t-test approach
*
quietly reshape wide score, i(person) j(drug)
forvalues i = 1/3 {
local j = `i' + 1
forvalues k = `j'/4 {
display as input "Drug `i' versus Drug `k'"
quietly ttest score`i' = score`k'
display as text "Uncorrected P = " as result %5.3f r(p)
display
}
}
* Bonferroni-adjusted alpha level:
display 0.05 / 6
exit
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/