nullevels.wd: Sets whole resolution levels of coefficients equal to zero in...

nullevels.wdR Documentation

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

## S3 method for class 'wd'
nullevels(wd, levelstonull, ...)

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.

...

any other arguments

Details

Setting whole resolution levels of coefficients to zero can be very useful. For examples, 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).

Note that this function removes the horiztonal, diagonal and vertical detail coefficients at the resolution level specified. It does not remove the father wavelet coefficients at those resolution levels.

To remove individual coefficients on a systematic basis you probably want to look at the threshold function.

Value

An object of class wd where the coefficients in resolution levels specified by levelstonull have been set to zero.

RELEASE

Version 3.8.1 Copyright Guy Nason 1997

Author(s)

G P Nason

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)
## Not run: 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
#
## Not run: plot(wdsnl, scaling = "by.level")
#
# Lo and behold the odd levels have been set to zero!

wavethresh documentation built on Nov. 16, 2022, 5:16 p.m.