| zetafromx {EbayesThresh} | R Documentation |
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).
zetafromx(xd, cs, pilo = NA, prior = "laplace", a = 0.5)
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.
|
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.
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 |
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.
Bernard Silverman
See ebayesthresh and http://www.bernardsilverman.com
tfromw, threshld, wmonfromx, wfromx