ebayesthresh.wavelet {EbayesThresh} | R Documentation |
Empirical Bayes thresholding on the levels of a wavelet transform.
Description
Apply an Empirical Bayes thresholding approach level by level to the detail coefficients in a wavelet transform.
Usage
ebayesthresh.wavelet(xtr, vscale = "independent", smooth.levels = Inf,
prior = "laplace", a = 0.5, bayesfac = FALSE,
threshrule = "median")
ebayesthresh.wavelet.dwt(x.dwt, vscale = "independent", smooth.levels = Inf,
prior = "laplace", a = 0.5, bayesfac = FALSE,
threshrule = "median")
ebayesthresh.wavelet.wd(x.wd, vscale = "independent", smooth.levels = Inf,
prior = "laplace", a = 0.5, bayesfac = FALSE,
threshrule = "median")
ebayesthresh.wavelet.splus(x.dwt, vscale = "independent", smooth.levels = Inf,
prior = "laplace", a = 0.5, bayesfac = FALSE,
threshrule = "median")
Arguments
xtr |
The wavelet transform of a vector of data. The transform is obtained using one of the wavelet transform routines in R or in S+WAVELETS. Any choice of wavelet, boundary condition, etc provided by these routines can be used. |
x.dwt |
Wavelet transform input for |
x.wd |
Wavelet transform input for |
vscale |
Controls the scale used at different levels of the
transform. If |
smooth.levels |
The number of levels to be processed, if less than the number of levels of detail calculated by the wavelet transform. |
prior |
Specification of prior to be used for the coefficients at
each level, conditional on their mean being nonzero; can be
|
a |
Scale factor if Laplace prior is used. Ignored if Cauchy
prior is used. If, on entry, |
bayesfac |
If |
threshrule |
Specifies the thresholding rule to be applied to the
coefficients. Possible values are |
Details
The routine ebayesthresh.wavelet
can process a wavelet transform
obtained using the routine wd
in the WaveThresh R package, the
routines dwt
or modwt
in the waveslim R package, or one
of the routines (either dwt or nd.dwt) in S+WAVELETS.
Note that the wavelet transform must be calculated before the routine ebayesthresh.wavelet is called; the choice of wavelet, boundary conditions, decimated vs nondecimated wavelet, and so on, are made when the wavelet transform is calculated.
Apart from some housekeeping to estimate the standard deviation if
necessary, and to determine the number of levels to be processed, the
main part of the routine is a call, for each level, to the smoothing
routine ebayesthresh
.
The basic notion of processing each level of detail coefficients is
easily transferred to transforms constructed using other wavelet
software. Similarly, it is straightforward to modify the routine to
give other details of the wavelet transform, if necessary using the
option verbose = TRUE
in the calls to ebayesthresh
.
The main routine ebayesthresh.wavelet
calls the relevant one of
the routines ebayesthresh.wavelet.wd
(for a transform obtained
from WaveThresh), ebayesthresh.wavelet.dwt
(for transforms
obtained from either dwt
or modwt
in waveslim) or
ebayesthresh.wavelet.splus
(for transforms obtained from
S+WAVELETS.
Value
The wavelet transform (in the same format as that supplied to the routine) of the values of the estimated regression function underlying the original data.
Author(s)
Bernard Silverman
References
Johnstone, I. M. and Silverman, B. W. (2005) Empirical Bayes selection of wavelet thresholds. Annals of Statistics, 33, 1700–1752.
See also the other references given for ebayesthresh
and
at http://www.bernardsilverman.com.