EbayesThresh: R and S-Plus programs for Empirical Bayes thresholding

This report sets out a package of R and S-PLUS routines that implement a class of Empirical Bayes thresholding methods. The prior considered for each parameter in a sequence is a mixture of an atom of probability at zero and a heavy-tailed density. The package allows for the heavy-tailed density to be either a Laplace (double exponential) density or else a mixture of normal distributions with tail behavior similar to that of the Cauchy distribution. The mixing weight, or sparsity parameter, is chosen by marginal maximum likelihood. In the case of the Laplace density, the scale parameter may also be chosen by marginal maximum likelihood. If estimation is carried out using the posterior median, this is a random thresholding procedure; the estimation can also be carried out using other thresholding rules with the same threshold, and the package provides the posterior mean, and hard and soft thresholding, as additional options. This report gives details of the calculations needed for implementing the procedures. In addition, an iterated least squares isotone regression method allows for the choice of a threshold that depends monotonically on the order in which the observations are made. Finally, a routine is provided that applies the method level by level to wavelet transforms as obtained using S+WAVELETS.