qgrubbs               package:outliers               R Documentation

_C_a_l_c_u_l_a_t_e _c_r_i_t_i_c_a_l _v_a_l_u_e_s _a_n_d _p-_v_a_l_u_e_s _f_o_r _G_r_u_b_b_s _t_e_s_t_s

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

     This function is designed to calculate critical values for Grubbs
     tests for outliers detecting and to approximate p-values
     reversively.

_U_s_a_g_e:

     qgrubbs(p, n, type = 10, rev = FALSE)
     pgrubbs(q, n, type = 10)

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

       p: vector of probabilities. 

       q: vector of quantiles. 

       n: sample size. 

    type: Integer value indicating test variant. 10 is a test for one
          outlier (side is detected automatically and can be reversed
          by 'opposite' parameter). 11 is a test for two outliers on
          opposite tails, 20 is test for two outliers in one tail. 

     rev: if set to TRUE, function 'qgrubbs' acts as 'pgrubbs'. 

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

     The critical values for test for one outlier is calculated
     according to approximations given by Pearson and Sekar (1936). The
     formula is simply reversed to obtain p-value.

     The values for two outliers test (on opposite sides) are
     calculated according to David, Hartley, and Pearson (1954). Their
     formula cannot be rearranged to obtain p-value, thus such values
     are obtained by 'uniroot'.

     For test checking presence of two outliers at one tail, the
     tabularized distribution (Grubbs, 1950) is used, and
     approximations of p-values are interpolated using 'qtable'.

_V_a_l_u_e:

     A vector of quantiles or p-values.

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

     Lukasz Komsta

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

     Grubbs, F.E. (1950). Sample Criteria for testing outlying
     observations. Ann. Math. Stat. 21, 1, 27-58.

     Pearson, E.S., Sekar, C.C. (1936). The efficiency of statistical
     tools and a criterion for the rejection of outlying observations.
     Biometrika, 28, 3, 308-320.

     David, H.A, Hartley, H.O., Pearson, E.S. (1954). The distribution
     of the ratio, in a single normal sample, of range to standard
     deviation. Biometrika, 41, 3, 482-493.

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

     'grubbs.test'

