rhodcca {DCCA}R Documentation

Detrended Cross-correlation coefficient

Description

Calculates the detrended cross-correlation coefficient for two time series y1 and y2.

Usage

rhodcca(y1, y2, m = 3, nu = 0, overlap = TRUE)

Arguments

y1, y2

vectors corresponding to the time series data. If length(y1) and length(y2) differ, the longer time series is coerced to match the lenght of the shorter.

m

an integer value or a vector of integer values indicating the size of the window for the polinomial fit. min(m) must be greater or equal than nu or else it will return an error.

nu

the degree of the polynomial fit

overlap

logical: if true (the default), uses overlapping windows. Otherwise, non-overlapping boxes are applied.

Value

A list containing the following elements, calculated considering windows of size m+1, for each m supplied:

F2dfa1, F2dfa2

The detrended variances for y1 and y2, respectively.

Fdcca

The detrended cross-covariance.

rhodcca

The detrended cross-correlation coefficient.

Note

The time series y1 and y2 must have the same sample size.

Author(s)

Taiane Schaedler Prass

References

Prass, T.S. and Pumi, G. (2019). On the behavior of the DFA and DCCA in trend-stationary processes <arXiv:1910.10589>.

See Also

F2dfa which calculated the DFA and Fdcca which calculated the DCCA of two given time series.

Examples

y1 = rnorm(100)
y2 = rnorm(100)
rho.dccam1 = rhodcca(y1, y2, m = 3, nu = 0, overlap = TRUE)
rho.dccam1

rho.dccam2 = rhodcca(y1, y2, m = c(3,6,8), nu = 0, overlap = TRUE)
rho.dccam2

[Package DCCA version 0.1.1 Index]