6 Cross-Recurrence Analysis

Cross recurrewnce analysis can be used to study synchronisation and coupling direction. There are other several orther packages and software that can run (C)RQA:

6.0.1 Categorical Cross-RQA and the Diagonal Recurrence Profile

In 2008 there was some commotion about a speech held by Barack Obama in Milwaukee (news item). According to the media the speech was very similar to a speech held the gouverneur of Massachusetts (Deval Patrick) some years earlier. Here are some fragments of the speeches,

Obama (2008):

Don’t tell me words don’t matter. “I have a dream.” Just words? “We hold these truths to be self-evident, that all men are created equal.” Just words? “We have nothing to fear but fear itself”—just words? Just speeches?

Patrick (2006):

“We hold these truths to be self-evident, that all men are created equal.” Just words—just words! “We have nothing to fear but fear itself.” Just words! “Ask not what your country can do for you, ask what you can do for your country.” Just words! “I have a dream.” Just words!

Questions

  • Plot both time series.

  • Because both fragments weren’t of equal size, one series is “filled” at the end with the value 0
    • Do you think this has an effect on the CRQA measures?
    • What & why?
  • Perform a categorical CRQA:
    • First create a cross recurrence matrix using function rp().
    • Look at the manual page what the values mean, look at last the categorical RQA assignment for the values of emLag, emDim and emRad
    • Get recurrence measures using rp() (ignore the warning),
    • Plot the recurrence plot using rp_plot()
    • Also look at the diagonal recurrence profile using rp_diagProfile()
  • What is your opinion about the similarity of these speeches?

Answers

  • Adding a value which occurs in just 1 series (whether it is -2, or 0), but not the other makes sure that value will not be recurring in a Cross Recurrence Plot.
## 
## ~~~o~~o~~casnet~~o~~o~~~
## 
##  Global Measures 
##              Global Max.rec.points N.rec.points Recurrence.Rate Singular.points
## 1 Recurrence Matrix           2652           71       0.0262574              15
##   Divergence Repetitiveness Anisotropy
## 1 0.06666667              0         NA
## 
## 
##  Line-based Measures 
##   Line.based N.lines N.points.on.lines      Measure      Rate     Mean  Max
## 1   Diagonal      15                56  Determinism 0.7887324 3.733333   15
## 2   Vertical       0                 0 V Laminarity 0.0000000      NaN -Inf
## 3 Horizontal       0                 0 H Laminarity 0.0000000      NaN -Inf
##   Entropy.of.lengths Relative.entropy CoV.of.lengths
## 1           1.080574        0.2748275      0.9891909
## 2           0.000000        0.0000000             NA
## 3           0.000000        0.0000000             NA
## 
## ~~~o~~o~~casnet~~o~~o~~~

## 
## Profile 1

6.0.2 Continuous CRQA and the Diagonal Profile

Questions

  • Create two sinewave variables for CRQA analysis and use the \(x\) and \(y\) coordinates of a circletracing experiment:
  • You have just created two sine(-like) waves. We’ll examine if and how they are coupled in a shared phase space.
    • As a first step plot them.
    • Also plot the cirlce trace state space
  • Find a common embedding delay and an embedding dimension (if you calculate an embedding dimension for each signal separately, as a rule of thumb use the highest embedding dimension you find in further analyses).

  • We can now create an unthresholded cross recurrence matrix.
    • use function rp()
    • Fill in the values you decided on for embedding delay and embedding dimension
  • Run the CRQA using rp_cl() using th time series as input, or rp() using a thresholded matrix as input.
    • You can find a radius automatically, look in the casnet manual for function est_radius().
    • Most functions, like rp_plot() will call est_radius() if no radius is provided in the argument emRad.
    • Request a radius which will give us about 5% recurrent points (default setting).
    • You can create a thresholded matrix by calling function di2bi(),
  • Produce a plot of the recurrence matrix using rp_plot(). Look at the manual pages.

  • Can you understand what is going on?
    • For the simulated data: Explain the the lack of recurrent points at the beginning of the time series.
    • For the circle trace: How could one see these are not deterministic sine waves?
  • Examine the synchronisation under the diagonal LOS. Look in the manual of rp_diagProfile(). More elaborate explanation can be found in Coco & Dale (2014).
    • To get the diagonal profile from a recurrence matrix rp_diagProfile(RM, winDiag = , ...). Where winDiag is will indicate the window size -winDiag ... 0 ... +winDiag.
    • How far is the peak in RR removed from 0 (Line of Synchronisation)?
  • To check whether the patterns are real by conducting a Cross-RQA with a shuffled/surrogate version of e.g. time series \(y2\).
    • Function rp_diagProfile() can do a shuffled analysis, check the manual pages.
    • Use Nshuffle = 1 (or wait a long time)

NOTE: If you generate surrogate timeseries, make sure the RR is the same for all surrogates. Try to keep the RR in the same range by using.

Answers Sine Waves

  • You have just created two sine(-like) waves. We’ll examine if and how they are coupled in a shared phase space.
    • As a first step plot them.
    • Also plot the cirlce trace state space

  • Find a common embedding delay and an embedding dimension (if you calculate an embedding dimension for each signal separately, as a rule of thumb use the highest embedding dimension you find in further analyses).

The diagnostic plot of the sine wave y1 looks a bit odd. This is due to the fact that mutual information will discretize the time series, and the sine will fill all bins with the same values, because it is perfectly repeating itself. We’ll use emDim = 2 and lag = 1