Learn R Programming

costat (version 1.1-1)

crosslacv: Compute the time-localized cross-autocovariance of two time series

Description

Compute the (wavelet based) time-localized cross-autocovariance of two time series. This is the quantity $$\hat{c}^{XY}$$ described at the end of Section 2 of Cardinali and Nason, 2008.

Usage

crosslacv(x, y, filter.number = 1, family = "DaubExPhase", ...)

Arguments

x
One of the time series (dyadic length)
y
The other time series (dyadic length)
filter.number
The wavelet filter number for the spectral analysis
family
The wavelet family for the spectral analysis.
...
Other arguments for the call to ewcrossspec

Value

  • A matrix containing the localized cross autocovariance. If the original time series was of length T, then the number of rows of the returned matrix is also T, one row for each time point. The columns of the array correspond to the lag. The number of columns, 2K+1, depends both on the length of the time series and also the order of the wavelet (smoother wavelets return crosslacv matrices with larger number of lags). Lag 0 is always the centre column, with negative lags from -K to -1 are the leftmost columns, lags from 1 to K are the rightmost columns.

Details

This function works in almost exactly the same way as lacv except it computes a cross localized autocovariance for two time series rather than a localized autocovariance for a single time series. See the help page for lacv.

References

`Costationary and stationarity tests for stock index returns' by Car dinali and Nason, 2008, University of Bristol Technical Report 08:08.

See Also

ewcrossspec, lacv

Examples

Run this code
#
# Example of use
#
x2y2.crosslacv <- crosslacv(x2, y2)
#
# Can plot x2y2.crosslacv in exactly the same way as for the return values
# of lacv.
#

Run the code above in your browser using DataLab