ebayesthresh

 

Empirical Bayesian Thresholding

 

DESCRIPTION

 
Given a sequence of data, performs Empirical Bayes thresholding,

as discussed in Johnstone and Silverman (2002a)

 

USAGE

 

f = ebayesthresh(x,prior,a,bayesfac,sdev,verbose,threshrule,isotone)

 

REQUIRED ARGUMENTS

 

x

 

a data value or a vector of data

 

OPTIONAL ARGUMENTS

 

prior

 

The prior to be used conditional on the mean being nonzero.

Possible values are 'laplace' for the Laplace prior and

'cauchy' for the quasi-Cauchy prior.

a

 

The scale factor if the Laplace prior is used. If, on entry, a=[]

and prior='laplace', then the scale parameter a will be

estimated by marginal maximum likelihood.

If the quasi-Cauchy prior is used then this argument is ignored.

bayesfac

 

If bayesfac=1 then whenever a threshold is explicitly calculated, the Bayes

factor threshold will be used, viz the value of the data such that the posterior

probability that the underlying mean is zero is exactly 0.5.

Otherwise the posterior median threshold will be used.

sdev   The sampling standard deviation of the data x. If, on entry, sdev=[], then the standard deviation will be estimated using the median absolute deviation from zero, as medad(x,0).
verbose   1 or 0. Controls the level of output
threshrule   Specifies the thresholding rule to be applied to the data. Possible values are 'median' (use the posterior median); 'mean' (use the posterior mean); 'hard' (carry out hard thresholding); 'soft' (carry out soft thresholding); 'none' (find various parameters, but do not carry out any thresholding).
isotone switch for monote marginal likelihood estimation (default 0)

 

VALUE

 

DETAILS

The appropriate routines elsewhere in the package are called to perform the actual calculations.

 

REFERENCES

 

Johnstone, I. M. and Silverman, B. W. (2004). (2004) Needles and straw in haystacks: Empirical Bayes estimates of possibly sparse sequences. Annals of Statistics, 32, 1594–1649.

Johnstone, I. M. and Silverman, B. W. (2004) EbayesThresh: R and S-PLUS software for Empirical Bayes thresholding. Submitted for publication.
Johnstone, I. M. and Silverman, B. W. (2005) Empirical Bayes selection of wavelet thresholds. Annals of Statistics, 33, to appear.

The papers by Johnstone and Silverman are available from http://www.bernardsilverman.com.

 

 

SEE ALSO

 

wfromx, wandafromx, tfromw, postmean, postmed, threshold

 

EXAMPLES

 

kvals = 5;

muvals = 3;

errmat = randn(10,1);

zmean = zeros(size(errmat));

zmean(1:kvals) = muvals;

z = zmean + errmat;

f= ebayesthresh(z,'laplace',[],1,1,1,'median',0);