fang lai wrote:>Dear all, > I have several questions regarding fisher.test() in >R, and I'd highly appreciate any help with it. > I have a group of observations, each having people's >income, and an indicator of whether selected in or out >a program. I want to test the difference between >income of people who are in and out. > Because the distribution is far from normal, I decide >to use the fisher's exact test, using either mean or >rank as statistics. > Question 0 is: Can I do this test using fisher.test() >in R? > >The answer is "no". I think you have mis-understood the purpose of Fisher's exact test: read (and understand!) the description in the help page. If your data were normall distributed, then you could use a t-test (t.test()). As you are not happy with the normality assumption, you could try an equivalent non-paramteric test, such as the Wilcoxon test (wilcox.test()), also known as a Mann-Whitney test. I would recommend that you make sure you understand how the test works first. Bob -- Bob O'Hara Department of Mathematics and Statistics P.O. Box 68 (Gustaf H??llstr??min katu 2b) FIN-00014 University of Helsinki Finland Telephone: +358-9-191 51479 Mobile: +358 50 599 0540 Fax: +358-9-191 51400 WWW: http://www.RNI.Helsinki.FI/~boh/ Journal of Negative Results - EEB: www.jnr-eeb.org
Dear all, I have several questions regarding fisher.test() in R, and I'd highly appreciate any help with it. I have a group of observations, each having people's income, and an indicator of whether selected in or out a program. I want to test the difference between income of people who are in and out. Because the distribution is far from normal, I decide to use the fisher's exact test, using either mean or rank as statistics. Question 0 is: Can I do this test using fisher.test() in R? If so, My first question is: Does fisher.test() offer an option to choose the statistics? Actually it is not clear from the help to me what statistics it uses. Does it just compare the mean of people in and out of the program? My second question is: when the group is large, I always receive a warning message such as "Fisher exact result might not be right" when I set "hybrid=T". When I set "hybrid=F", it does return a result of p-value without warning message. I wonder if this p-value is reliable or not. And, how does it get the approximation of p-value when "hybrid=F"? Ideally, it should randomly draw, say 1000 times, from the full sets of permutation of assignment, and get an approximate p-value--is this the way it works in fisher.test( ) in R? If not, does it use another test, or some other measure of approximation? My last question is: when the group is small enough, will it calculates the exact probabilities even if hybrid=F? Many thanks, Fang ====Lai, Fang PhD candidate University of California, Berkeley Department of Agricultural and Resource Economics 314 Giannini Hall, Berkeley, CA 94720-3310 tel: (510) 643 - 5421(O) (510) 847 - 9811(Cell) fax: (510) 643 - 8911 email: lai@are.berkeley.edu http://www.are.berkeley.edu/jobmarket/fang.html
Dear Fang Lai, you have sent your mail to both r-devel and r-help. Please do not do this, but decide for one. Cross-posting just creates unnecessary and unpleasant junk-mail to many people. Furthermore, neither the r-devel nor the r-help mailing lists are intended as replacements to taking a basic statistics course or reading the software manuals - rather, as supplement and last resort. The answers are provided by unpaid voluntary contributors, who appreciate that you yourself also make at least a minimal effort before going off the mailing list. Best wishes Wolfgang ------------------------------------- Wolfgang Huber European Bioinformatics Institute European Molecular Biology Laboratory Cambridge CB10 1SD England Phone: +44 1223 494642 Http: www.dkfz.de/abt0840/whuber ------------------------------------- <quote who="fang lai">> Dear all, > I have several questions regarding fisher.test() in > R, and I'd highly appreciate any help with it. > I have a group of observations, each having people's > income, and an indicator of whether selected in or out > a program. I want to test the difference between > income of people who are in and out. > Because the distribution is far from normal, I decide > to use the fisher's exact test, using either mean or > rank as statistics. > Question 0 is: Can I do this test using fisher.test() > in R? > If so, > My first question is: Does fisher.test() offer an > option to choose the statistics? Actually it is not > clear from the help to me what statistics it uses. > Does it just compare the mean of people in and out of > the program? > My second question is: when the group is large, I > always receive a warning message such as "Fisher exact > result might not be right" when I set "hybrid=T". > When I set "hybrid=F", it does return a result of > p-value without warning message. I wonder if this > p-value is reliable or not. And, how does it get the > approximation of p-value when "hybrid=F"? Ideally, it > should randomly draw, say 1000 times, from the full > sets of permutation of assignment, and get an > approximate p-value--is this the way it works in > fisher.test( ) in R? If not, does it use another test, > or some other measure of approximation? > My last question is: when the group is small enough, > will it calculates the exact probabilities even if > hybrid=F? > Many thanks, > > Fang > > ====> Lai, Fang > > PhD candidate > University of California, Berkeley > Department of Agricultural and Resource Economics > 314 Giannini Hall, Berkeley, CA 94720-3310 > tel: (510) 643 - 5421(O) > (510) 847 - 9811(Cell) > fax: (510) 643 - 8911 > email: lai at are.berkeley.edu > http://www.are.berkeley.edu/jobmarket/fang.html > > ______________________________________________ > R-devel at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >