[R] Exact test in nxm contingency table

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Wed Sep 17 13:14:53 CEST 2008


Søren Højsgaard wrote:
> Using r2dtable() you can simulate general tables nxm with given margins. Based on these you acn calculate a Monte Carlo p-value for a conditional test for independence. 
>
> Regards
> Søren
>   
fisher.test(...., simulate.p.value=TRUE)  might be more direct. Also
works for chisq.test().

And, contrary to popular belief,  fisher.test() does work for larger
than2x2 tables, although you may run into space/time limitations.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-help mailing list