zetafromx            package:EbayesThresh            R Documentation

_E_s_t_i_m_a_t_i_o_n _o_f _a _p_a_r_a_m_e_t_e_r _i_n _t_h_e _p_r_i_o_r _w_e_i_g_h_t _s_e_q_u_e_n_c_e _i_n _t_h_e _E_b_a_y_e_s_T_h_r_e_s_h _p_a_r_a_d_i_g_m

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

     Suppose a sequence of data has underlying mean vector with
     elements theta_i. Given the sequence of data, and a vector of
     scale factors 'cs'  and a lower limit 'pilo',  this routine finds
     the marginal maximum likelihood estimate of the parameter 'zeta'
     such that the prior probability of theta_i being  nonzero is of
     the form 'median(pilo, zeta*cs, 1)'.

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

     zetafromx(xd, cs, pilo = NA, prior = "laplace", a = 0.5)

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

      xd: a vector of data

      cs: a vector of scale factors, of the same length as 'x'

    pilo: the lower limit for the estimated weights.  If 'pilo=NA' it 
          is calculated according to the sample size to be the weight
          corresponding to the universal threshold sqrt{2 log n}.

   prior: specification of prior to be used  conditional on the mean
          being nonzero;  can be 'cauchy' or 'laplace' 

       a: scale factor if Laplace prior is used.   Ignored if Cauchy
          prior is used.  If, on entry, 'a=NA' and 'prior="laplace"',
          then the scale  parameter will also be estimated by marginal
          maximum likelihood.  If 'a' is not specified then the default
          value 0.5 will be used. 

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

     An exact algorithm is used, based on splitting the range up for
     '\zeta'  into subintervals over which no element of zeta*'cs'
     crosses either 'pilo' or 1.   Within each of these subintervals,
     the log likelihood is concave and its maximum can be found to
     arbitrary accuracy;   first the derivatives at each end of the
     interval are checked to see if there is an internal maximum at
     all, and if there is this can be  found by a binary search for a
     zero of the derivative.    Finally, the maximum of all the local
     maxima over these subintervals is found.

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

     A list with the following elements 

    zeta: The value of 'zeta' that yields the marginal maximum
          likelihood

       w: The weights (prior probabilities of nonzero) yielded by this
          value of 'zeta'

      cs: The factors as supplied to the program

    pilo: The lower bound on the weight, either as supplied or as
          calculated internally

_N_o_t_e:

     Once the maximizing 'zeta' and corresponding weights have been
     found,  the thresholds can be found using the program 'tfromw',
     and these can be used to process the original data using the
     routine 'threshld'.

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

     Bernard Silverman

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

     See 'ebayesthresh' and <URL: http://www.bernardsilverman.com>

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

     'tfromw', 'threshld', 'wmonfromx', 'wfromx'

