ApxCI: Evaluate the Approximate Confidence Interval of a mvEWS...

View source: R/mvLSW.R

ApxCIR Documentation

Evaluate the Approximate Confidence Interval of a mvEWS Estimate

Description

Evaluate the approximate confidence interval of a multivariate evolutionary wavelet spectrum.

Usage

  ApxCI(object, var = NULL, alpha = 0.05, ...)

Arguments

object

A mvLSW object containing the multivariate evolutionary wavelet spectrum estimate.

var

A mvLSW object containing the variance estimate of the wavelet spectrum. If this is NULL (default) then the variance is estimates by calling the varEWS and using object.

alpha

Type I error, a single numerical value within (0,0.5].

...

Additional arguments to be passed to the varEWS command.

Details

The command evaluates the approximate Gaussian confidence intervals for the elements of the mvEWS estimate.

Value

Invisibly returns a list containing two mvLSW classed objects with names "L" and "U" that respectively identify the lower and upper interval estimates.

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. (2014) Wavelet Methods for Multivariate Nonstationary Time Series, PhD thesis, Lancaster University, pp. 91-111.

See Also

mvEWS, as.mvLSW, varEWS.

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
EWS <- as.mvLSW(x = Spec, filter.number = 1, family = "DaubExPhase", 
  min.eig.val = NA)

## Sample time series and estimate the EWS.
set.seed(10)
X <- rmvLSW(Spectrum = EWS)
EWS_X <- mvEWS(X, kernel.name = "daniell", kernel.param = 20)

## Evaluate asymptotic spectral variance 
SpecVar <- varEWS(EWS_X)

## Plot Estimate & 95% confidence interval
CI <- ApxCI(object = EWS_X, var = SpecVar, alpha = 0.05)
plot(x = EWS_X, style = 2, info = 2, Interval = CI)


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

Related to ApxCI in mvLSW...