[R] p-values for the dip test
kylie.lange at flinders.edu.au
Fri Oct 22 03:47:34 CEST 2004
I am using Hartigan & Hartigan's  "dip test" of unimodality via the
diptest package in R. The function dip() returns the value of the test
statistic but I am having problems calculating the p-value associated with
that value. I'm hoping someone here is familiar with this process and can
In the original article there is an example using n=63 and a dip value of
0.059 - which I am able to replicate using dip(). However the article then
"The dip illustrated in Figure 1 is 0.059 which has a tail probability
about 10% from Table 1. ( sqrt(63)*D*F(63) is distributed approximately as
sqrt(100)*D*F(100) which has 90% point 0.474. Thus D*F(63) has 90% point
It is the value of 0.474 that I am unable to get. Table 1 is a table of
percentage points for various sample sizes. The same table is provided in
the diptest package as 'qDiptab' (but at greater accuracy). n=63 is not
tabled but n=50 and 100 are. In the table for n=100 the value given for 90%
is 0.0471 so where does the 0.474 come from?
Any help appreciated!
 Hartigan JA & Hartigan PM. "The Dip Test of Unimodality", The Annals of
Statistics, v13(1):70-84, 1985.
More information about the R-help