cnlt.biv {CNLTtsa}R Documentation

Performs 'nondecimated' complex-valued wavelet lifting for bivariate time series analysis

Description

The forward complex-valued lifting transform for decomposing a signal of interest is dependent on the trajectory (lifting order) used in the forward lifting transform. This procedure uses trajectory bootstrapping to provide (complex-valued) time-scale information at all times and scales for bivariate series

Usage

cnlt.biv(x1, x2 = NULL, f1, f2, P = 100, nkeep = 2, use.same.trajectories = FALSE, 
verbose = TRUE, ...)

Arguments

x1

A vector of grid values. Can be of any length, not necessarily equally spaced.

x2

An optional vector of grid values corresponding to f2. Can be of any length, not necessarily equally spaced. If not specified (NULL), then the same grid is used for f2 as f1, i.e. x1.

f1

A vector of function values of the first component of a bivariate series, corresponding to x. Must be of the same length as x.

f2

A vector of function values of the second component of a bivariate series, corresponding to x. Must be of the same length as x.

P

Number of trajectories to be used in the nondecimated lifting transform.

nkeep

Number of scaling points we want at the end of the transform. The usual choice is nkeep=2.

use.same.trajectories

A boolean variable indicating whether the same set of trajectories should be used for both components of the bivariate signal.

verbose

Indicates whether useful messages should be printed to the console during the procedure.

...

Any other arguments to be passed to fwtnppermC, see the function documentation for more details.

Details

Essentially, this function applies the forward complex wavelet lifting transform fwtnppermC P times on both (x,f1) and (x,f2), each with a different random lifting trajectory. This results in P sets of complex-valued detail coefficients, along with their associated scales. This information is stored in order to compute the cross-periodograms for the bivariate series (x,f1,f2). The “degree of asymmetry" in the prediction is also recorded. This is the ratio between the maximum distance to the removed point to one of its neighbours and the minimum distance from the removed point to one of its neighbours, see Chapter 5.3 in Sanderson (2010) for more details.

Value

An object of class cnlt (subclasses biv and either SG or DG).
If both components have the same grid (subclass SG), a list with components:

x1

The sampling grid corresponding to f1 used for the decomposition.

x2

The sampling grid corresponding to f2 used for the decomposition. If the object is of subclass SG, x1 is the same as x2.

det1

A list, entry i corresponding to detail coefficients associated to point x_i and f1.

det2

A list, entry i corresponding to detail coefficients associated to point x_i and f2.

lre

A list, entry i corresponding to the scales (integrals) when lifting point x_i and f1.

lreA

A list, entry i corresponding to the degree of asymmetry of the neighbourhood used in the prediction step of point x_i, see description above.

If both components have different sampling grids, the additional following list components are returned:

lre2

A list, entry i corresponding to the scales (integrals) when lifting point x_i2 and f2.

lreA2

A list, entry i corresponding to the degree of asymmetry of the neighbourhood used in the prediction step of point x_i2 with f2, see description above.

Warning

Using a large number of trajectories for long datasets could take a long time!

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.

Sanderson, J. (2010) Wavelet methods for time series with bivariate observations and irregular sampling grids. PhD Thesis, University of Bristol, UK.

For the real-valued equivalent procedure, see also
Knight, M. I., Nunes, M. A. and Nason, G. P. (2012) Spectral Estimation for Locally Stationary Time Series with Missing Observations. Stat. Comput. 22 (4), 877–895.

See Also

fwtnppermC, link{cnlt.univ}

Examples


# a bivariate series example with same grids

# simulate data, e.g. two sinusoids
dat <- seq(from=1, to=3, by=0.1)
x1 <- cumsum(sample(dat, 200, TRUE))

y1 <-sin(2*pi*(1/25)*x1) + sin(2*pi*(1/50)*x1)+ 1*sin(2*pi*(1/10)*x1)+ rnorm(length(x1), 0,0.2)
y3 <- c(sin(2*pi*(1/25)*x1[1:100]),sin(2*pi*(1/25)*x1[97:196]))+ rnorm(length(x1), 0,0.1)

## Not run: 
y1y3.dec<-cnlt.biv(x1, f1=y1, f2=y3, P = 500)

# the complex detail coefficients corresponding to the first timepoint are:

y1y3.dec$det1[[1]]


## End(Not run)

# a bivariate series example with different grids

# load some data in

data(Baidu)
data(Google)

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

# now look at some of the coefficients from the decomposition
# (the complex detail coefficients corresponding to the first timepoint:

BaiGoo$det1[[1]]
BaiGoo$det2[[1]]

## End(Not run)


[Package CNLTtsa version 0.1-2 Index]