RE: [S] fisher.test

Bishop, Lane (Lane.Bishop@alliedsignal.com)
Wed, 4 Mar 1998 14:01:30 -0500


This will do it:

> fisher.test(matrix(c(0,20,5,15),2,2))

Fisher's exact test

data: matrix(c(0, 20, 5, 15), 2, 2)
p-value = 0.0471
alternative hypothesis: two.sided

>
----------
From: DR. L.Y. HIN
Sent: Wednesday, March 04, 1998 11:10 AM
To: s-news@utstat.toronto.edu
Subject: [S] fisher.test

I am trying to apply Fisher's exact test to test the independence of two
methods of intubation (method 1 and method 2). Success is represented as
1,
while failure is 0.

method1<-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

method2<-0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0

fisher.test(method1,method2)

Error in fisher.test(method1, method2): both categories must have at least
two levels.
Dumped

As far as I understand, Fisher's exact test deals with zero-cell
phenomenon.

Ref:
1. Sidney Siegel, NJ Castellan Jr. Nonparametric statistics for the
behavioral sciences (2nd edition) pp.103-109. McGraw Hill 1988.

2. A. Agresti Categorical data analysis. pp.60 Wliey 1990.

My question is whether the algorithm fisher.test() in S-plus is wrong, or
am I missing an important point?

Hin

---------------------------------------------------------------------------

L.Y. Hin
Dept. of Obstetrics and Gynaecology
Prince of Wales Hospital
Hong Kong
Tel.(852)26322807
Fax.(852)26360008
----------------------------------------------------------------------------

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news