Learn R Programming

wmtsa (version 2.0-3)

wavGain: The gain functions for Daubechies wavelet and scaling filters

Description

Given \(\{g\}\) and \(\{h\}\) are the impulse responses for the scaling and wavelet filters, respectively, and \(G_1(f)\) and \(H_1(f)\) are their corresponding gain functions, then the gain functions for decomposition level \(j > 1\) are calculated using the recursive algorithm:

$$ H_j(f)=H_1(2^{j-1}f) G_{j-1}(f),\] \[ G_j(f)=G_1(2^{j-1}f) G_{j-1}(f). $$

Usage

wavGain(wavelet="s8", n.levels=5, n.fft=1024, normalize=TRUE)

Arguments

n.fft

the number of Fourier coefficients to use in approximating the gain functions. Default: 1024.

n.levels

the number of decomposition levels. Default: 5.

normalize

a boolean value. If TRUE, the filters are normalized by dividing each filter coefficient by the \(\sqrt{2}\) (used for maximal overlap wavelet transforms). If FALSE, no normalization is used. Default: TRUE.

wavelet

a character string denoting the filter type. See wavDaubechies for details. Default: "s8".

Value

an object of class wavGain.

References

D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.

I. Daubechies, Orthonormal Bases of Compactly Supported Wavelets, Communications on Pure and, Applied Mathematics, 41, 909--96.

See Also

wavDaubechies.

Examples

Run this code
# NOT RUN {
## approximate the gain functions for the 
## normalized Daubechies least asymmetric 
## 20-tap filters for levels 1,...,5 using a 
## 1024 Fourier frequencies 
result <- wavGain(wavelet="s20", n.levels=5,
    norm=TRUE)

## plot the results 
plot(result)
# }

Run the code above in your browser using DataLab