threshold.mwd(mwd, levels = 3:(mwd$nlevels - 1), type = "hard", policy = "universal", boundary = F, verbose = F, return.threshold = F, threshold = 0, covtol = 1e-09, robust = T, return.chisq = F, bivariate = T)
levels
nlevels(wd)-1
inclusive.
Only the levels in this vector contribute to the computation of the
threshold and its application.
type
"hard"
or "soft"
.
policy
"universal"
,
"manual"
,
"single"
.
The policies are described in detail below.
boundary
TRUE
then the boundary bookeeping values are
included for thresholding, otherwise they are not.
verbose
TRUE
then the function prints out informative messages as it progresses.
return.threshold
TRUE
then the actual
value of the threshold
is returned. If this option is FALSE then a thresholded version of the
input is returned.
threshold
policy="manual"
then value
is the actual
threshold value. Any other policy
means that the
threshold
value is ignored.
covtol
covtol
then it is assumed to be singular and no thresholing is done
at that level.
Note: do not confuse covtol
with cvtol
an argument in threshold.wd.
robust
return.chisq
return.threshold
option is set to TRUE then the threshold
values will be returned, or if
return.chisq
the vector of values to be thresholded will be
returned,
rather than the thresholded object.
type
argument.
Unless policy="single"
, the following method is applied.
The columns of mwd$D
are taken as coefficient vectors D_j,k.
From these chisq_j,k=D_j,k . V_j^-1 . D_j,k is computed, where V_j^-1
is the inverse of the estimated variance of the coefficient vectors in
that level (j). Chisq_j,k is a positive scalar which is to be thresholded
in a similar manner to univariate hard or soft thresholding.
To obtain the new values of D_j,k shrink the vector by the same proportion
as was the corresponding chisq_j,k term.
policy="single"
then univariate thresholding is applied to each element of D as in
(Strela et al 1999).
universal
threshold is computed using 2log(n)
(See Downie & Silverman 1996)
where n is the number of coefficient vectors to be thresholded.
"manual"
policy is simple.
You supply a threshold value to the threshold
argument
and hard
or soft
thresholding is performed using that value.
# # Generate some test data # test.data <- example.1()$y tsplot(test.data) # # Generate some noisy data # ynoise <- test.data + rnorm(512, sd=0.1) # # Plot it # tsplot(ynoise) # # Now take the discrete multiple wavelet transform # N.b. I have no idea if the default wavelets here are appropriate for # this particular example. # ynmwd <- mwd(ynoise) plot(ynwd) # [1] 2.020681 2.020681 2.020681 2.020681 2.020681 2.020681 2.020681 # # Now do thresholding. We'll use the default arguments. # ynmwdT <- threshold(ynmwd) # # And let's plot it # plot(ynmwdT) # # Let us now see what the actual estimate looks like # ymwr <- wr(ynwdT) # # Here's the estimate... # tsplot(ywr1)