as.mvLSW: Multivariate Locally Stationary Wavelet Object

View source: R/mvLSW.R

as.mvLSWR Documentation

Multivariate Locally Stationary Wavelet Object

Description

Constructs a multivariate locally stationary wavelet (mvLSW) object.

Usage

  as.mvLSW(x, filter.number = 1, family = "DaubExPhase",
    smooth.type = "all", smooth.kernel = kernel("daniell", 0), 
    bias.correct = FALSE, min.eig.val = -Inf, names = NULL)
  
  is.mvLSW(object)

Arguments

x

4D array of order PxPxJxT where P is the number of channels of the time series of length T such that T=2^J for some positive integer J defining the levels of the mvLSW object.

family

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

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.

smooth.type

What type of smoothing regime has been applied. Either "all" (default) if the smoothing method been applied to all levels. Otherwise "by.level", a different smoothing method is applied to each level.

smooth.kernel

Definition of the smoothing kernel from kernel(). By default, the identity kernel is defined.

bias.correct

Logical, has a bias correction been applied to the data. FALSE by default.

min.eig.val

Minimum eigenvalue from spectral matrices across all levels and locations, set at -Inf by default. If NA, then the minimum eigenvalue is calculated.

names

Character vector containing the channel names of the multivariate time series.

object

Any R object.

Details

as.mvLSW constructs a multivariate locally stationary classed object that contains all information about the constructions of various multivariate wavelet estimates.

The command is.mvLSW checks that the supplied R object is a valid mvLSW object in that its structure and contents are as expected.

Value

The as.mvLSW command invisibly returns a list with the following items:

spectrum

A 4D array containing the data relating to the estimate of interest.

Information

List containing information on the estimation procedure.

The list Information contains:

names

Character vector containing the channel names.

dimensions

A list containing items P - the number of channels forming of the time series, T - the length of the time series and J - the number of levels in the wavelet transform of the data.

wavelet

A list containing the filter.number and family of the wavelet used in the transformation.

smooth

A list detailing applied smoothing of the estimate. Items include:

smooth.type - name of the smoothing regime.

smooth.kernels - a tskernel class from the command kernel().

GCV - generalized cross-validation gamma deviance criterion of the smoothing.

smooth.eps - smoothing threshold.

If smooth.type="by.level", then smooth.kernels is a list containing the tskernel object for each level from fine to coarse. In addition, GCV is a length J vector containing the criterion estimate for each level from fine to coarse.

correction

A list containing bias.correction and min.eig.val.

The command is.mvLSW returns TRUE if the supplied object is a valid mvLSW object as described above. Otherwise, the command returns FALSE.

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.

See Also

mvEWS, varEWS, kernel.

Examples

## 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 EWS as mvLSW object
EWS <- as.mvLSW(x = Spec, filter.number = 1, family = "DaubExPhase", 
  names = c("A", "B", "C"), min.eig.val = NA)
is.mvLSW(EWS)
plot(EWS, style = 2, info = 2)

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

Related to as.mvLSW in mvLSW...