LSWPsim: Simulation of LSWP processes

View source: R/LSWPsim.R

LSWPsimR Documentation

Simulation of LSWP processes

Description

LSWPsim returns simulated time series from a specified LSWP specification.

Usage

LSWPsim(bb, spec, lev, wavelet, N)

Arguments

bb

a wavelet packet basis for the simulated process.

spec

a (locally stationary) spectra corresponding to the wavelet packet basis.

lev

the maximum level of the basis that is considered for simulation. Usually this is set as the maximum level in bb.

wavelet

the Daubechies wavelet used to build wavelet packets to simulate the process. See also Details.

N

the number of realizations to be simulated.

Details

This function produces one or multiple realizations of an LSWP process that is specified in terms of a wavelet packet basis and its corresponding spectra.

The function simulates realizations accordingly to the specified arguments. The wavelet argument is specified as in other functions of this package. Therefore, the current implementation allows for three discrete wavelets: Haar ("haar"), Daubechies Extremal Phase linear filters of length 4 ("d4") and Least Asymmetric linear filters of length 8 ("la8").

Value

If N = 1 the function returns a vector containing the simulated time series. If N > 1 the function returns a matrix with N columns each containing a different simulated series.

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

LSWPspec, best.basis, get.flat.basis, get.wavelet.basis.

Examples


wwb <- get.flat.basis(scale = 4)
wwp <- matrix(2^{-(1:4)}, nrow = 4, ncol = 512, byrow = FALSE)
xt <- LSWPsim(bb = wwb, spec = wwp, lev = 4, wavelet = 'la8', N = 10)


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

Related to LSWPsim in LSWPlib...