Re: [R] p-values for the dip test

2004-10-22 Thread Martin Maechler
Hmm, this is rather about reading the (Hartigan)^2 paper ...

> "Kylie" == Kylie Lange <[EMAIL PROTECTED]>
> on Fri, 22 Oct 2004 11:17:34 +0930 writes:

Kylie> Hi all,

Kylie> I am using Hartigan & Hartigan's [1] "dip test" of
Kylie> unimodality via the diptest package in R. The
Kylie> function dip() returns the value of the test
Kylie> statistic but I am having problems calculating the
Kylie> p-value associated with that value. I'm hoping
Kylie> someone here is familiar with this process and can
Kylie> explain it.

Kylie> In the original article there is an example using
Kylie> n=63 and a dip value of 0.059 - which I am able to
Kylie> replicate using dip(). However the article then
Kylie> states:

Kylie> "The dip illustrated in Figure 1 is 0.059 which has a
Kylie> tail probability about 10% from Table 1. (
Kylie> sqrt(63)*D*F(63) is distributed approximately as
Kylie> sqrt(100)*D*F(100) which has 90% point 0.474. Thus
Kylie> D*F(63) has 90% point 0.060. )"

note:  sqrt(100) * D(F_100) =  10 * D(F_100)

   i.e. D(F_100) would have 90* point 0.0474

but the second "4" is a simple typo, (not the only one in the
paper, IIRC!);  "s/4/1/" --> you get the correct 0.0471

Kylie> It is the value of 0.474 that I am unable to
Kylie> get. Table 1 is a table of percentage points for
Kylie> various sample sizes. The same table is provided in
Kylie> the diptest package as 'qDiptab' (but at greater
Kylie> accuracy). n=63 is not tabled but n=50 and 100
Kylie> are. In the table for n=100 the value given for 90%
Kylie> is 0.0471 so where does the 0.474 come from?

(see above).

Kylie> Any help appreciated!  

you're welcome.
Martin Maechler, ETH Zurich ('diptest' maintainer)


Kylie> [1] Hartigan JA & Hartigan PM. "The Dip Test of
Kylie> Unimodality", The Annals of Statistics, v13(1):70-84, 1985.

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] p-values for the dip test

2004-10-21 Thread Kylie Lange
Hi all,
I am using Hartigan & Hartigan's [1] "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 
explain it.

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 
states:

"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 
0.060. )"

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!
Kylie.
[1] Hartigan JA & Hartigan PM. "The Dip Test of Unimodality", The Annals of 
Statistics, v13(1):70-84, 1985.

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html