howmany_dependent          package:howmany          R Documentation

_N_u_m_b_e_r _o_f _c_o_r_r_e_c_t _r_e_j_e_c_t_i_o_n_s, _f_o_r _d_e_p_e_n_d_e_n_t _t_e_s_t _s_t_a_t_i_s_t_i_c_s

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

     Lower bounds for the number of correct rejections, for multiple
     tests of associations with dependent test statistics.

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

     howmany_dependent(X, Y, alpha = 0.05, test = wilcox.test,
          alternative = "two.sided", n.permutation=round(20/alpha) )

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

       X: a n*p matrix, where each of the p columns contains n
          observations

       Y: a factor or numerical vector of length n, containing a binary
          class variable 

   alpha: the level, a scalar in [0,1]  

    test: the test to be used 

alternative: an alternative for the test, supplied as an argument to
          function 'test' 

n.permutation: the number of permutations to use to determine the
          bounding function 

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

     For multiple tests of associations (with possibly dependent test
     statistics), a lower bound for the number of correct rejections is
     calculated, which is valid simultaneously for all possible number
     of rejections and under arbitrary dependence between test
     statistics. The bound is monotonically increasing with the number
     of made rejections.

     The matrix 'X' contains the observations, while 'Y' contains
     binary class labels. For each hypothesis k=1,...p, a p-value is
     calculated internally according to supplied function 'test', with
     first argument 'X[Y==0,k]', second argument 'X[Y==1,k]', and
     additional argument 'alternative' (if the class labels are not 0
     and 1, they are converted accordingly). The object returned by
     'test' has to have a component 'p.value', containing (perhaps
     unsurprisingly) the p-value of the corresponding test.

     The focus of the current implementation is on portability, not
     speed, and computations might take some time.

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

     An object of class 'howmany', for which summary, plot, and print
     methods are available. 

     The lower bound for the number of correct rejections (as a
     function of the number of rejections) can be accessed with the
     function 'lowerbound'.

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

     Nicolai Meinshausen, nicolai@stat.math.ethz.ch

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

     N. Meinshausen and P. Buhlmann (2005) "Lower bounds for the number
     of false null hypotheses for multiple testing of associations
     under general dependence structures", Biometrika 92(4)

     N. Meinshausen (2005) "False discovery control for multiple tests
     of association under general dependence", to appear in the
     Scandinavian Journal of Statistics

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

     'lowerbound' for extracting the number of correct rejections (as a
     function of the number of made rejections).

     'howmany' for similar functionality for multiple tests of
     associations, where test statistics are independent.

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

     ## Warning: running example might take a
     ## few minutes of computing time...

     ## create observation matrix X 
     ## for p=200 hypotheses with n=40 observations
     p <- 200
     n <- 40
     Indep <- matrix( rnorm(p*n) , ncol= p )  
     C <- diag(p); C <- C+matrix( 0.01*rbinom(p^2,1,0.2) , ncol=p ) 
     X <- Indep%*%C

     ## create binary class variables Y
     Y <- c( rep(0,round(n/2)), rep(1,n-round(n/2)) )

     ## 100 false null hypotheses (random effects)
     for (k in 1:100){  X[Y==1, k] <- X[Y==1, k] + rnorm(1) }


     ## compute object of class 'howmany' and print the result
     (object <- howmany_dependent(X,Y))

     ## extract the lower bound
     (lower <- lowerbound(object))

     ## plot the result
     plot(object)

     ## for comparison: number of rejections with Bonferroni correction
     (bonf <- sum(object$pvalues<0.05/p))

