crqa (version 1.0.9)

windowdrp: Window Cross-Recurrence Profile

Description

Cross-recurrence is calculated in overlapping windows of a specified size for a number of delays smaller than the size of the window. In every window, the recurrence value for the different delays is calculated. A mean is then taken across the delays to obtain a recurrence value in that particular window.

Usage

windowdrp(ts1, ts2, step, windowsize, lagwidth, datatype, 
radius, delay, embed, rescale, normalize, mindiagline, minvertline,
tw)

Arguments

ts1

First time-series

ts2

Second time-series

step

Interval by which the window is moved.

windowsize

The size of the window

lagwidth

The number of delays to be considered

datatype

A string indicating whether the time-series is 'numeric' or 'categorical'

radius

For numeric time-series, the cutoff distance to accept or reject two-points as recurrent

delay

The delay unit by which the series are lagged.

embed

The number of embedding dimension for phase-reconstruction, i.e., the lag intervals.

rescale

Rescale the distance matrix; if rescale = 0 (do nothing); if rescale = 1 (mean distance of entire matrix); if rescale = 2 (maximum distance of entire matrix).

normalize

Normalize the time-series; if normalize = 0 (do nothing); if normalize = 1 (Unit interval); if normalize = 2 (z-score).

mindiagline

A minimum diagonal length of recurrent points. Usually set to 2, as it takes a minimum of two points to define any line.

minvertline

A minimum vertical length of recurrent points.

tw

The Theiler window parameter

Value

It returns a list of arguments where:

profile

Time-course cross-recurrence profile

maxrec

Maximal recurrence observed along the time-series

maxlag

The point in time where maximal recurrence is observed

References

Boker, S. M., Rotondo, J. L., Xu, M., & King, K. (2002). Windowed cross-correlation and peak picking for the analysis of variability in the association between behavioral time series. Psychological Methods, 7(3), 338.

See Also

drpdfromts

Examples

Run this code
# NOT RUN {
data(crqa)

ts1 = as.numeric(as.matrix(RDts1))
ts2 = as.numeric(as.matrix(RDts2))

par = list(type = 1, step =  20, windowsize =  50, lagwidth = 40,
           method = "window", datatype = "categorical", thrshd = 8,
           radius = 0.001, delay = 1, embed = 1, rescale = 0, normalize = 0,
           mindiagline = 2, minvertline = 2)

ans = runcrqa(ts1, ts2, par)

print(ans)

profile = ans$profile; maxrec = ans$maxrec; maxlag = ans$maxlag

# }

Run the code above in your browser using DataLab