I have two groups of data and want to test how the mean of one group is significant different from the mean of the other group of data. which R function can be used? Thanks.
Le 31.10.2005 11:22, Robert a ??crit :>I have two groups of data and want to test how the >mean of one group is significant different from the >mean of the other group of data. >which R function can be used? >Thanks. > >Hi, t.test if you assume normality wilcox.test otherwise Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques +---------------------------------------------------------------+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant INRIA Futurs / EDF | +---------------------------------------------------------------+
On Mon, 31 Oct 2005, Romain Francois wrote:> Le 31.10.2005 11:22, Robert a ?crit : > >> I have two groups of data and want to test how the >> mean of one group is significant different from the >> mean of the other group of data. >> which R function can be used? >> Thanks. > > t.test if you assume normality > wilcox.test otherwiseSorry, no. The Wilcoxon test does NOT test a difference in means: its null hypothesis is that the two samples came from the same continuous distribution, a much narrower assumption. (It is sensitive to differences in variances, for example, and is probably closer to testing a difference in medians than means where the shapes of the two samples differ) The Welch two-sample t-test does test exactly the null hypothesis stated under normality, and it is pretty insensitive to quite large departures from normality. It is unlikely (but possible) that means are of primary interest in very-non-normal distributions. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Le 31.10.2005 13:45, Prof Brian Ripley a ??crit :> On Mon, 31 Oct 2005, Romain Francois wrote: > >> Le 31.10.2005 11:22, Robert a ??crit : >> >>> I have two groups of data and want to test how the >>> mean of one group is significant different from the >>> mean of the other group of data. >>> which R function can be used? >>> Thanks. >> >> t.test if you assume normality >> wilcox.test otherwise > > Sorry, no.*I* should be sorry. Thanks for the correction.> The Wilcoxon test does NOT test a difference in means: its null > hypothesis is that the two samples came from the same continuous > distribution, a much narrower assumption. (It is sensitive to > differences in variances, for example, and is probably closer to > testing a difference in medians than means where the shapes of the two > samples differ) > > The Welch two-sample t-test does test exactly the null hypothesis > stated under normality, and it is pretty insensitive to quite large > departures from normality. It is unlikely (but possible) that means > are of primary interest in very-non-normal distributions.-- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques +---------------------------------------------------------------+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant INRIA Futurs / EDF | +---------------------------------------------------------------+