Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qDiptab

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


Description

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.

Format

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

Note

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

Author(s)

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

Examples

data(qDiptab)
str(qDiptab)
## 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)

diptest

Hartigan's Dip Test Statistic for Unimodality - Corrected

v0.76-0
GPL (>= 2)
Authors
Martin Maechler (originally from Fortran and S-plus by Dario Ringach, NYU.edu)
Initial release
2021-05-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.