Tukey package:stats 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: Functions of the distribution of the studentized range, R/s, where R is the range of a standard normal sample and df*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, lower.tail = TRUE, log.p = FALSE) qtukey(p, nmeans, df, nranges = 1, lower.tail = TRUE, log.p = FALSE) _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 considered. log.p: logical; if TRUE, probabilities p are given as log(p). lower.tail: logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. _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 and 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: if(interactive()) 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)))