qDiptab               package:diptest               R Documentation

_T_a_b_l_e _o_f _Q_u_a_n_t_i_l_e_s _f_r_o_m _a _L_a_r_g_e _S_i_m_u_l_a_t_i_o_n _f_o_r _H_a_r_t_i_g_a_n'_s _D_i_p _T_e_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_F_o_r_m_a_t:

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

_N_o_t_e:

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

_A_u_t_h_o_r(_s):

     Martin Maechler maechler@stat.math.ethz.ch

_S_e_e _A_l_s_o:

     'dip', also for the references.

_E_x_a_m_p_l_e_s:

     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)

