[R] read table for Fisher Exact

2010-05-13 Thread visser

i have 2 groups i want to compare: group A and group B
each group contains let's say 20 patients
i want to perform a Fisher Exact test on genotype distribution
so, see if there is a sign diff in genotpe frequency/distribution (#AA, #AB,
#BB) between group A and B
not for 1, but for 1000 different genes

my question: how should i build my table so i can do:

test - read.table(table1.txt)
fisher.test(test)

i know a lot is still missing in the syntax, but i do not know what. any
help would be soo much appreciated!!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/read-table-for-Fisher-Exact-tp2196762p2196762.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] read table for Fisher Exact

2010-05-13 Thread Frank E Harrell Jr

On 05/12/2010 03:31 PM, visser wrote:


i have 2 groups i want to compare: group A and group B
each group contains let's say 20 patients
i want to perform a Fisher Exact test on genotype distribution
so, see if there is a sign diff in genotpe frequency/distribution (#AA, #AB,
#BB) between group A and B
not for 1, but for 1000 different genes

my question: how should i build my table so i can do:

test- read.table(table1.txt)
fisher.test(test)

i know a lot is still missing in the syntax, but i do not know what. any
help would be soo much appreciated!!


Note that in this case, Fisher's exact test has a good chance of being 
less accurate than an approximate Pearson chi-square test.


--
Frank E Harrell Jr   Professor and ChairmanSchool of Medicine
 Department of Biostatistics   Vanderbilt University

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] read table for Fisher Exact

2010-05-13 Thread visser

How much would that differ? And how should I build my table if I want to do a 
Pearson Chi Sqaure?


- Original Message -
From: Frank E Harrell Jr [via R] 
ml-node+2197479-2091597772-257...@n4.nabble.com
Date: Thursday, May 13, 2010 2:36 pm
Subject: Re: read table for Fisher Exact
To: visser s.m@amc.uva.nl


 On 05/12/2010 03:31 PM, visser wrote:
 
  i have 2 groups i want to compare: group A and group B
  each group contains let's say 20 patients
  i want to perform a Fisher Exact test on genotype distribution
  so, see if there is a sign diff in genotpe frequency/distribution 
 (#AA, #AB,
  #BB) between group A and B
  not for 1, but for 1000 different genes
 
  my question: how should i build my table so i can do:
 
  test- read.table(table1.txt)
  fisher.test(test)
 
  i know a lot is still missing in the syntax, but i do not know what. 
 any
  help would be soo much appreciated!!
 
 Note that in this case, Fisher's exact test has a good chance of being 
 
 less accurate than an approximate Pearson chi-square test.
 
 -- 
 Frank E Harrell Jr   Professor and ChairmanSchool of Medicine
   Department of Biostatistics   Vanderbilt University
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 
 __
 View message @ 
 http://r.789695.n4.nabble.com/read-table-for-Fisher-Exact-tp2196762p2197479.html
 
 To unsubscribe from read table for Fisher Exact, click  (link removed) =

-- 
View this message in context: 
http://r.789695.n4.nabble.com/read-table-for-Fisher-Exact-tp2196762p2197720.html
Sent from the R help mailing list archive at Nabble.com.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] read table for Fisher Exact

2010-05-13 Thread Shi, Tao
Hi Prof. Harrell,

Could you please elaborate on why chi-square test is more appropriate in this 
case?  Thank you very much!

...Tao





- Original Message 
 From: Frank E Harrell Jr f.harr...@vanderbilt.edu
 To: r-help@r-project.org
 Sent: Thu, May 13, 2010 5:35:07 AM
 Subject: Re: [R] read table for Fisher Exact
 
 On 05/12/2010 03:31 PM, visser wrote:

 i have 2 groups i want to 
 compare: group A and group B
 each group contains let's say 20 
 patients
 i want to perform a Fisher Exact test on genotype 
 distribution
 so, see if there is a sign diff in genotpe 
 frequency/distribution (#AA, #AB,
 #BB) between group A and B
 not 
 for 1, but for 1000 different genes

 my question: how should i 
 build my table so i can do:

 test- 
 read.table(table1.txt)
 fisher.test(test)

 i know a lot 
 is still missing in the syntax, but i do not know what. any
 help would 
 be soo much appreciated!!

Note that in this case, Fisher's exact test has 
 a good chance of being 
less accurate than an approximate Pearson chi-square 
 test.

-- 
Frank E Harrell Jr   Professor and Chairman  
   School of Medicine
  
 Department of Biostatistics  
 Vanderbilt 
 University

__

 ymailto=mailto:R-help@r-project.org; 
 href=mailto:R-help@r-project.org;R-help@r-project.org mailing list

 href=https://stat.ethz.ch/mailman/listinfo/r-help; target=_blank 
 https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting 
 guide http://www.R-project.org/posting-guide.html
and provide commented, 
 minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] read table for Fisher Exact

2010-05-13 Thread Frank E Harrell Jr

On 05/13/2010 08:16 PM, Shi, Tao wrote:

Hi Prof. Harrell,

