[R-sig-eco] report out by t.test

Li Wen Li.Wen at environment.nsw.gov.au
Mon Mar 24 13:45:10 CET 2014


HI, Jari

The default in the Welch t test (an adaptive student's t test) doesn't assume equal variance; but student's t-test do assume normal distribution.

Cheers
Li

-----Original Message-----
From: r-sig-ecology-bounces at r-project.org [mailto:r-sig-ecology-bounces at r-project.org] On Behalf Of Jari Oksanen
Sent: Monday, 24 March 2014 10:43 PM
To: Richard Boyce; r-sig-ecology at r-project.org
Subject: Re: [R-sig-eco] report out by t.test

Except that t-test does not assume that *observations* are normally distributed, nor that variances are equal.

Avoid non-parametric tests: they assume too much of data properties.

For var.equal assumption in t.test, see ?t.test.

Cheers, Jari Oksanen
________________________________________
From: r-sig-ecology-bounces at r-project.org [r-sig-ecology-bounces at r-project.org] on behalf of Richard Boyce [boycer at nku.edu]
Sent: 24 March 2014 13:23
To: r-sig-ecology at r-project.org
Subject: Re: [R-sig-eco] report out by t.test

Mike,

There is no way that your data meet the assumptions of a t-test (normal distributions, equal variance). A nonparametric Mann-Whitney (aka Wilcoxon) test is much better suited to your data.

Here's what I got when I ran it:

Q<-c(13,0,10,2,0,0,1,0,0,1,5)
WD<-c(0,0,1,0,0,0,0,0,0,0,1)
wilcox.test(Q,WD)

Wilcoxon rank sum test with continuity correction

data:  Q and WD
W = 86.5, p-value = 0.05119
alternative hypothesis: true location shift is not equal to 0

Warning message:
In wilcox.test.default(Q, WD) : cannot compute exact p-value with ties

This has a p-value quite close to 0.05, giving some evidence that there's a difference between your groups. Note that this you have different null and alternative hypothesis: groups are the same vs. groups are different.

Rick Boyce

On Mar 24, 2014, at 7:00 AM, r-sig-ecology-request at r-project.org<mailto:r-sig-ecology-request at r-project.org> wrote:

Message: 1
Date: Sun, 23 Mar 2014 14:21:41 -0700
From: Michael Marsh <swamp at blarg.net<mailto:swamp at blarg.net>>
To: r-sig-ecology at r-project.org<mailto:r-sig-ecology at r-project.org>
Subject: [R-sig-eco] report out by t.test
Message-ID: <532F5065.7030102 at blarg.net<mailto:532F5065.7030102 at blarg.net>>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I test differences between frequency of hits of exotic annual forbs in plots on  two sites, Q and WD.

Q<-c(13,0,10,2,0,0,1,0,0,1,5)
WD<-c(0,0,1,0,0,0,0,0,0,0,1)
t.test(Q,WD)

        Welch Two Sample t-test

data:  Q and WD
t = 1.9807, df = 10.158, p-value = 0.07533 alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.3342006  5.7887460
sample estimates:
mean of x mean of y
2.9090909 0.1818182

The p-value is greater than 0.05, thus does not reach the 95% confidence level, yet the difference in means is reported as not equal to 0.
Am I encountering a one-sided versus two sided comparison that I don't understand, or is ther another explanation?

Mike Marsh




================================
Richard L. Boyce, Ph.D.
Director, Environmental Science Program
Professor
Department of Biological Sciences, SC 150 Northern Kentucky University Nunn Drive Highland Heights, KY  41099  USA

859-572-1407 (tel.)
859-572-5639 (fax)
boycer at nku.edu<mailto:boycer at nku.edu>
http://www.nku.edu/~boycer/
=================================

"One of the advantages of being disorderly is that one is constantly making exciting discoveries." - A.A. Milne






        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is intended for the addressee(s) named and may contain confidential and/or privileged information. 
If you are not the intended recipient, please notify the sender and then delete it immediately.
Any views expressed in this email are those of the individual sender except where the sender expressly and with authority states them to be the views of the Office of Environment and Heritage, NSW Department of Premier and Cabinet.

PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL



More information about the R-sig-ecology mailing list