nFDR                  package:nFDR                  R Documentation

_N_o_n_p_a_r_a_m_e_t_r_i_c _E_s_t_i_m_a_t_e _o_f _F_D_R _B_a_s_e_d _o_n _B_e_r_n_s_t_e_i_n _P_o_l_y_n_o_m_i_a_l_s

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

     Using the Bernstein polynomial density estimation to estimate the
     proportion pi0 of true null hypotheses based p-values.  A
     nonparametric estimate of false discovery rates (FDR's) are also
     calculated. 'nFDR' calls a C program to search the minimizer (r,k)
     of a partial mean square error and returns the proportion of true
     null hypotheses, FDR, FNR, and q-values.

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

     nFDR(x, r0, k0, K, alpha = 0.05, Trial.r = 5, Trial.k = 10, Method = "approx", Smooth = TRUE)

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

       x: a vector of p-values 

      r0: initial guess of r 

      k0: initial guess of k 

       K: Upper limit for r 

   alpha: significance level 

 Trial.r: number of trials for searching r 

 Trial.k: number of trials for searching k 

  Method: default is "approx" 

  Smooth: default is TRUE 

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

     If either of 'Trial.r' or 'Trial.k' is zero, then the search of
     (r,k) is skipped and choose (r,k)=(r0,k0).

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

     a list containing:  

       p: sorted p-values 

  (r,k) : minimizer of the partial mean square error pMSE 

    PI0 : estimated proportion pi0 of true null hypotheses 

cint.pi0 : confidence interval for the proportion pi0 of true null
          hypotheses 

    FDR : estimated false discovery rate (FDR) according to p

    FNR : estimated false nondiscovery rate (FNR) according to p

Cint.fdr : confidence interval for FDR according to p

 qvalue : qvalue according to p

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

     Zhong Guan {zguan@iusb.edu}

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

     Zhong Guan, Baolin Wu and Hongyu Zhao(2005),    Nonparametric
     estimator of false discovery rate based on Bernstein polynomials

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

     set.seed (777)
     library(nFDR) # load the package
     n<-200  # sample size
     pi0<-0.70 # proportion of true null hypotheses
     x<-c(runif(n*pi0,0,1), rbeta(n*(1-pi0), 1, 6))
      ## simulate n p-values from mixture of beta(1,6) and uniform(0,1)
     res<-nFDR(x, r0 = 5, k0 = 50, K = .5*n, alpha = 0.05, Trial.r = 3, Trial.k = 5, Method = "approx", Smooth = TRUE)
     res$PI0 # estimated proportion of true nulls

