filter.select {wavethresh}R Documentation

Wavelet Filter Coefficients

Description

This function stores the filter coefficients necessary for doing a discrete wavelet transform (and its inverse).

Usage

filter.select(filter.number,
              family = c("DaubExPhase", "DaubLeAsymm"), constant = 1)

Arguments

filter.number integer, selecting the desired filter; takes a value dependent upon the family that you select.
family character string, selecting the type of wavelet.
constant numeric; is applied as a multiplier to all the coefficients. It can be a vector, and so you can adapt the filter coefficients to be whatever you want. (This is feature of negative utility.)

Details

This function contains three types of filter. Two types can be selected with family set to "DaubExPhase" (as per default), these wavelets are the Haar wavelet (selected by filter.number=1 within this family) and Daubechies ``extremal phase'' wavelets selected by filter.numbers ranging from 2 to 10 as proposed in Daubechies (1988). Setting family to "DaubLeAsymm" gives you Daubechies least asymmetric wavelets also from Daubechies (1988), but here the filter number ranges from 4 to 10.

For Daubechies wavelets, filter.number corresponds to the N of that paper, the wavelets become more regular as the filter.number increases, but they are all of compact support.

This function is currently used by wr and wd in decomposing and reconstructing, however you may wish to look at the coefficients.

Value

A list is returned with four components describing the filter:

H A vector containing the filter coefficients.
name A character string containing the name of the filter.
family A character string containing the family of the filter.
filter.number The filter number used to select the filter.

NOTE

The filter coefficients should always sum to sqrt(2). This is a useful check on their validity.

See Also

wd, wr, for background information; accessC, accessD, imwd, imwr, threshold.

Examples

## look at the filter coefficients for N=2 :
str(f2 <- filter.select(2))
##- List of 4
##-  $ H            : num [1:4]  0.483  0.837  0.224 -0.129
##-  $ name         : chr "Daub cmpct on ext. phase N=2"
##-  $ family       : chr "DaubExPhase"
##-  $ filter.number: num 2

all.equal(sum(f2 $H), sqrt(2))# TRUE

[Package wavethresh version 2.2-9 Index]