qDiptab {diptest}R Documentation

Table of Quantiles from a Large Simulation for Hartigan's Dip Test


Whereas Hartigan(1985) published a table of empirical percentage points of the dip statistic (see dip) based on N=9999 samples of size n from U[0,1], our table of empirical quantiles is currently based on N=1'000'001 samples for each n.


A numeric matrix where each row corresponds to sample size n, and each column to a probability (percentage) in [0,1]. The dimnames are named n and Pr and coercable to these values, see the examples. attr(qDiptab, "N_1") is N - 1, such that with k <- as.numeric(dimnames(qDiptab)$Pr) * attr(qDiptab, "N_1"), e.g., qDiptab[n == 15,] contains exactly the order statistics D_{[k]} (from the N+1 simulated values of dip(U), where U <- runif(15).


Taking N=1'000'001 ensures that all the quantile(X, p) used here are exactly order statistics sort(X)[k].


Martin Maechler maechler@stat.math.ethz.ch, in its earliest form in August 1994.

See Also

dip, also for the references; dip.test() which performs the hypothesis test, using qDtiptab (and its null hypothesis of a uniform distribution).


## the sample sizes `n' :
dnqd <- dimnames(qDiptab)
(nn <- as.integer(dnqd $n))
## the probabilities:
P.p <- as.numeric(print(dnqd $ Pr))

## This is as "Table 1" in Hartigan & Hartigan (1985) -- but more accurate
ps <- c(1,5,10,50,90,95,99, 99.5, 99.9)/100
tab1 <- qDiptab[nn <= 200,  as.character(ps)]
round(tab1, 4)

[Package diptest version 0.76-0 Index]