mvEWS: Multivariate Evolutionary Wavelet Spectrum

View source: R/mvLSW.R

mvEWSR Documentation

Multivariate Evolutionary Wavelet Spectrum

Description

Calculates the multivariate Evolutionary Wavelet Spectrum (mvEWS) of a multivariate locally stationary time series.

Usage

  mvEWS(X, filter.number = 1, family = "DaubExPhase", 
    smooth = TRUE, type = "all", kernel.name = "daniell", 
    kernel.param = floor(sqrt(nrow(X))), optimize = FALSE, 
    smooth.Jset = NA, bias.correct = TRUE, tol = 1e-10,
    verbose = FALSE)

Arguments

X

A multivariate time series object of class ts, zoo, xts or matrix. The length of the time series must be 2^J for positive integer J.

filter.number

Integer number defining the number of vanishing moments of the wavelet function. By default, filter.number=1 and so defining the Haar wavelet.

family

Character string specifying the wavelet family. Only two options are available, either "DaubExPhase" (default) or "DaubLeAsymm".

smooth

Logical, should the mvEWS should be smoothed?

type

How should the smoothing be performed? If "all" (default) then the same smoothing kernel is applied to all levels, else if "by.level" then a different smoothing kernel is applied to each level.

kernel.name

Name of smoothing kernel to be supplied to kernel(). Kernel "daniell" is defined by default.

kernel.param

Parameters to be passed to kernel(). This argument must be a vector if type="all", otherwise it must be a matrix with each column defining the kernel parameters for each log2(nrow(X)) levels from coarse to fine. If the name is "dirichlet" or "fejer" then kernel.param must have length 2 (or a matrix with 2 rows) which are supplied to kernel() as arguments m and r respectively. Note that the width of the kernel cannot be larger than the time series length. This is set by default as the square root of the length of the time series.

optimize

Logical, should the smoothing be optimized? If FALSE (default) then smoothing is performed as specified with kernel.name and kernel.param. Otherwise, kernel.param defines the upper parameter bound in determining the optimal kernel is determined by minimising the generalized cross-validation gamma deviance criterion.

smooth.Jset

Integer vector indicating with levels to be included in the calculation of the generalized cross-validation gamma deviance criterion. This argument is only used if type="all" and is set as NA by default, implying that all levels should be used.

bias.correct

Logical, should the correction be applied to address the bias in the raw mvEWS estimator.

tol

Tolerance in applying matrix regularisation to ensure each mvEWS matrix per location and level to be strictly positive definite. If NA or -Inf then the threshold is not applied. This is 1e-10 by default.

verbose

Logical. Controls the printing of messages whist the computations progress. Set as FALSE as default.

Details

This command evaluates the multivariate evolutionary wavelet spectrum of a multivariate locally stationary wavelet time series. The order of operations are as follows:

Calculate the non-decimated wavelet coefficients \{d^{(p)}_{j,k}\} for levels j = 1,...,J, locations k = 0,...,T-1 (T=2^J) and channels p = 1,...,P(=ncol(X)). The raw periodogram matrices are then evaluated by I^{(p,q)}_{j,k} = d^{p}_{j,k}d^{q}_{j,k} between any channel pair p & q.

The above estimator is inconsistent and so the matrix sequence is smoothed: \tilde{I}^{(p,q)}_{j,k} = ∑_i W_i I^{(p,q)}_{j,k+i}. The kernel weights W_i are derived from the kernel command and satisfy W_i=W_{-i} and ∑_i W_i = 1. The optimal parameter for the smoothing kernel is determined by minimising the generalized cross-validation gamma deviance criterion (see Ombao et al., 2005).

The raw wavelet periodogram is also a biased estimator. A correction is subsequently applied to the smoothed estimate as follows:

\hat{S}_{j,k} =∑_{l=1}^{J} (A^{-1})_{j,l} \hat{I}_{l,k}

Here, A denotes the wavelet autocorrelation inner product matrix.

If chosen to, the mvEWS matrices at each level and location, \hat{S}_{j,k}, is regularised to ensure positive definiteness.

Value

An object of class mvLSW, invisibly.

References

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 time-evolving partial coherence between signals via multivariate locally stationary wavelet processes. Signal Processing, IEEE Transactions on 62(20) pp. 5240-5250.

Ombao, H., von Sachs, R. and Guo, W. (2005) SLEX analysis of multivariate nonstationary time series. Journal of the American Statistical Association 100(470) pp.519-531.

See Also

ts, wd, kernel, as.mvLSW, ipndacw.

Examples

## Sample bivariate locally stationary time series
set.seed(100)
X <- matrix(rnorm(2 * 2^8), ncol = 2)
X[1:2^7, 2] <- 3 * (X[1:2^7, 2] + 0.95 * X[1:2^7, 1])
X[-(1:2^7), 2] <- X[-(1:2^7), 2] - 0.95 * X[-(1:2^7), 1]
X[-(1:2^7), 1] <- X[-(1:2^7), 1] * 4
X <- as.ts(X)

## Haar wavelet, apply same smoothing to all levels & optimize
EWS <- mvEWS(X, kernel.name = "daniell", kernel.param = 20, 
  optimize = TRUE)
summary(EWS)
plot(EWS, style = 2, info = 1)

## Over smoothed EWS
EWS_smooth <- mvEWS(X, filter.number = 10, family = "DaubLeAsymm",
  kernel.name = "modified.daniell", kernel.param = c(5, 5),
  optimize = FALSE)
summary(EWS_smooth)
plot(EWS_smooth, style = 2, info = 1)

mvLSW documentation built on June 14, 2022, 5:06 p.m.

Related to mvEWS in mvLSW...