sampleSize               package:SSPA               R Documentation

_C_r_e_a_t_e_s _a_n _o_b_j_e_c_t _o_f _c_l_a_s_s _S_a_m_p_l_e_S_i_z_e

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

     The function 'sampleSize' initializes a 'SampleSize'-object. The
     density of effect-sizes is estimated using a deconvolution
     estimator or constrained optimization using B-splines.

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

     sampleSize(PilotData, method = c("Langaas", "Storey", "Ferreira", "Ruppert", "Userdefined"), from = -6, to = 6, resolution = 2^10, kernel = c("fan", "wand", "sinc"), pi0 = seq(0.1, 0.99, 0.01), adjust=TRUE, nKnots = 11, bDegree = 3, ...)

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

PilotData: object of class 'PilotData' on which the sample size and
          power analysis will be performed

  method: character string giving the method for estimation of the
          fraction of non-differentially expressed genes either one of:

             *  "Langaas" (default) 

             *  "Storey" 

             *  "Ferreira" 

             *  "Ruppert"  

             *  "Userdefined"

    from: Lower bound of the density of effect-sizes (the range should
          be symmetric)

      to: Upper bound of the density of effect-sizes.

resolution: the number of points on which the density of effect-sizes
          will be estimated (must be a power of 2)

  kernel: the kernel type used in the deconvolution estimator either
          one of:

             *  "fan" (default)

             *  "wand"

             *  "sinc"

     pi0: numeric or a vector of type numeric giving the fraction of
          non-differentially expressed genes. If 'method="Userdefined"'
          a userdefined pi0 is obligated. If method="Ferreira" a range
          of values should be given e.g. 'seq(0.01, 0.99, 0.01)'

  adjust: is the density of effect sizes adjusted ('adjust=TRUE',
          default) or not  ('adjust=FALSE')

  nKnots: number of knots used in Rupperts method for estimating the
          proportion of non-differentially expressed genes and density
          of effect-sizes

 bDegree: degree of B-spline basis used in Rupperts method for
          estimating the proportion of non-differentially expressed
          genes and density of effect-sizes

     ...: Additional parameters for method for the estimation of the
          fraction of non-differentially expressed genes (Doesn't work
          yet!)

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

     The 'sampleSize' function performes the estimation of the
     proportion of non-differentially expressed genes using one of the
     three methods, '"Langaas", "Storey", "Ferreira"' if
     'method="Userdefined"' a userdefined 'pi0' is needed and
     estimation of the proportion of non-differentially expressed genes
     will be skipped. A deconvolution estimator is implemented using
     the Fast Fourier Transform Algorithm 'fft()' for estimations of
     the density of effect sizes.  If 'method="Ruppert"' constrained
     optimization using B-splines is used, for this method two
     additional packages needs to be installed namely 'quadprog' and
     'splines'. Both the proportion of non-differentially expressed
     genes and the density of effect sizes are estimated with Ruppert's
     method. In contrast to the orginal method of Ruppert et al. (2007)
     we made a modification on the estimation of the density of effect
     sizes allowing for negative effect sizes as well.

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

     Object of class 'SampleSize'

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

     Maarten van Iterson

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

     Ferreira, F.A., Zwinderman, A., (2006). Approximate Power and
     Sample Size Calculations with Microarray Data: An Illustration.
     _Statistical Applications in Genetics and Molecular Biology_ 5,
     (1).

     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.

     Storey, J.D., (2002). A direct approach to false discovery rates.
     _J.R. Statist. Med._ 27, 1960-1972.

     Ruppert, D. and Nettleton, D. and Hwang, J.T.G., (2007). Exploring
     the information in p-values for the analysis and planning of
     multiple-test experiments. _Biometrics_, 63, 2, 483-95.

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

     'convest', 'qvalue' and 'SampleSize' use 'class?SampleSize'

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

     library(multtest)
     data(golub)
     teststat <- mt.teststat(golub, golub.cl)
     table(golub.cl)
     pd <- pilotData(name="golub", testStatistics=teststat, sampleSizeA=11, sampleSizeB=27)
     hist(pd)
     plot(pd)
     ss <- sampleSize(pd)

