[R] paired t-test vs pairwise t-test
MSchwartz at MedAnalytics.com
Thu Aug 19 22:53:18 CEST 2004
On Thu, 2004-08-19 at 14:42, Liaw, Andy wrote:
> > From: Duncan Murdoch
> > On Thu, 19 Aug 2004 13:42:21 -0300 (ADT), Rolf Turner
> > <rolf at math.unb.ca> wrote :
> > >
> > >You wrote:
> > >
> > >> What's the difference between t.test(x, y) and
> > pairwise.t.test()? Is
> > >> it just that the former takes two vectors, whereas the
> > latter takes a
> > >> vector and a factor?
> > >
> > > No. The pairwise.t.test() function (according to the help
> > > file) does a multiplicity of t-tests, on more than two
> > > samples, adjusting the p-value to compensate for the
> > > multiplicity by various methods.
> > >
> > > IMHO the name of this function is bad, because to me it
> > > suggests doing ***paired*** t-tests, which would trip up the
> > > naive user, who probably wouldn't notice or would ignore the
> > > "t tests with pooled SD" message in the output. As one of
> > > the Ripley fortunes says ``It really is hard to anticipate
> > > just how silly users can be.'' But why go out of the way to
> > > give them a chance to be silly?
> > And Jack wrote:
> > >But the documentation, which I valiantly tried to make sense
> > of BEFORE
> > >asking my stupid question, is not clear enough for this
> > particular idiot.
> > >Might I suggest that the documentation be altered? It could
> > use an example
> > >(as in, real-life applied statistical problem) of when
> > pairwise.t.test()
> > >ought to be used, and why t.test(paired=TRUE) would be
> > inappropriate in that
> > >context; it could also use a reference to some published
> > paper, website or
> > >some such that explains the rationale and correct procedure
> > for using this
> > >test.
> > I think it's unlikely that we would rename the function; it's been
> > around a while with its current name so that's a bad idea. On the
> > other hand, clearer documentation is always a plus: why not submit
> > some?
> I guess this is sort of related to the thread on whether R is good for
> non-statisticians... The help pages in R are sort of like *nix man pages.
> They give the technical information about the topic, but not necessarily the
> background. E.g., the man page for `chmod' does not explain file
> permissions in detail: the user is expected to learn that elsewhere.
> Perhaps other stat packages do it differently? Does SPSS manuals detail
> what its t-test procedure does, including which t-test(s) it does and when
> it's appropriate? That might make it easier on users, but I still think the
> users should learn the appropriate use of statistical procedures
I don't know about SPSS, but SAS' documentation is available online at:
The documentation specifically for PROC TTEST is at:
and the documentation for PROC MULTTEST is at:
Of course, to go along with the standard SAS documentation, there is the
line of "Books by Users", which parallels in a fashion, the increasing
number of books on R, authored by members of this community.
More information about the R-help