I have a data set and keep getting $D=1$ when I use the KS-Test. It doesn't matter what distribution I use. For example, consider the following:
ks.test(data,"pnorm")
ks.test(data,"pexp")
For these, I get:
D = 1, p-value < 2.2e-16
alternative hypothesis: two-sided
The data I have looks exponential. Yet the KS-Test shows the opposite. Why?
ks.test
. According to its manual page, you need to supply parameters for the named distribution. Without them,pnorm
will default to a standard normal distribution andpexp
will default to an exponential with rate $1$. But beware! It is invalid to supply parameters that have been estimated from the data themselves--see the last paragraph of the "Details" section. $\endgroup$ – whuber♦ Mar 11 '13 at 16:22