Skip to content

a question about ks.test

2 messages · Shima Shahbazi, Greg Snow

#
I think both of your questions can be answered using simulations.

If you simulate a bunch of datasets  where the null hypothesis is true
(data comes from the candidate distribution or 2 sets come from the
same distribution) and compute the KS statistic for each (you can use
the ks.test function to do this and just ignore the p-value part),
then you can estimate the critical value as a quantile of the
statistics.

The second would be similar, generate the data such that the maximum
difference between the generating distribution and the normal of
interest is C, simulate a bunch of times and find the quantile to
compute the critical value, then if for the real data the difference
is bigger than the critical value you can reject the null.
On Tue, Feb 25, 2014 at 12:57 PM, Shima Shahbazi <shima at math.aau.dk> wrote: