pLausen92              package:maxstat              R Documentation

_A_p_p_r_o_x_i_m_a_t_i_n_g _M_a_x_i_m_a_l_l_y _S_e_l_e_c_t_e_d _S_t_a_t_i_s_t_i_c_s

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

     Approximates the probability that a maximally selected rank
     statistic is greater or equal to 'b'.

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

     pLausen92(b, minprop=0.1, maxprop=0.9)
     qLausen92(p, minprop=0.1, maxprop=0.9)

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

       b: quantile. 

       p: probability. 

 minprop: at least 'minprop'*100% of the observations in the first
          group. 

 maxprop: not more than 'minprop'*100% of the observations in the first
          group. 

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

     Large sample approximation by Miller and Siegmund (1982) based on
     a Brownian bridge, cf. Lausen and Schumacher (1992).

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

     The probability that, under the hypothesis of independence, a
     maximally selected statistic greater equal 'b' is observed.

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

     Miller, R. and Siegmund, D. (1982), Maximally Selected Chi Square
     Statistics. _Biometrics_, *38*, 1011-1016

     Lausen, B. and Schumacher, M. (1992), Maximally Selected Rank
     Statistics. _Biometrics_, *48*, 73-85

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

     # Compute quantiles. Should be equal to Table 2 in Lausen and Schumacher

     data(LausenTab2)

     a <- rev(c(0.01, 0.025, 0.05, 0.1))
     prop <- rbind(c(0.25, 0.75), c(0.4, 0.6), c(0.1, 0.9), c(0.4, 0.9))
     Quant <- matrix(rep(0, length(a)*nrow(prop)), nrow=length(a)) 

     for (i in 1:length(a)) {                                            
       for (j in 1:nrow(prop)) {                            
         Quant[i,j] <- qLausen92(a[i], minprop=prop[j,1], maxprop=prop[j,2]) 
       }
     }

     Quant <- round(Quant, 3)
     rownames(Quant) <- a
     colnames(Quant) <- c("A2575", "A46", "A19", "A49")
     Quant <- as.data.frame(Quant)
     rownames(LausenTab2) <- a

     Quant

     LausenTab2

     if(!all.equal(LausenTab2, Quant)) stop("error checking pLausen92")

