Description Usage Arguments Details Value References See Also Examples
Sample a multivariate locally stationary wavelet process.
1 2 3 4 
Transfer 
A 
Spectrum, object 
A 
noiseFN 
The function for sampling the innovations. 
nsim 
Number of mvLSW time series to draw. Only

seed 
Seed for the random number generator. 
... 
Optional arguments to be passed to the function for sampling the innovation process. 
Samples a single multivariate locally stationary wavelet time
series for the given set of transfer function matrices. These
are assumed to be lowertriangular (including diagonal) matrices.
If the mvEWS is supplied instead, then
this is preprocessed by Spectrum2Transfer()
to obtain
the transfer function matrices.
The Transfer
and Spectrum
are both mvLSW
objects and therefore contain information about defining the
wavelet function.
The innovation process is assumed to be second order stationary
with expectation zero, orthogonal and unit variance. The first argument
of noiseFN
must be n
and define the number of samples
to generate. The function must also return a numerical vector
of length n
.
The simulate
command implements rmvLSW
under default
arguments unless specified via ...
.
A ts
matrix object of a multivariate locally stationary
time series. The columns of the matrix correspond to different
channels and the rows identify the time axis.
Taylor, S.A.C., Park, T.A. and Eckley, I. (2019) Multivariate locally stationary wavelet analysis with the mvLSW R package. Journal of statistical software 90(11) pp. 1–16, doi: 10.18637/jss.v090.i11.
Park, T., Eckley, I. and Ombao, H.C. (2014) Estimating timeevolving partial coherence between signals via multivariate locally stationary wavelet processes. Signal Processing, IEEE Transactions on 62(20) pp. 52405250.
mvLSW
, Spectrum2Transfer
,
rnorm
, AvBasis
, ts
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  ## Define evolutionary wavelet spectrum, structure only on level 2
Spec < array(0, dim = c(3, 3, 8, 256))
Spec[1, 1, 2, ] < 10
Spec[2, 2, 2, ] < c(rep(5, 64), rep(0.6, 64), rep(5, 128))
Spec[3, 3, 2, ] < c(rep(2, 128), rep(8, 128))
Spec[2, 1, 2, ] < Spec[1, 2, 2, ] < punif(1:256, 65, 192)
Spec[3, 1, 2, ] < Spec[1, 3, 2, ] < c(rep(1, 128), rep(5, 128))
Spec[3, 2, 2, ] < Spec[2, 3, 2, ] < 0.5
## Define Haar wavelet function and create mvLSW object
EWS < as.mvLSW(x = Spec, filter.number = 1, family = "DaubExPhase",
min.eig.val = NA)
plot(EWS, style = 2, info = 2)
## Sample with Gaussian innovations
set.seed(10)
X < rmvLSW(Spectrum = EWS)
plot(X)
## Alternatively:
X1 < simulate(object = EWS)
plot(X1)
## Define smoother wavelet function and create mvLSW object
EWS2 < as.mvLSW(x = Spec, filter.number = 10, family = "DaubExPhase")
## Sample with logistic innovations
set.seed(10)
X2 < rmvLSW(Spectrum = EWS2, noiseFN = rlogis, scale = sqrt(3)/pi)
plot(X2)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.