Learn R Programming

SlidingWindows (version 0.2.0)

dmca.SlidingWindows: DMCA coefficient with sliding windows.

Description

This function generates Detrending moving-average cross-correlation coefficient of two time series with sliding windows approach.

Usage

dmca.SlidingWindows(x, y, w = 98, k = 10)

Arguments

x

A vector containing univariate time series.

y

A vector containing univariate time series.

w

An integer value indicating the window size \(w < length(y)\). If \(w = length(y)\), will be computed the function will not slide.

k

An integer value indicating the boundary of the division \((N/k)\). The smallest value of \(k\) is \(4\).

Value

A list containing "w", "timescale", "dmca".

Details

This function include following measures: w, timescale, dmca

References

KRISTOUFEK, L. Detrending moving-average cross-correlation coefficient: Measuring cross-correlations between non-stationary series. PHYSICA A, v.406, p.169-175, 2014. doi="doi.org/10.1016/j.physa.2014.03.015".

Examples

Run this code
# NOT RUN {
x <- rnorm(100)
y <- rnorm(100)
dmca.SlidingWindows(x,y,w=99,k=10)

# }

Run the code above in your browser using DataLab