

Tukey {base}                                 R Documentation

_T_h_e _S_t_u_d_e_n_t_i_z_e_d _R_a_n_g_e _D_i_s_t_r_i_b_u_t_i_o_n

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

     These functions provide information about the distribu-
     tion of the studentized range, R/s, where R is the
     range of a standard normal sample of size n and s^2 is
     independently distributed as chi-squared with df
     degrees of freedom, see `pchisq'.

_U_s_a_g_e_:

     ptukey(q, nmeans, df, nranges = 1)
     qtukey(p, nmeans, df, nranges = 1)

_A_r_g_u_m_e_n_t_s_:

       q: vector of quantiles.

       p: vector of probabilities.

  nmeans: sample size for range (same for each group).

      df: degrees of freedom for s (see below).

 nranges: number of groups whose maximum range is consid-
          ered.

_D_e_t_a_i_l_s_:

     If ng =`nranges' is greater than one, R is the maximum
     of ng groups of `nmeans' observations each.

_V_a_l_u_e_:

     `ptukey' gives the distribution function and `qtukey'
     its inverse, the quantile function.

_N_o_t_e_:

     A Legendre 16-point formula is used for the integral of
     `ptukey'.  The computations are relatively expensive,
     especially for `qtukey' which uses a simple secant
     method for finding the inverse of `ptukey'.
     `qtukey(..)' will be accurate to the 4th decimal place.

_R_e_f_e_r_e_n_c_e_s_:

     Copenhaver, Margaret Diponzio & Holland, Burt S.
     (1988).
     Multiple comparisons of simple effects in the two-way
     analysis of variance with fixed effects.  Journal of
     Statistical Computation and Simulation, 30, 1-15.

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

     `pnorm' and `qnorm' for the corresponding functions for
     the normal distribution.

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

     system.time(curve(ptukey(x, nm=6, df=5), from=-1, to=8, n=101))
     (ptt <- ptukey(0:10, 2, df= 5))
     (qtt <- qtukey(.95, 2, df= 2:11))
     ## The precision may be not much more than about 8 digits:
     summary(abs(.95 - ptukey(qtt,2, df = 2:11)))

