cnlt.spec: A function to compute CNLT spectral quantities for univariate...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/cnlt.spec.R

Description

The function takes a nondecimated complex lifting decomposition of a univariate or bivariate series, and uses smoothing before computing spectral quantities such as the complex periodograms, coherence and phase

Usage

1
2
3
4
5
cnlt.spec(x, ...)
## S3 method for class 'SG'
cnlt.spec(x, M = 50, fact = 1, ...)
## S3 method for class 'DG'
cnlt.spec(x, M = 50, fact = 1, ...)

Arguments

x

An object of class cnlt, i.e. the output from either cnlt.univ or cnlt.biv.

M

The smoothing parameter (binwidth) or vector of smoothing parameters (one for each scale) for the time-domain kernel smoothing method, see smooth.over.time.

fact

If length(M)==1, a factor indicating how the smoothing parameter (binwidth) in the time-domain kernel smoothing method should increase from one scale to the next, see smooth.over.time.

...

Any other parameters to be passed to the scale smoothing function, see the documentation for smooth.over.scale for univariate cnlt objects, or pre.per for bivariate cnlt objects.

Details

For univariate series, the nondecimated complex lifting object can be used to form a spectral object by smoothing the squared details over scale (with smooth.over.scale), and then smoothing over time (using smooth.over.time). Smoothing over scale is done via smooth.spline; smoothing over time is done with a kernel smoother (e.g. a "box" kernel for a moving average). See Hamilton et al. (2018) for more details.

Value

An object of class cnlt.spec (subclasses: DG, SG, univ, biv).

For subclass univ, a list with components:

S1

A spectral object (matrix) of dimension length(mscale) x length(mtime), corresponding to the spectrum of the univariate series.

mscale

A vector of scales corresponding to the rows of the spectrum S1 (after smoothing the periodogram), see smooth.over.scale.

mtime

The vector cnltobj$x, the vector of times corresponding to the columns of the spectrum S1.

For subclass biv, a list with components:

coh

A matrix of dimension length(mscale) x length(mtime), corresponding to the coherence between the two components of the bivariate series.

phase

A matrix of dimension length(mscale) x length(mtime), corresponding to the phase between the two components of the bivariate series.

C

A matrix of dimension length(mscale) x length(mtime), corresponding to the co-periodogram of the bivariate series.

Q

A matrix of dimension length(mscale) x length(mtime), corresponding to the quadrature periodogram of the bivariate series.

S1

A matrix of dimension length(mscale) x length(mtime), corresponding to the spectrum of the first component of the bivariate series.

S2

A matrix of dimension length(mscale) x length(mtime), corresponding to the spectrum of the second component of the bivariate series.

mscale

A vector of scales corresponding to the rows of the spectrum S1 (after smoothing the periodogram), see smooth.over.scale.

mtime

A vector of times corresponding to the columns of the spectrum S1. If the class of cnlt.obj is SG, this is cnlt.obj$x1, else this is a vector formed by binning detail coefficients within equal intervals of time, see pre.per for more details.

Author(s)

Matt Nunes, Jean Hamilton

References

Hamilton, J., Nunes, M. A., Knight, M. I. and Fryzlewicz, P. (2018) Complex-valued wavelet lifting and applications. Technometrics, 60 (1), 48-60, DOI 10.1080/00401706.2017.1281846.

See Also

cnlt.biv, cnlt.univ, cnltspec.plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# read some data in (a bivariate series)

## Not run: 

data(Baidu)
data(Google)

BaiGoo<-cnlt.biv(Baidu$Seconds[1:100], Google$Seconds[1:100], Baidu$Return[1:100], 
Google$Return[1:100], P = 500)

specobj<-cnlt.spec(BaiGoo,M=10,fact=1.05, Tstar=20)

## End(Not run)

CNLTtsa documentation built on May 1, 2019, 9:39 p.m.