I'm using fisher.exact on a 4x2 table and it seems to work. Does anyone know exactly what is going on? I thought fisher.exact is only for 2x2 tables. Note: I can't use chi-squared because I have a couple of cells with 0 and < 5 observations. -- View this message in context: http://r.789695.n4.nabble.com/fisher-exact-for-2x2-table-tp3481979p3481979.html Sent from the R help mailing list archive at Nabble.com.
On Apr 28, 2011, at 3:45 PM, viostorm wrote:> > I'm using fisher.exact on a 4x2 table and it seems to work. > > Does anyone know exactly what is going on? I thought fisher.exact > is only > for 2x2 tables.Have you read the help page?>-- David Winsemius, MD West Hartford, CT
On Thu, 28 Apr 2011, viostorm wrote:> I'm using fisher.exact on a 4x2 table and it seems to work. > > Does anyone know exactly what is going on? I thought fisher.exact is > only for 2x2 tables.You were wrong. I'm sure there's nothing wrong with the program. You will find that with bigger tables and larger sample sizes the computational cost becomes quite enormous. Mike
I have read the help page, or at least ?fisher.exact I looked a bit on the Internet I guess it is applicable to > 2x2. I had spoken to a biostatistician here who is quite excellent and was adamant with me I could not do > 2x2. I found this: http://mathworld.wolfram.com/FishersExactTest.html Does anyone know specifically how R is calculating this? -- View this message in context: http://r.789695.n4.nabble.com/fisher-exact-for-2x2-table-tp3481979p3482102.html Sent from the R help mailing list archive at Nabble.com.
On Apr 28, 2011, at 4:23 PM, viostorm wrote:> > I have read the help page, or at least ?fisher.exactThen it should have been clear that more than 2x2 tables can be used.> > I looked a bit on the Internet I guess it is applicable to > 2x2. I > had > spoken to a biostatistician here who is quite excellent and was > adamant with > me I could not do > 2x2. > > I found this: > > http://mathworld.wolfram.com/FishersExactTest.html > > Does anyone know specifically how R is calculating this?The answer to any question like that is ... look at the source. You will see extensive use of phyper() which is calculating that expression for various arguments. ?phyper -- David Winsemius, MD West Hartford, CT
Thank you all very kindly for your help. -Rob -------------------------------- Robert Schutt III, MD, MCS Resident - Department of Internal Medicine University of Virginia, Charlottesville, Virginia -- View this message in context: http://r.789695.n4.nabble.com/fisher-exact-for-2x2-table-tp3481979p3482351.html Sent from the R help mailing list archive at Nabble.com.