marg.spec: Wavelet Packet Marginal Spectra

View source: R/margspec.R

marg.specR Documentation

Wavelet Packet Marginal Spectra

Description

marg.spec returns the time-average spectra of LSWP processes for each packet.

Usage

marg.spec(bas, spec, plot = TRUE)

Arguments

bas

is a (|b| x 2) matrix containing indices of a wavelet packet basis, where |b| is the number of packets in the basis.

spec

is a (|b| x T) matrix containing, in each row, the values of the time-varying spectra for each packet.

plot

should a plot of the marginal spectra vs frequency intervals be returned?

Details

This function computes the frequency intervals corresponding to each packet, along with the (time) average spectra for each packet.

This function is used to compute, and eventually plot, the time averaged spectra (or spectral estimate) vs packet frequencies. The arguments bas and spec shuld be provided as matrices.

Value

A (|b| x 2) matrix. In the first column the lower frequency relative to each packet is displayed. The second column contains the (time) average spectra.

Author(s)

Alessandro Cardinali

References

A. Cardinali and G.P. Nason (2017). Locally Stationary Wavelet Packet Processes: Basis Selection and Model Fitting. Journal of Time Series Analysis, 38:2, 151-174.

See Also

best.basis, get.wavelet.basis

Examples


wwb <- get.wavelet.basis(scale = 4)
wwp <- matrix(2^{-(1:4)}, nrow = 4, ncol = 512, byrow = FALSE)
msp <- marg.spec(bas = wwb, spec = wwp, plot = TRUE)


LSWPlib documentation built on March 18, 2022, 6:55 p.m.

Related to marg.spec in LSWPlib...