Suppose the vector (x_1, …, x_n) is such that x_i is drawn independently from a normal distribution with mean θ_i and standard deviation s_i (s_i equals 1 for Cauchy prior). 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.
Vector of data.
A single value or a vector of standard deviations if the
Laplace prior is used. If a vector, must have the same length as
Specification of prior to be used; can be
Scale factor if Laplace prior is used. Ignored if Cauchy prior is used.
The weight is found by marginal maximum likelihood.
The search is over weights corresponding to threshold t_i in the
range [0, s_i sqrt(2 log n)] if
universalthresh=TRUE, where n is the length of the data
vector and (s_1, ... , s_n) (s_i is 1 for Cauchy prior) is the
vector of sampling standard deviation of data (x_1, ... , x_n);
otherwise, the search is over [0, 1].
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
a, and defaults to 0.5 if no value is provided. To
a as well as
w by marginal maximum likelihood,
use the routine
The numerical value of the estimated weight.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.