Could you please elaborate on why chi-square test is more appropriate in this 
case?  Thank you very much!

...Tao


Exact tests tend to not be very accurate.  Typically their P-values are 
too large.  See


@Article{cra08how,
  author =   {Crans, Gerald G. and Shuster, Jonathan J.},
  title = 		 {How conservative is {Fisher's} exact test? {A} 
quantitative evaluation of the two-sample comparative binomial trial},

  journal =  Statistics in Medicine,
  year = 2008,
  volume =   27,
  pages ={3598-3611},
  annote = 	 {Fisher's exact test; $2\times 2$ contingency table;size 
of test; comparative binomial experiment;first paper to truly quantify 
the conservativeness of Fisher's test;``the test size of FET was less 
than 0.035 for nearly all sample sizes before 50 and did not approach 
0.05 even for sample sizes over 100.'';conservativeness of ``exact'' 
methods;see \emph{Stat in Med} \textbf{28}:173-179, 2009 for a criticism 
which was unanswered}

}








- Original Message 

From: Frank E Harrell Jrf.harr...@vanderbilt.edu
To: r-help@r-project.org
Sent: Thu, May 13, 2010 5:35:07 AM
Subject: Re: [R] read table for Fisher Exact

On 05/12/2010 03:31 PM, visser wrote:

i have 2 groups i want to
compare: group A and group B
each group contains let's say 20
patients
i want to perform a Fisher Exact test on genotype
distribution
so, see if there is a sign diff in genotpe
frequency/distribution (#AA, #AB,
#BB) between group A and B
not
for 1, but for 1000 different genes

my question: how should i
build my table so i can do:

test-
read.table(table1.txt)
fisher.test(test)

i know a lot
is still missing in the syntax, but i do not know what. any
help would
be soo much appreciated!!


Note that in this case, Fisher's exact test has

a good chance of being

less accurate than an approximate Pearson chi-square

test.





--
Frank E Harrell Jr   Professor and ChairmanSchool of Medicine
 Department of Biostatistics   Vanderbilt University

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] read table for Fisher Exact

2010-05-13 Thread David Winsemius


On May 13, 2010, at 9:24 PM, Frank E Harrell Jr wrote:


On 05/13/2010 08:16 PM, Shi, Tao wrote:

Hi Prof. Harrell,

Could you please elaborate on why chi-square test is more  
appropriate in this case?  Thank you very much!


...Tao


Exact tests tend to not be very accurate.  Typically their P-values  
are too large.  See


@Article{cra08how,
 author ={Crans, Gerald G. and Shuster, Jonathan J.},
 title = 		 {How conservative is {Fisher's} exact test? {A}  
quantitative evaluation of the two-sample comparative binomial trial},

 journal =   Statistics in Medicine,
 year =  2008,
 volume =27,
 pages = {3598-3611},
 annote = 	 {Fisher's exact test; $2\times 2$ contingency table;size  
of test; comparative binomial experiment;first paper to truly  
quantify the conservativeness of Fisher's test;``the test size of  
FET was less than 0.035 for nearly all sample sizes before 50 and  
did not approach 0.05 even for sample sizes over  
100.'';conservativeness of ``exact'' methods;see \emph{Stat in Med}  
\textbf{28}:173-179, 2009 for a criticism which was unanswered}

}



Lest you be concerned that Frank is selectively citing the literature,  
here are a few more citations demonstrating problems with exact  
methods, starting with the citation in the prop.test help page:


http://www.stats.org.uk/statistical-inference/Newcombe1998.pdf

And a few others:

http://www.jstor.org/pss/2685469
http://www.ine.pt/revstat/pdf/rs080204.pdf
http://goliath.ecnext.com/coms2/gi_0199-4388181/Evaluation-criteria-for-discrete-confidence.html
http://www.math.ist.utl.pt/~apires/PDFs/AP_COMPSTAT02.pdf

Some R methods:

http://finzi.psych.upenn.edu/R/library/PropCIs/html/add4ci.html
http://finzi.psych.upenn.edu/R/library/pairwiseCI/html/pairwiseCImethodsProp.html
http://finzi.psych.upenn.edu/R/library/Epi/html/ci.pd.html
http://finzi.psych.upenn.edu/R/library/binMto/html/binMtoMethods.html
http://finzi.psych.upenn.edu/R/library/pairwiseCI/html/pairwiseCI.html










- Original Message 

From: Frank E Harrell Jrf.harr...@vanderbilt.edu
To: r-help@r-project.org
Sent: Thu, May 13, 2010 5:35:07 AM
Subject: Re: [R] read table for Fisher Exact

On 05/12/2010 03:31 PM, visser wrote:

i have 2 groups i want to
compare: group A and group B
each group contains let's say 20
patients
i want to perform a Fisher Exact test on genotype
distribution
so, see if there is a sign diff in genotpe
frequency/distribution (#AA, #AB,
#BB) between group A and B
not
for 1, but for 1000 different genes

my question: how should i
build my table so i can do:

test-
read.table(table1.txt)
fisher.test(test)

i know a lot
is still missing in the syntax, but i do not know what. any
help would
be soo much appreciated!!


Note that in this case, Fisher's exact test has

a good chance of being

less accurate than an approximate Pearson chi-square

test.





--
Frank E Harrell Jr   Professor and ChairmanSchool of Medicine
Department of Biostatistics   Vanderbilt  
University


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] read table for Fisher Exact

2010-05-13 Thread Shi, Tao
Thanks, David!




- Original Message 
 From: David Winsemius dwinsem...@comcast.net
 To: Frank E Harrell Jr f.harr...@vanderbilt.edu
 Cc: Shi, Tao shida...@yahoo.com; r-help@r-project.org
 Sent: Thu, May 13, 2010 8:29:31 PM
 Subject: Re: [R] read table for Fisher Exact
 
 
On May 13, 2010, at 9:24 PM, Frank E Harrell Jr wrote:

 On 
 05/13/2010 08:16 PM, Shi, Tao wrote:
 Hi Prof. Harrell,
 
 
 Could you please elaborate on why chi-square test is more 
 appropriate in this case?  Thank you very much!
 
 
 ...Tao
 
 Exact tests tend to not be very accurate.  
 Typically their P-values are too large.  See
 
 
 @Article{cra08how,
  author = 
 {Crans, Gerald G. and Shuster, Jonathan J.},
  title = 
  {How conservative is {Fisher's} exact 
 test? {A} quantitative evaluation of the two-sample comparative binomial 
 trial},
  journal =  Statistics in 
 Medicine,
  year = 
 2008,
  volume =  27,
  pages = 
  {3598-3611},
  annote = 
 {Fisher's exact test; $2\times 2$ contingency table;size of test; comparative 
 binomial experiment;first paper to truly quantify the conservativeness of 
 Fisher's test;``the test size of FET was less than 0.035 for nearly all 
 sample 
 sizes before 50 and did not approach 0.05 even for sample sizes over 
 100.'';conservativeness of ``exact'' methods;see \emph{Stat in Med} 
 \textbf{28}:173-179, 2009 for a criticism which was unanswered}
 
 }
 

Lest you be concerned that Frank is selectively citing the 
 literature, here are a few more citations demonstrating problems with exact 
 methods, starting with the citation in the prop.test help 
 page:

http://www.stats.org.uk/statistical-inference/Newcombe1998.pdf

And 
 a few 
 others:

http://www.jstor.org/pss/2685469
http://www.ine.pt/revstat/pdf/rs080204.pdf
http://goliath.ecnext.com/coms2/gi_0199-4388181/Evaluation-criteria-for-discrete-confidence.html
http://www.math.ist.utl.pt/~apires/PDFs/AP_COMPSTAT02.pdf

Some 
 R 
 methods:

http://finzi.psych.upenn.edu/R/library/PropCIs/html/add4ci.html
http://finzi.psych.upenn.edu/R/library/pairwiseCI/html/pairwiseCImethodsProp.html
http://finzi.psych.upenn.edu/R/library/Epi/html/ci.pd.html
http://finzi.psych.upenn.edu/R/library/binMto/html/binMtoMethods.html
http://finzi.psych.upenn.edu/R/library/pairwiseCI/html/pairwiseCI.html




 
 
 
 
 
 
 - Original 
 Message 
 From: Frank E Harrell Jr
 ymailto=mailto:f.harr...@vanderbilt.edu; 
 href=mailto:f.harr...@vanderbilt.edu;f.harr...@vanderbilt.edu
 
 To: 
 href=mailto:r-help@r-project.org;r-help@r-project.org
 
 Sent: Thu, May 13, 2010 5:35:07 AM
 Subject: Re: [R] read table 
 for Fisher Exact
 
 On 05/12/2010 03:31 PM, visser 
 wrote:
 
 i have 2 groups i want 
 to
 compare: group A and group B
 each group 
 contains let's say 20
 patients
 i want to perform 
 a Fisher Exact test on genotype
 distribution
 so, 
 see if there is a sign diff in genotpe
 frequency/distribution 
 (#AA, #AB,
 #BB) between group A and B
 
 not
 for 1, but for 1000 different genes
 
 
 my question: how should i
 build my table so i 
 can do:
 
 test-
 
 read.table(table1.txt)
 fisher.test(test)
 
 
 i know a lot
 is still missing in the syntax, 
 but i do not know what. any
 help would
 be soo 
 much appreciated!!
 
 Note that in this case, Fisher's 
 exact test has
 a good chance of being
 less accurate 
 than an approximate Pearson chi-square
 test.
 
 
 
 
 --Frank E Harrell Jr   Professor and 
 ChairmanSchool of Medicine

  Department of 
 Biostatistics   Vanderbilt University
 
 
 __
 
 ymailto=mailto:R-help@r-project.org; 
 href=mailto:R-help@r-project.org;R-help@r-project.org mailing list
 
 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the 
 posting guide http://www.R-project.org/posting-guide.html
 and provide 
 commented, minimal, self-contained, reproducible code.

David Winsemius, 
 MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.