convest                package:limma                R Documentation

_E_s_t_i_m_a_t_e _P_r_o_p_o_r_t_i_o_n _o_f _T_r_u_e _N_u_l_l _H_y_p_o_t_h_e_s_e_s

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

     Returns an estimate of the proportion of true null hypotheses
     using a convex decreasing density estimate on a vector of
     p-values.

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

     convest(p, niter = 100, doplot = FALSE, doreport = FALSE)

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

       p: numeric vector of p-values, calculated using any test of your
          choice. Missing values are not allowed

   niter: number of iterations to be used in fitting the convex,
          decreasing density for the p-values. Default is 100.

  doplot: logical, should updated plots of fitted convex decreasing
          p-value density be produced at each iteration? Default is
          'FALSE'.

doreport: logical, should the estimated proportion be printed at each
          iteration? Default is 'FALSE'.

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

     The proportion of true null hypotheses is often denoted pi0.

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

     Numeric value in the interval [0,1] representing he estimated
     proportion of true null hypotheses.

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

     Egil Ferkingstad and Mette Langaas

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

     Ferkingstad, E., Langaas, M., and Lindqvist, B. (2005). Estimating
     the proportion of true null hypotheses, with application to DNA
     microarray data. _Journal of the Royal Statistical Society Series_
     B, 67, 555-572. Preprint at <URL:
     http://www.math.ntnu.no/~mettela/SFG/research.imf>

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

     See 08.Tests for other functions for producing or interpretting
     p-values.

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

     # First simulate data, use no.genes genes and no.ind individuals,
     # with given value of pi0. Draw from normal distribution with mean=0
     # (true null) and mean=mean.diff (false null).

     no.genes <- 1000
     no.ind <- 20
     pi0 <- 0.9
     mean.diff <- 1
     n1 <- round(pi0*no.ind*no.genes)
     n2 <- round((1-pi0)*no.ind*no.genes)
     x <- matrix(c(rnorm(n1,mean=0),rnorm(n2,mean=mean.diff)),ncol=no.ind,byrow=TRUE)

     # calculate p-values using your favorite method, e.g.
     pvals <- ebayes(lm.series(x))$p.value

     # run the convex decreasing density estimator to estimate pi0
     convest(pvals,niter=100,doplot=interactive())

