From r.turner at auckland.ac.nz  Fri Dec 23 07:16:12 2011
From: r.turner at auckland.ac.nz (Rolf Turner)
Date: Fri, 23 Dec 2011 19:16:12 +1300
Subject: [Rd] Chi-squared test p-value based on simulation.
Message-ID: <4EF41CAC.6090302@auckland.ac.nz>


Prompted by a (fairly!) recent question from Michael Fuller, I got
to thinking about the issue of goodness-of-fit testing via chisq.test()
using p-values obtained via simulation.

I believe that such p-values are really valid only if there are no ties
in the data.  Since there are only finite number of possible samples
and hence only a finite number of statistic values, ties (while perhaps
improbable) are not impossible.  So the validity of the p-values obtained
via simulation is possibly slightly suspect.

I am given to understand that the p-values remain valid if the ties are
broken *randomly*.

Might it thereby be advisable to jitter the values of (the "true" and
simulated) test statistics before calculating the p-value?

Anyone have any thoughts on this?

     cheers,

         Rolf Turner



[Rd] Chi-squared test p-value based on simulation.
Rolf Turner