|
wfromx |
|
Find Empirical Bayes Weight from Data |
DESCRIPTION
Given a vector of data, find the marginal maximum
likelihood choice of weight.
USAGE
x = wfromx(x.prior,a)
REQUIRED ARGUMENTS
| x | a vector of data |
OPTIONAL ARGUMENTS
| prior |
specification of the prior to be used; can be 'cauchy' or 'laplace' |
| a | If the Laplace prior is used, a is the scale factor. If the Cauchy prior is used, a is ignored. |
VALUE
The numerical value of the
estimated weight is returned.
BACKGROUND
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=length(x). The search
is by binary search for a solution to the equation S(w)=0, where
S is the score function. The binary search is on a logarithmic scale
in w.
SEE ALSO
EXAMPLES
weight
= wfromx(x)