[R] Monte Carlo chisq test

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Dec 3 10:40:20 CET 2002


kjetil halvorsen <kjetilh at umsanet.edu.bo> writes:

> Hola!
> 
> simulate.p.value=TRUE uset the patefielf algorithm (translated to C).
> The reference is 
> 
> Patefield,W. M. (1981) An efficient method of generating r * c tables
> with given row and column totals (algorithm AS 159). A´pplied Statistics
> 30, 91-97.
> 
> This reference should have been included in the help file!
> 
> As to small sample properties, I know of no references, but to do a
> small-scall simulation in R should be fast. 

The title of the paper has an important bit of information, though.
It's a conditional simulation, so the small sample behaviour should be
similar to the Fisher test if you simulate long enough, except of
course that this uses the chisquare statistic rather than the log
likelihood. The variant where you enumerate all possibilities instead
of simulating is implemented in recent versions of SAS, so a look in
the SAS manuals might be informative.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list