WaveThresh
Help
nullevels.wd
Sets whole resolution levels of coefficients equal to zero in a
wd object.
DESCRIPTION
Sets whole resolution levels of coefficients equal to zero in a
wd object.
USAGE
nullevels.wd(wd, levelstonull)
REQUIRED ARGUMENTS
- wd
- An object of class wd.
- levelstonull
- An integer vector specifying which resolution levels of coefficients of
wd that you wish to set to zero.
OPTIONAL ARGUMENTS
None.
VALUE
An object of class wd where the coefficients
in resolution levels specified by levelstonull
have been
set to zero.
SIDE EFFECTS
None
DETAILS
Setting whole resolution levels of coefficients to zero can be very
useful. For example, one can construct a linear smoothing method by
setting all coefficients above a particular resolution (the
primary resolution equal to zero. Also setting particular
levels equal to zero can also be useful for removing noise which is
specific to a particular resolution level (as long as important signal
is not also contained at that level).
To remove individual coefficients on a systematic basis you probably
want to look at the threshold function.
RELEASE
Version 3.8.1 Copyright Guy Nason 1997
SEE ALSO
nullevels,
wd,
wd object,
threshold.
EXAMPLES
#
# Generate some test data
#
> test.data <- example.1()$y
#
# Do wavelet transform of test.data and plot the wavelet coefficients
#
> wds <- wd(test.data)
> plot(wds)
#
# Now let us set all the coefficients in ODD resolution levels equal to zero!
#
# This is just to illustrate the capabilities of the function. I cannot
# imagine you wanting to do this in practice!
#
> wdsnl <- nullevels(wds, levelstonull = c(1, 3, 5, 7))
#
# Now let's plot the result
#
> plot(wdsnl, scaling = "by.level")
#
# Lo and behold the odd levels have been set to zero!