tfromw             package:EbayesThresh             R Documentation

_F_i_n_d _t_h_r_e_s_h_o_l_d _f_r_o_m _m_i_x_i_n_g _w_e_i_g_h_t

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

     Given a weight or vector of weights (i.e. prior probabilities that
     the parameter is nonzero),  find the corresponding threshold(s)
     under the specified prior.

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

     tfromw(w, prior = "laplace", bayesfac = FALSE, a = 0.5)

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

       w: prior weight or vector of weights

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

bayesfac: specifies whether Bayes factor threshold should be used
          instead of posterior median threshold

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

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

     The Bayes factor method uses a threshold such that the posterior
     probability of zero is  exactly half if the data value is equal to
     the threshold.   If 'bayesfac' is set to FALSE (the default)  then
     the threshold is that of the posterior median function given the
     data value.

     The routine carries out a binary search over each component of an
     appropriate vector function, using the routine  'vecbinsolv'.  
     For the posterior median threshold, the function to be zeroed is
     'laplace.threshzero' or 'cauchy.threshzero'. For the Bayes factor
     threshold, the corresponding functions are 'beta.laplace' or
     'beta.cauchy'.

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

     The value or vector of values of the estimated threshold(s).

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

     'wfromx','tfromx','wandafromx'

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

     tfromw(c(0.05, 0.1)) 

     tfromw(c(0.05, 0.1), prior="cauchy", bayesfac=TRUE)

