wfromx             package:EbayesThresh             R Documentation

_F_i_n_d _E_m_p_i_r_i_c_a_l _B_a_y_e_s _w_e_i_g_h_t _f_r_o_m _d_a_t_a

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

     Suppose the vector (x_1, ..., x_n) is such that x_i is drawn
     independently from  a normal distribution with mean theta_i and
     variance 1. The prior distribution of the theta_i is a mixture
     with probability 1-w of zero and probability w of a given
     symmetric heavy-tailed distribution. This routine finds the
     marginal maximum likelihood estimate of the parameter w.

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

     wfromx(x, prior = "laplace", a = 0.5)

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

       x: vector of data

   prior: specification of prior to be used; can be "cauchy" or 
          "laplace"

       a: scale factor if Laplace prior is used.  Ignored if Cauchy
          prior is used. 

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

     The weight is found by marginal maximum likelihood. The search is
     over weights corresponding to thresholds  in the range  [0, sqrt{2
     log n}],  where n is the length of the data vector.

     The search is by binary search for a solution to the equation 
     S(w)=0, where S is the derivative of the log likelihood. The
     binary search is on a logarithmic scale in w.

     If the Laplace prior is used, the scale parameter is fixed at the
     value given for 'a', and defaults to 0.5 if no value is provided. 
     To estimate 'a' as well as 'w' by marginal maximum likelihood, use
     the routine 'wandafromx'.

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

     The numerical value of the estimated weight.

_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:

     'wandafromx', 'tfromx', 'tfromw', 'wfromt'

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

     wfromx(x=rnorm(100, c( rep(0,90), rep(5,10))), prior="cauchy")

