0% found this document useful (0 votes)
45 views21 pages

Sebastian Wallot and Giuseppe Leonardi: Methods Published: 04 December 2018 Doi: 10.3389/fpsyg.2018.02232

Uploaded by

Sebastian Wallot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views21 pages

Sebastian Wallot and Giuseppe Leonardi: Methods Published: 04 December 2018 Doi: 10.3389/fpsyg.2018.02232

Uploaded by

Sebastian Wallot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

METHODS

published: 04 December 2018


doi: 10.3389/fpsyg.2018.02232

Analyzing Multivariate Dynamics


Using Cross-Recurrence
Quantification Analysis (CRQA),
Diagonal-Cross-Recurrence Profiles
(DCRP), and Multidimensional
Recurrence Quantification Analysis
(MdRQA) – A Tutorial in R
Sebastian Wallot 1* and Giuseppe Leonardi 2
1
Max Planck Institute for Empirical Aesthetics, Frankfurt am Main, Germany, 2 Faculty of Psychology, University of
Economics and Human Sciences, Warsaw, Poland

Edited by:
Holmes Finch, This paper provides a practical, hands-on introduction to cross-recurrence quantification
Ball State University, United States analysis (CRQA), diagonal cross-recurrence profiles (DCRP), and multidimensional
Reviewed by: recurrence quantification analysis (MdRQA) in R. These methods have enjoyed
Maarten Wijnants,
Radboud University Nijmegen,
increasing popularity in the cognitive and social sciences since a recognition that many
Netherlands behavioral and neurophysiological processes are intrinsically time dependent and reliant
Alessandro Giuliani, on environmental and social context has emerged. Recurrence-based methods are
Istituto Superiore di Sanità (ISS), Italy
particularly suited for time-series that are non-stationary or have complicated dynamics,
*Correspondence:
Sebastian Wallot such as longer recordings of continuous physiological or movement data, but are
[email protected]; also useful in the case of time-series of symbolic data, as in the case of text/verbal
[email protected]
transcriptions or categorically coded behaviors. In the past, they have been used to
Specialty section: assess changes in the dynamics of, or coupling between physiological and behavioral
This article was submitted to measures, for example in joint action research to determine the co-evolution of the
Quantitative Psychology
and Measurement,
behavior between individuals in dyads or groups, or for assessing the strength of
a section of the journal coupling/correlation between two or more time-series. In this paper, we provide readers
Frontiers in Psychology
with a conceptual introduction, followed by a step-by-step explanation on how the
Received: 19 February 2018
analyses are performed in R with a summary of the current best practices of their
Accepted: 29 October 2018
Published: 04 December 2018 application.
Citation: Keywords: RQA, cross-recurrence quantification analysis, diagonal cross-recurrence profile, multidimensional
Wallot S and Leonardi G (2018) recurrence quantification analysis, R, tutorial
Analyzing Multivariate Dynamics
Using Cross-Recurrence
Quantification Analysis (CRQA),
Diagonal-Cross-Recurrence Profiles
INTRODUCTION
(DCRP), and Multidimensional
Recurrence Quantification Analysis
The assessment of behavioral and physiological dynamics, as well as the time-dependent coupling of
(MdRQA) – A Tutorial in R. physiological and behavioral activities were always of interest to the behavioral and social sciences.
Front. Psychol. 9:2232. However, the proper assessment of dynamics and coupling has gained increased prominence in
doi: 10.3389/fpsyg.2018.02232 recent years in at least two areas of inquiry: One is the multidimensional assessment of physiological

Frontiers in Psychology | www.frontiersin.org 1 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

processes, i.e., physiological markers of emotional processes, after they exhibit leader-follower relationships (i.e., one measure
it had become generally accepted that no single feature (e.g., level following the time-course of the other by a certain lag), or how
of activity) of individual physiological measures (e.g., heart rate) multiple (n > 2) variables evolve together over time. Hence, these
are fully transparent to specific subjective states of arousal and methods can be used to assess levels and types of synchrony,
emotion (see Kreibig, 2010, for a review). The other is research coupling and entrainment of signals, and whether these change as
on joint action, where the goal is to understand online dynamic a function of experimental manipulations – for example, in many
behavior of dyads or groups, and how their joint behavior joint action studies relevant task variables are manipulated (such
influences subjective perceptions of the group members as well as cooperative style, induced emotion, or social role), and their
as their performance (see Marsh et al., 2009; Knoblich et al., 2011, effects on degrees of behavioral or physiological synchronization
for reviews). are examined. In turn, synchronization properties are usuall
What is common across these two domains of research is used as mediating variables to predict subjective and objective
that they usually deal with multiple time-series (i.e., multiple task outcomes, such a quality and quantity of performance,
physiological indicators or behavioral measures from multiple joy or satisfaction. Hence, these methods can be used to for
group members) that are often non-stationary, or possess other exploratory purposes, examining whether synchronization – or
interesting dynamics. In the area of research on joint action, other kinds of coordination happens, or to test specific hypothesis
one prominent class of analysis methods that has been used about behavioral of physiological coordination under different
increasingly in the last 10–15 years consists of several methods conditions.
originating from the analysis of Recurrence Plots (RP; e.g., One reason why recurrence-based analyses are perhaps
Shockley et al., 2003, 2007; Richardson and Dale, 2005; Dale et al., not equally prominent across all fields of research that deal
2011b; Abney et al., 2014; Fusaroli and Tylén, 2016; Mønster et al., with multivariate time-series is the lack of courses taught at
2016; Wallot et al., 2016a,b; Vink et al., 2017). Universities to students of the respective disciplines, but also
This class of recurrence-based methods, while it has its roots the lack of implementation of the techniques in standard
in dynamical systems analysis and physics, is quickly emerging statistical software packages (such as STATA, JMP, SPSS,
as a robust general-purpose technique to quantify order and etc.). Several applications exist in C, MatLab, Python, R or
organization (Webber et al., 2009), usually (but not only) in other languages (an overview over different software packages
time-dependent signals and behaviors, and it has already found can be found at www.recurrence-plot.tk, hosted by Norbert
its way into several scientific fields. We can characterize it as Marwan), but not all potentially interested users are familiar
a class of multivariate and generalized correlational analyses, with those programming languages. However, in R a few
that are suited for joint action data because they make very few packages implementing recurrence-based analyses are available
assumptions and are particularly robust in case of non-linearities, for univariate and multivariate data analysis.
non-stationary dynamics, and time-series with extreme outliers The aim of the current paper is to give a hands-on
(Webber and Zbilut, 2005; Marwan et al., 2007; Fusaroli et al., introduction to multivariate recurrence-based methods. We
2014). For those reasons, they also have proven very robust to will specifically focus on the analysis of bivariate dynamics/
analyze data from joint action phenomena in semi-experimental coordinated time-series (cross-recurrence quantification
and naturalistic settings, such as doctor-patient conversations analysis; CRQA – Zbilut et al., 1998; Marwan and Kurths, 2002),
(Angus et al., 2012), natural conversation between parents and on the analysis of leader-follower relations in bivariate time-
children (Dale and Spivey, 2006), interaction between mothers series (diagonal cross-recurrence profile; DCRP – Richardson
and infants (Reddy et al., 2013; Nomikou et al., 2016; Abney and Dale, 2005), and on the analysis of multivariate dynamics
et al., 2017), or shared emotional states during social rituals (multidimensional recurrence quantification analysis; MdRQA –
(Konvalinka et al., 2011). Apart from gaging the ordered, Wallot et al., 2016b). We chose to present this tutorial in R
coordinated features of behaviors in time per se, the methods because of the increasing popularity and availability of this
have the potential to shed lights into the transitions from an software due to its free-ware nature, and the basic familiarity of
ordered state to another (Trulla et al., 1996), and hence to allow many researchers with this environment.
the mapping of singularities and characterizing instabilities in In the following, we will first provide a brief overview over
coordinated states and phase transitions (see e.g., Zbilut et al., the central concepts of recurrence-based analyses and (auto)
2002; Stephen et al., 2009a,b; Lichtwarck-Aschoff et al., 2012). RQA, i.e., the analysis of a single time-series, together with the
While these analyses have not received equal prominence in central steps in conducting the analyses. RQA is not at the core
biopsychological research, many applications exists in the area of this paper, as we are specifically interested in multivariate
of physiology (e.g., Webber and Zbilut, 1994; Webber et al., applications. However, presenting RQA briefly in the beginning
1995; Dabiré et al., 1998; Giuliani et al., 1998; Zbilut et al., 2002; helps to explain the concept of recurrence and the steps in
Marwan et al., 2005; Javorka et al., 2008; Schinkel et al., 2009; conducting these analyses in general. Thereafter, we will provide
Acharya et al., 2011; Andrade et al., 2012; Fisher et al., 2015) and a detailed hands-on introduction for conducting each of the three
movement research (e.g., Kiefer et al., 2011; Ramenzoni et al., analysis techniques, presenting the necessary R-commands step-
2011). by-step. While CRQA and DCRP can be conducted using the
Particularly, the multivariate methods we will introduce in crqa()- and drpdfromts()-function form the ‘crqa’ package (Coco
the following sections allow to analyze non-stationary time-series and Dale, 2014), we provide readers with a new R-function for
and to assess how strongly two time-series are correlated, whether MdRQA in the Supplementary Materials to this paper, which

Frontiers in Psychology | www.frontiersin.org 2 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

has only been available in MatLab so far (Wallot et al., 2016b). At similar to the arbitrary letter-sequence presented above, we
the end of each section, we discuss common issues of the analyses can extend the concept of the auto-recurrence plot of a single
and the current best practice. Finally, we close the article with sequence and create a cross-recurrence plot, which examines
remarks and suggestions on how to use these analyses in sample cross-recurrences between two sequences, as in Figure 1B. Note
comparisons. that while the recurrence plot in Figure 1A possesses a diagonal
of recurrent points (which simply means that every element in
the sequence is recurrent with itself at lag 0), the cross-recurrence
RECURRENCE-BASED ANALYSES plot in Figure 1B does not necessarily possess such a diagonal.
Moreover, while the recurrence plot is fully symmetrical about its
As the name implies, the core-concept of recurrence-based main diagonal, this is not the case for the cross-recurrence plot.
analyses is recurrence – repetition of elements or patterns in a This is, because the two sequences in Figure 1B are not identical,
sequence. The core tool of these analyses is the recurrence plot or but rather share only parts of their elements and sequential
recurrence matrix, which is a means of displaying and charting characteristics.
repetitions in a sequence. As we will see further below, the The cross-recurrence plot is not just a useful tool to visualize
analyses are usually not performed on the original 1-dimensional or display the sequential similarity of two sequences, but can
sequence or time-series, but on its phase-space portrait, which we be used to quantify their similarity. For example, the tally
will describe in more detail below. However, all of the analyses of all recurrent points on the plot tells us something about
can be performed on the raw data. We will return to this issue the repetitiveness of the individual elements across the two
later at the end of the section on parameter estimation. sequences, and we refer to this quantity as percent recurrence
Before we introduce particular variants of recurrence-based (%REC). Counting all recurrent points that have other, diagonally
analyses, we want to briefly show how the recurrence plot adjacent recurrent points and dividing them by %REC tells
captures repeating patterns in a sequence. Even though we are us something about the degree to which elements that occur
not interested in auto-recurrence analysis of a single time-series in one sequence as larger, connected patterns also occur in
in this tutorial, we will briefly start with such an example in the other sequence in the same order. This quantity is called
order to illustrate the concept of the recurrence plot. This can percent determinism (%DET). Counting the average length of
be easily illustrated using a simple, short 1-dimensional nominal all diagonal lines of cross-recurrence points tells us something
sequence, “ABCDDABCDD.” The sequence is arbitrary (it could about the average size of the shared patterns (Average Diagonal
represent a series of coded behaviors of a participant over time), Line, ADL). However, there are many more ways to quantify
but is clearly not random, containing repetitive sub-sequences. the (cross-)recurrence plot, and Table 1 charts the most
A recurrence plot can be used to visualize these repeating common measures and their definition. All of them provide
characteristics by comparing all the elements of such a sequence us with information of how the two sequences are similar or
with themselves, when aligned in the two dimensions of the plot correlated.
(see Figure 1A). As the application to the toy nominal data shows, recurrence-
The recurrence plot in Figure 1A needs not be limited to based analyses are very versatile. They can be used to compare
recurrences within the same single sequence. In other words, sequences or time-series of nominal, ordinal, or interval-scale

FIGURE 1 | Illustration of recurrence of letters in the sequence “ABCDDABCDD” (A), and cross-recurrence of letters in the sequence “ABCDDABCDD” with
“DDEFGABCDD” (B). The black squares in the matrices indicate the recurrence of a letter, and white spaces indicate the absence of recurrence. The distribution of
recurrent points on the recurrence plot can be quantified to yield statistics of the repetitive patterns in a sequence.

Frontiers in Psychology | www.frontiersin.org 3 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

TABLE 1 | The most common cross-recurrence measures.

Variable name Definition Quantifies. . .

Percent Recurrence (%REC) Sum of recurrent points in RP /Size of RP . . .repetition of elements across the two sequences.
Percent Determinism (%DET) Sum of diagonally adjacent recurrent points / Sum of . . .how many of the individual repetitions co-occur in
recurrent points in RP connected trajectories.
Average Diagonal Line Length (ADL) Average diagonal lines in RP . . .how long the average cross-repeating trajectory is.
Maximum Diagonal Line Length (MDL) Length of longest diagonal line in RP (excluding the . . .how long the longest cross-repeating trajectory is.
main diagonal)

Further RQA measures exist, and others are being developed – for the description of additional measure, see for example Marwan et al. (2007).

data. They make no assumptions about the distribution of data are coupling parameters. Here, we are interested in interpreting
points, and are robust in the face of outliers and non-stationarity. the system as an analogy to human behavior. For example, x,
However, they require multiple data points. Depending on the y, and z could be measures of skin conductance (or any other
data at hand, the analyses can be used with as few as 10–30 data quantity) of three members of a group that work together, and
points, the upper limit being only set by the computational power each member’s level of skin conductance at a certain time is
accessible. However, we will return to data requirements in more not only determined by their idiosyncratic history, but also by
detail at the end of the paper. interactions with the other members (i.e., future values of x do
In the following section, we will apply the basic concept not only depend on past values of x, but also on past values of y),
of recurrence and the recurrence plot to coupled time-series, perhaps capturing changes of joint arousal within groups (e.g.,
especially multivariate cases where the correlation of the common Mønster et al., 2016).
dynamics of two (or more) time-series are of interest. Before We resort to this artificial system for illustrational
that though, we will introduce the basic steps of parameter purposes, because it is a classic example for the behavior of
estimation that are necessary to conduct multivariate recurrence- a multidimensional system whose component-behaviors are
based analyses, and reconstruct the multidimensional phase- interdependent, but whose properties are known. However,
space of a 1-dimensional time-series, on which the recurrence we will summarize the specific challenges of empirical data
plot is computed. for each of the analyses presented later on in a section of
pitfalls and issues. To generate a sequence of data points of the
Lorenz-system dynamics, we use the lorenz()-function from the
R PACKAGES NEEDED ‘nonlinearTseries’ package and store them in an arbitrary variable
lorData (see Figures 2A–D for the resulting 3D Lorenz attractor
The following R packages – as well as their dependencies – need and its component time-series):
to be installed and loaded to run the tutoril: ‘crqa,’ ‘entropy,’
’nonlinearTseries,’ ‘plot3D,’ ‘SDMTools,’ and ’tseriesChaos.’ The lorData < − lorenz(time = seq(0, 20, by = 0.02),
mdrqa()-function for the computation of MdRQA is not included
do.plot = F)
in any R-package yet, but can be found in the Supplementary
Materials to this paper. To generate the particular dynamics, the parameters sigma,
rho, and beta have to be set, which we use here in their default-
settings of the lorenz()-function (σ = 10; ρ = 28; β = 8/3).
GENERATING EXAMPLE DATA These three time-series will allow us to explore different levels
of dynamics, e.g., between pairs of time-series (dyad-level
Here, our primary aim is to show how different recurrence-based
dynamics) and triads of time-series (group-level dynamics in the
analyses can be used to analyze multivariate dynamics, meaning
Lorenz-system).
the evolution of a single system that is distributed across multiple
interdependent observables, or the evolution of different systems,
but whose behaviors are coupled. To that end, we want to use the PHASE-SPACE RECONSTRUCTION AND
Lorenz-system (Lorenz, 1963), which is a system of three coupled
differential equations (eq. 1):
PARAMETER ESTIMATION

ẋ = σ(y − x) As we said above, recurrence-based analyses are effectively


generalized correlational analyses that provide information about
ẏ = x(ρ − z) − y different correlational characteristics of two or more time-series.
ż = xy − βz (1) As such, all of the analyses we present in the following can simply
be run on the raw data of the time-series as they have been
The variables x, y and z are the three dimensions of the system collected. Alternatively, these analyses can be used to compute
that originally modeled hydrodynamic features, where the three correlations between the (reconstructed) phase-spaces dynamics
dimensions represent the rotation rate in the fluid and two of the time-series of interest. In a nutshell, using the logic of
temperature measures (Lorenz, 1963). The parameters σ, ρ, and β Takens (1981) theorem, it is possible to recover higher-order

Frontiers in Psychology | www.frontiersin.org 4 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

dynamics by the method of time delayed embedding of the from one of its dimensions available, we would need to estimate
time-series (Takens, 1981). If one suspects that there are more the number of the dimensions that we have not measured. The
complicated dynamics behind the observed time-series, which is delay parameter d helps to recover latent dimensions using the
often the case when the measured variable is continuous, one method of time-delayed embedding that will be described below
needs to follow the embedding procedure outlined below to in more detail. Basically, d takes into account the sampling
reconstruct the time-series’ phase-space, the first step of which properties of a time-series, and helps to find points in the time-
is the estimation of the embedding parameters. In many other series that can be used to re-construct the missing dimensions
cases though, especially when time-series represent categorically most reliably. The radius parameter r effectively specifies the
coded behaviors (often the only kind of data available in interval within which two values are counted as being recurrent,
the psychological and social sciences) or derivative measures which is needed for interval-scaled data, that usually never
(e.g., inter-event intervals), embedding may be unwarranted or repeats itself perfectly and contains measurement noise. The
unjustified from a theoretical point of view. In those case, we can norm parameter is helpful for comparing different time-series
still take advantage of the signal analysis capacities of recurrence with regard to their sequential structure, but that differ in the
based methods, by proceeding without any embedding of the magnitude of their values. The norm parameter effectively brings
observed time-series. the magnitude of the values of different time-series on the same
The estimation procedure for the embedding parameters scale, so that recurrence variables such as %REC and %DET are
is basically the same for all of the following recurrence- solely dependent on sequential properties, and not on differences
based analyses. The parameters are the embedding dimensions in magnitude.
m, the delay d, the radius r, and the rescaling norm. The The necessity for selecting these parameters is easier to
parameters m and d are necessary in order to estimate the correct grasp from the perspective of basic RQA (one-variate recurrence
dimensionality of the dynamics of a time-series. The parameter analysis), where the aim is to quantify the recurrence structure of
r is important to account for the fact that interval-scaled a single time-series, and not shared recurrences between multiple
and empirically measured time-series usually contain noise, time-series (where these parameters are needed nevertheless).
and never perfectly repeat themselves. Finally, the parameter In that situation, we only have a 1-dimensional observable
norm standardize the analyzed time-series so that they are of from a potentially multi-dimensional system – for example, the
comparable magnitudes. These parameter will later be used as x-dimension from the Lorenz attractor (see Figure 2B). We
inputs (in addition to the time-series data) for the recurrence could run recurrence-analysis just on the raw values of this time-
analysis functions described below, which estimate coupling series to describe its recurrence properties. However, since this
between time-series. 1-dimensional time-series comes from a 3-dimensional system
The embedding dimension m is an estimate of the of interacting and inter-dependent variables, its recurrence
dimensionality of the dynamics of the time-series – that is, properties would be more accurately described if we could
how many latent variables, if any, compose the system whose take the dynamics of the other two dimensions into account –
dynamics are observed. For example, the Lorenz system and the procedure of phase-space reconstruction allows to do
presented in Figure 2A is 3-dimensional, but if we had only data this.

FIGURE 2 | Display of the data. 3D-plot (a.k.a. phase-space) of the Lorenz system (A); component time-series for the x, y, and z-axis of the Lorenz system (B–D).

Frontiers in Psychology | www.frontiersin.org 5 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

In the case of the Lorenz system, we know that the actual estimated value for the delay parameter d. Note that in our case,
system dynamics “live” in a 3-dimensional phase-space, and much less than 50 lags would have been needed to find the first
not in the 1-dimensional space of variable x taken alone. The local minimum. However, sometimes no clear local minimum is
phase-space is a multidimensional picture of the 1-dimensional visible within a certain range of lags, in which case it is usually
time-series, obtained by plotting the values of the 1-dimensional helpful to re-run the AMI function with a higher lag (i.e., set
time-series against each other at a certain delay. In a seminal lag.max to a larger value).
paper, Takens (1981) showed that it is possible to reconstruct the Now, we know the delay that we need for the embedding
missing information from the other, non-observed dimensions process, d = 9. However, we do not yet know the dimensionality
(in our case dimensions y and z from the Lorenz system). In of our phase-space, that is how many times to apply the delay.
particular, Takens showed that this missing information can be The embedding dimension of a time-series can be estimated
recovered via the method of time-delayed embedding (see also using the false-nearest-neighbor function (Kennel, et al., 1992).
Sauer et al., 1991; Kennel et al., 1992). The idea behind this estimation procedure is, that if a time-
The idea behind this so-called phase-space reconstruction series is not properly embedded with regard to the “true”
with the method of time-delayed embedding is not complicated: dimensionality of its dynamics, values in the time-series are
If we only have a 1-dimensional time-series, and want to classified as similar/recurrent that should actually be treated
recover the time-series (or trajectory) in its multi-dimensional as non-recurrent (i.e., they are “false” neighbors). As a rule
phase-space, we use m−1 surrogate copies of the original time- of thumb, high levels of noise in the data tend to inflate the
series, sampled at lag d from each other (where d is the estimate of the embedding dimension m. Now, we want to use the
delay parameter) to derive the coordinates for every point of false.nearest()-function (from the same R package) to estimate the
such trajectory. The resulting multi-dimensional scatterplot-like embedding dimension m:
graph will approximate the topological dynamics of the actual
multidimensional system (see Figures 3A,B for an example using
plot(false·nearest(lorData$x, m = 10, d = 9, t = 0))
the x-dimension of the Lorenz attractor), meaning that a properly
embedded version of a 1-dimensional time-series in phase-space
looks similar to the “true,” multidimensional trajectory. As input, the function takes m for the range of dimensions
As we will see, this logic is applicable to all of the analyses that we want to test, d for the delay parameter that we have
techniques presented in this paper. However, one can only estimated previously, and t for the so-called Theiler window
safely rely on an established routine to do so for CRQA (and (Marwan et al., 2007) that allows to specify the minimal
hence DCRP), which operate on the basis of individual time- (temporal) separation of neighbors. Effectively, t specifies the
series, while the issue of embedding is more complicated – and number of diagonals on a recurrence plot whose recurrence
perhaps not always warranted – in the case of MdRQA (this points are excluded for the computation of the recurrence
will be discussed in the section “ Multidimensional Recurrence measures, with t = 1 meaning that recurrence points at the
Quantification Analysis” below). main diagonal are excluded, t = 2 meaning that recurrence
The problem with empirical data is, that we usually do points at the two adjacent diagonals above and below the
not know the dimensionality of the source system a priori. main diagonal are excluded, and so forth (see Marwan et al.,
Hence, the dimensionality of the system has to be estimated, 2007, p. 250, for a more extensive discussion). Similar to the
as well as the delay parameter that is needed to properly re- AMI function, we look for a first local minimum and/or for
construct the systems phase-space. However, two methods have a leveling-off in false-nearest-neighbors (see Figure 3D), where
been proposed to estimate those parameters. To estimate the additional embedding dimensions do not appreciably change
delay parameter, the average mutual information function (AMI) this number (similar to the scree-test in factor analysis –
of the component time-series can be computed, and usually Cattell, 1966). The FNN-function is used because in a non-
its first local minimum is taken to be a good estimate of the optimal reconstruction of the phase-space points (coordinates)
delay parameter d (for a detailed rationale of this choice see can appear to be recurrent when in fact they are not, which
Abarbanel, 1996). Specifically, the first local minimum provides would be visible in a higher dimensional phase space. Hence
the lag where the time-series is most independent of itself, and the name “false neighbors.” As can be seen in the plot,
embedding at this point will provide the most unique information we observe only significant portions of false neighbors for
for a new dimension in phase-space. In R, this can be done embedding dimensions up to 2. Hence, 3 is our estimate for
using the mutual()-function from the ‘tseriesChaos’ package, the embedding dimension parameter m, as it should be, because
which we now want to apply to the x-dimension of the Lorenz the Lorenz system actually is 3-dimensional (see Figure 2 and
system: equation 1).
To sum up, plotting the data in lorData$x three times against
mutual(lorData$x, lag.max = 50) each other with delay 9, will result in the reconstructed phase-
space for the Lorenz system as in Figure 3B. That means, we take
Here, we chose to compute average mutual information for the original time-series, and plot it against itself two additional
the first 50 lags of the time-series. As can be seen in Figure 3C, (i.e., m−1) times, where the second time the data points are
mutual information drops off, with a local minimum at about lag shifted by 9 lags (i.e., 1∗ d ), starting with the 10th data point of
9, after which mutual information increases again. Hence, 9 is our the original time-series, and the third time the data points are

Frontiers in Psychology | www.frontiersin.org 6 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

FIGURE 3 | Phase-space reconstruction and estimation of embedding parameters. Example of phase-space reconstruction via the method of time-delayed
embedding using the x-dimension of the Lorenz attractor. To that end, the original series (A) is plotted against itself at a certain delay d (d = 9 in this case; see panel
D and the main text). This is done m–1 times, where m–1 is the number of additional surrogate dimensions needed in order to arrive at the correct dimensionality of
the source system. Then, the original time-series and its two surrogates are plotted against each other, resulting in a reconstructed phase-space (B), which is
topologically isomorphic to the phase-space of the actual source system (see Figure 2A). The delay parameter d can be estimated using the average mutual
information (AMI), where the first local minimum of that function provides a good estimate for d (C), and the embedding parameter m can be estimated using the
false nearest-neighbor (FNN) function, where the first local minimum (or the point at which the function becomes stable) provides a good estimate for m (D).

shifted by 18 lags (i.e., 2∗ d), starting with the 19th data point of systems that is no problem, but for time-series with complex
the original time-series. dynamics and stochastic components and/or measurement noise,
However, we are interested in recurrences of the same time- we need to threshold the phase-space first.
series in phase-space, and to quantify those, we can move Thresholding means, that we define a range, the radius
from the phase-space representation to the recurrence plot parameter r, within which we take two coordinates in phase-
representation of the time-series. In order to do so, we need space to be recurrent – even if their values are not identical.
to determine which values in the reconstructed phase-space are However, a proper value for the radius parameter r cannot be
recurring. For nominal sequences and for simple deterministic estimated so easily. As said above, we do not need a radius for

Frontiers in Psychology | www.frontiersin.org 7 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

nominal sequences (or effectively we set the radius close to zero), our three time-series from the Lorenz-system leads to the results
because here we just consider repetitions of the same states or presented in Table 2, which we will need as inputs for the analyses
values. In fact, nominal sequences are the only kind of data that as that we are going to introduce in the next sections. Figure 4
something like a natural level of recurrence, because by selecting summarizes the main steps of selecting and conducting the
a tiny value for the radius, we allow only truly identical values analyses. For details and solution for specific problems, consult
to be counted as recurrent, with everything else being classified the relevant sections of this article.
as non-recurrent. For all other kinds of data, recurrence (%REC)
depends on the selection of r.
For highly deterministic time-series, small radii will suffice, PITFALLS AND ISSUES
while highly stochastic time-series or time-series with a strong
noise component need big radii to count sufficient recurrences. In The presence of noise in a time-series can inflate estimates
general, recommendations have been to set the radius r so that the of embedding dimension using the false-nearest-neighbor
resulting recurrence rate lies between %REC = 1 to 5% (see e.g., algorithm. On the one hand, this is not very problematic, because
Webber and Zbilut, 2005), where it can be on the lower side of this moderately over-embedding a time-series (i.e., picking higher
estimate for time-series with a strong deterministic component, values for m than the actual dimensionality of the dynamics of
and on the upper side of this estimate for time-series with a strong the system from which the time-series was recorded) usually
stochastic component. However, very stochastic time-series (such does not impact the results of recurrence-based measures very
as inter-event-times) might even warrant recurrence rates higher much, and the analyses are generally robust across a certain
than that (Wallot et al., 2012). Radii are usually expressed in range of parameter settings. Alternatively, one can carefully
terms of their percentage of the norm parameter, or in terms smooth the time-series before estimation embedding dimension.
of the standard deviation of the time-series when the input However, even in this case, one might still want to do the
time-seris were standardized. Note that additional constraints are first analyses on the unsmoothed data, because correlated noise
put on the selection of the radius in the context of comparing properties can actually contain information about the time-
samples of data sets, which we will discuss at the very end of the series dynamics, and recurrence-based analysis can harness such
paper. information.
Finally, a norm parameter needs to be set. The norm Finally, there are data sets for which no clear local minimum
parameter is important for re-scaling phase-spaces of different in either the AMI and/or the false-nearest-neighbor function
time-series with regard to the magnitude of their values. This are observed. In this case, one can pick values for d and
is, because we are interested in comparing different time- m when the functions level out. Often, however, this means
series in terms of their sequential properties, and differences in having relatively high values for d and m, and because large
magnitude between two series could influence the estimation of embedding parameters actually reduce the number of data points
their sequential similarities or differences (e.g., Shockley, 2005). available for analysis, one needs time-series with sufficiently
Several norms have been proposed, for example normalizing the many data points. Alternatively, lower values for d and m
phase-space by the (average) Euclidean, Maximum, or Minimum can be picked by investigating the function for instances for
distance in phase-space. Given circumstances, the choice of “substantial decreases” instead of straight local minima or
one norm can be an advantage over choosing another one, leveling. Of course, selecting parameters on this basis will increase
but the main point is to keep the norm parameter constant the subjective component in parameter setting, and one way
across all time-series that are analyzed to be compared across to deal with this would be an exploration of the parameter
samples. space. Here, one selects a handful of different parameter
Conducting estimation of the delay and embedding dimension combination based on the different criteria presented above,
parameters using the mutual()- and false.nearest()-functions for and check whether the results of the analysis are invariant
or at least similar across these. In general, picking smaller
values for d and m results in more and/or “false” recurrences,
TABLE 2 | Delay (d) and embedding dimensions (m) estimated for the six while picking bigger values of d and m results in fewer
time-series.
recurrences. However, picking slightly higher values, particularly
Time-series d M for m, will still result in reliable and correct classification of
recurrences.
lorData$x 9 3
lorData$y 8 4
lorData$z 8 4
CROSS-RECURRENCE
The above values were simply selected according to a strict application of the first-
local-minimum criterion. In case of doubt, one can test whether other reasonable
QUANTIFICATION ANALYSIS (CRQA)
delays lead to markedly different outcomes. Note that the false.nearest()-function in
R suggests that y- and z-coordinate data come from a 4-dimensional system, even Cross-recurrence quantification analysis is a bivariate correlation
though we know that the actual system is 3-dimensional. However, such minor technique. Instead of quantifying recurrences within a time-series
differences usually do not matter for the results. In fact, building a recurrence plot
(as RQA does), CRQA quantifies cross-recurrences between two
on a 3 vs. 4-dimensional phase-space will leads to very similar results, and as a rule
of thumb, it is advisable to slightly over-embed (i.e., pick an embedding dimension time-series. This bivariate extension of RQA is conceptually
slightly higher than the estimate) when in doubt. pretty straightforward: Instead of embedding a single time-series

Frontiers in Psychology | www.frontiersin.org 8 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

W hat kind of data do you w ant to analyze and what is your research question?

Coherence/coupling
Leader-follower
Coupling between two time- between n > 2 time-series
Step 1 series (pairs/dyads)?
relationships between two
(groups) or analysis of
time-series (pairs/dyads)?
different group-levels?

CRQA DCRP M dRQA

M ake sure that each paired/grouped set of


Step 2 tim e-series has equal num ber of data points!

Use recurrence analysis on observed or em bedded data?


Step 3
...on observed/raw data... ...on embedded data...

Set param eters Estim ate param eters

Delay param eter d Delay param eter d


Step 4 d = 1. Use first local mimimum of AMI function
as estimate for d.

Em bedding param eter m Em bedding param eter m


m = 1. Use first local minimum of FNN-function –
Step 5 or point at which FNN-function becomes
stable – as estimate for m .

Phase-space norm alization norm Phase-space norm alization norm


Step 6 Most importantly, select a norm and keep Most importantly, select a norm and keep
it constant across all time-series. it constant across all time-series.

Radius param eter r Radius param eter r


Start with an arbitrary value for r, run Start with an arbitrary value for r, run
recurrence analysis, obtain average % REC recurrence analysis, obtain average % REC
for sample, and adjust r as needed to for sample, and adjust r as needed to
obtain a target average value for % REC. obtain a target average value for % REC.
Step 7 Alternatively, % REC can be set to a fixed Alternatively, % REC can be set to a fixed
value by assigning each pair/group of value by assigning each pair/group of
time-series an individual radius time-series an individual radius
parameter. parameter.
For nominal data, set r to a tiny value For nominal data, set r to a tiny value
close to zero. close to zero.

If necessary, generate surrogate data for com parison with the original data using
Step 8 the sam e param eters.Then get results for all pairs/groups of tim e-series and subm it
to inferential statistics!

FIGURE 4 | Main steps of selecting and conducting the analyses. Please note that this is only a gross overview over the main steps – for specific problems, best
practice, or tuning of parameters, please consult the respective sections on these steps in this article.

Frontiers in Psychology | www.frontiersin.org 9 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

in a phase-space (see Figure 3), two time-series are embedded radius parameters r need to be selected, and usually the data are
in the same phase-space (see schematic in Figure 5A). Note that normalized beforehand (e.g., z-scored, or transformed to unit
the numbers next to the two time-series indicate the order in interval), to ensure that CRQA measures are really based on
which the data points (coordinates) have been measured, not the sequential similarity of the two time-series, and not differences
values of the data points! The data are arbitrary, and are meant to in magnitude (Shockley, 2005).
illustrate how embedded time-series in a phase-space are used to
construct a cross-recurrence plot (CRP).
Now, the cross-recurrence plot is constructed by charting RUNNING THE ANALYSIS IN R
instances where coordinates of the two time-series occur close to
each other in the phase-space – again within a given radius size As we have already estimated embedding parameters d and m for
r (Figure 5B). This cross-recurrence plot can now be quantified our time-series (see Table 2), we can skip this step and directly
in the same fashion as the simple recurrence plot (see Table 1). proceed to the application of the crqa()-function from the ‘crqa’
Note, however, that the cross-recurrence plot for two different package in R. To begin with, we will perform CRQA on the same
time-series does not necessarily possess recurrences at the central time-series – that is, on lorData$z and lorData$z – so two time-
diagonal, and is not symmetric about the diagonal anymore. series with the same values (see Box 1).
We can make use of this asymmetry to assess lead-follower The crqa()-function has several arguments to be defined: ts1
relationship or lags in coupling when examining the diagonal and ts2 are the two time-series that should be analyzed; delay
cross-recurrence profile, which is done in the next section. is the delay parameter d, embed is the embedding dimension m,
Also note, that the cross-recurrence plot, similar to the rescale is the norm parameter used to rescale the phase-space (2
recurrence plot, charts recurrences at all possible lags for the two equals maximum rescaling), and radius is the radius parameter
time-series. Hence, the cross-recurrence measures do not reflect r. The parameter normalize is an option to normalize the data
coupling at a specific lag or within a specific time-interval only. beforehand (2 equals z-scoring). The parameters mindiagline and
The sequence of steps for conducting CRQA is very similar minvertline allow the user to select the minimum number of
to that of RQA: First, the AMI and the false-nearest-neighbor diagonally and vertically adjacent points that should go into the
function are used to estimate the delay and embedding dimension
parameters for each time-series separately. If the time-series
exhibit the same delay and dimension, then those parameters BOX 1 | Running CRQA.
crqa_results_ab <– crqa(ts1 = lorData$z, ts2 = lorData$z, delay = 9,
are used for CRQA. If the time-series differ in delay and
embed = 3, rescale = 2, radius = 20, normalize = 2, mindiagline = 2,
dimension, then one can use either the average values for each minvertline = 2, tw = 0, whiteline = FALSE, recpt = FALSE,
parameter (rounded to the next integer), or the highest values side = "both") # running crqa
for each parameter – delay d and embedding dimension m.
Again, as a rule of thumb, over-embedding is less problematic image(crqa_results_ab$RP) # cross-recurrence plot

compared to under-embedding (Webber and Zbilut, 2005) – print(crqa_results_ab[1:9]) # crqa results


given enough data points, of course. Then, appropriate norm and

FIGURE 5 | Schematic of embedding two time-series in a single phase-space (A), and charting cross-recurrence between coordinates of the two time-series in a
cross-recurrence plot (B). Note that the indices on the x- and y-coordinates in panel B here do not display the values of the associated time-series, but the order in
which these values appear in the time-series (i.e., the gray 10 is the 10th coordinate of the gray coordinate-series in the phase-space in panel A).

Frontiers in Psychology | www.frontiersin.org 10 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

FIGURE 6 | Doing recurrence analysis using cross-recurrence: Display of cross-recurrence plots resulting when the same time-series data (lorData$z) is added for
both inputs as plotted directly from the output of the crqa()-function (A). However, recurrence plots are conventionally oriented so that time at lag0 runs along the
main diagonal from the lower-left to the upper-right. Hence, the resulting cross-recurrence plot need to be rotated by 90◦ (B).

calculation of the recurrence metrics (the default being 2, i.e., any BOX 2 | Running all pairwise CRQAs for the three dimensions of the Lorenz
point that is not isolated is counted as a line). tw is the Theiler system.
window (see section “Parameter Estimation”). Interested readers crqa_results_xy <– crqa(ts1 = lorData$x, ts2 = lorData$y, delay = 9,
are referred to the article by Coco and Dale (2014), as well as the embed = 4, rescale = 2, radius = 20, normalize = 2, mindiagline = 2,
description of the crqa()-function in the ‘crqa’ package. minvertline = 2, tw = 0, whiteline = FALSE, recpt = FALSE,
side = "both") # running crqa between the x and y dimensions of the
Figure 6A displays the resulting cross-recurrence plot. First Lorenz system
of all, notice that when plotting the resulting recurrence plots
using the image()-function in R, the recurrence plots are rotated crqa_results_xz <– crqa(ts1 = lorData$x, ts2 = lorData$z, delay = 9,
in conventional matrix orientation, where the smallest values embed = 4, rescale = 2, radius = 20, normalize = 2, mindiagline = 2,
minvertline = 2, tw = 0, whiteline = FALSE, recpt = FALSE,
of the indices begin at the upper-left. Hence, time in this plot
side = "both") # running crqa between the x and z dimensions of the
now runs from the upper left to the lower right (instead of the Lorenz system
conventionally used direction from lower left to upper right –
which we have used in Figures 1, 5B). This is important to pay crqa_results_yz <– crqa(ts1 = lorData$y, ts2 = lorData$z, delay = 9,
attention to, because in different publications, different ways to embed = 4, rescale = 2, radius = 20, normalize = 2, mindiagline = 2,
minvertline = 2, tw = 0, whiteline = FALSE, recpt = FALSE,
display recurrence plots are chosen in this regard. This can be
side = "both") # running crqa between the y and z dimensions of the
remediated by transposing the matrix with the t()-function on Lorenz system
the reversed columns of the matrix before plotting, resulting in
the conventional orientation where time at lag0 now runs again
from the lower-left to the upper-right (see Figure 6B): the same patterns, but all of them seem to consist of relatively
RP <− crqa_results_ab$RP # store cross-recurrence plot in grouped or connected recurrent points. Examining the CRQA
results corroborates this: All three pairs have high values of cross-
variable RP image(t(RP[, ncol(RP) : 1])) # rotate matrix %DET, meaning that cross-recurrences do not occur in isolation,
by 90◦ and plot but in connected groups. Still, for some of the CRQA outcome
measures, the numbers differ substantially between pairs. This
What we have done here was effectively to compute RQA (i.e., shows, that the three dimensions of the Lorenz-system do not
an analysis of the auto-recurrence properties of a single time- possess that same intrinsic dynamics, and are not all coupled
series) using CRQA, because we entered the same time-series together in the same way. Here, we will see that it can be useful
twice. Hence, we observe the central diagonal on the plot, and to examine multiple time-series together as in multidimensional
see that the plot is symmetrical about this diagonal. If these were recurrence analysis, which will introduce in the section after the
two independently collected time-series, it would mean that they next one.
are perfectly synchronized, exhibiting the same dynamics at the
same time.
Finally, we will run three pairwise analyses of the time-series PITFALLS AND ISSUES
lorData$x, lorData$y, and lorData$z (see Box 2). The results
are displayed in Figure 7. Comparing the cross-recurrence plots As all correlational techniques, CRQA (and also DCRP and
of the three pairings, we see that they do not quite exhibit MdRQA) need two matched time-series. If time-stamps of

Frontiers in Psychology | www.frontiersin.org 11 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

FIGURE 7 | Display of cross-recurrence plots and resulting CRQA measures the time-series pairs lorData$x with lorData$y (A), lorData$x with lorData$z (B), and
lorData$y with lorData$z (C).

the recordings are synchronized, and time-series are sampled magnitudes of values, but one of them contains outliers, an option
continuously, this is no problem. However, if the time-series would be not to normalize the data before the analysis but center
are sampled as inter-event-times (such as recording heart rate the variables (see e.g., Shockley, 2005, p. 163).
as beat-to-beat intervals, response times, or iterated maps), two However, even under those circumstances, CRQA is relatively
synchronously recorded time-series can be of different length. robust, you can try this out by entering two time-series that differ
This can be fixed by transforming the time-series into a pseudo- in magnitude into the analysis with and without normalization.
continuously sampled series using time-normalization methods. Given some adjustment of the radius parameter to yield some
However, the fluctuations in the original inter-event series can get sufficient level or cross-recurrence points, the cross-recurrence
smoothed-out in the process, which is undesirable, because these plot should still look similar under both circumstances, and also
fluctuations might contain actual information that recurrence- the other CRQA results should be in the same ball park.
based techniques can uncover. Hence, when transforming inter- Finally, sometimes it is hard to evaluate whether CRQA results
event to pseudo-continuous time-series for the purposes of are indicative of substantial coupling between time-series, or
subjecting them to CRQA, one should pick a high re-sampling how strong this coupling is. After all, by choosing a sufficiently
rate at a relatively small window, because this will result in higher high value for the radius parameter r, one can even make
accuracy of CRQA results (Wallot et al., 2013). two random number sequences yield cross-recurrences (even
Another issue concerns the question of whether or how to though they look like homogenously distributed isolated cross-
normalize the individual time-series before submitting them to recurrence points). There are two procedures that have been
CRQA. If the values of the time-series have similar distribution suggested to obtain base-line measures of cross-recurrences. First
and magnitude of values, then normalization should not make of all, one can randomly shuffle both time-series (to do this,
much of a difference. If they do, then it is helpful to normalize use for example the R function sample(), which returns shuffled
each time-series to ensure that the CRQA results are really a values of its input variable) and then do CRQA with the same
property of the sequential order of data points in the time- parameters of the original time-series. This assesses, how far the
series, and not due to differences in magnitude. However, extreme two time-series exhibits coupling above chance. Another way is
outliers of extreme differences in distributions (especially if to calculate and average the individual recurrence properties for
one of them possesses a strong heavy tail) may result in each time-series, and use this number as a reference point. This
the normalization procedure to introduce uncertainty into tells one how well the two time-series correlate, given that each of
the CRQA results instead of reducing it. Recurrence-based the two component time-series possess some dynamic structure
procedures themselves are extremely robust against outliers, that might influence the CRQA results. Here, however, keep in
but this is not true for certain normalization procedure, since, mind that recurrence analysis results of individual time-series –
for example, z-scoring a time-series with one or few extreme everything else equal – are numerically higher than the cross-
outliers results in “squeezing” the remaining mass of the data recurrence results. So, the question is, how well the CRQA results
points together. Here, either removing and replacing individual approach the average recurrence properties of the individual
data points can be warranted (if they are very few), or time-series, which do set some upper limit on cross-recurrence.
otherwise normalizing data based on percentiles. In the particular If one deals with multiple samples (e.g., multiple dyads that
case where the two time-series have similar distributions and perform different tasks), one can also create false-pairs to evaluate

Frontiers in Psychology | www.frontiersin.org 12 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

coupling strength, and we will come back to this procedure at the already estimated that the adequate embedding for our data is
end when addressing pitfalls and issues of DCRP. m = 4 and the adequate value of delay is d = 9, we will have to
perform our DCRP analysis on those data with no embedding
and delay (i.e., both equal to 1). But first it is necessary to
DIAGONAL CROSS-RECURRENCE normalize the data to make the fluctuations comparable in phase
PROFILE (DCRP) ANALYSIS space, since this option will also not be given by the drpdfromts()-
function. Then, we can run the main analysis on the normalized
After introducing cross-recurrence plots, we can now consider data and save the results in appropriately named objects (see
DCRP analysis (Richardson and Dale, 2005; Dale et al., 2011a,b) Box 3).
as a kind of follow-up analysis of the cross-recurrence plot. The arguments we need to provide to the function are the two
Instead of quantifying the whole cross-recurrence plot of two time-series we are analyzing (t1 and t2); a value for the window
time-series, we restrict ourselves to only one measure (%REC) size or the number of lags to compute around the LoS (ws; this
and to a limited band around the Line of Synchrony (LoS), the value is the number lags on each side of the LoS, which in this
main diagonal of the plot (which usually spans the plot from example gives a total number 41 lags – 20 on each side of the LoS,
the lower left corner to the upper right one). In principle other plus the LoS itself, which is lag0); Hence, by setting the window
diagonal recurrence variables could be computed as well (such size, one specifies the time interval within which one wants to
as %DET or ADL for each diagonal), but applications of these compute time-lagged recurrences. Furthermore, one needs to set
measures in DCRP-analysis have been sparse so far. the type of the data (“categorical” or “continuous,” even though
As we already mentioned in previous sections, the main this choice is of no practical implications in the current version of
diagonal in a cross-recurrence plot is special, because it captures the function); and finally the value of the radius, expressed in the
recurrences between the two time-series at the very same time- same units as the time-series (z-scores in this case). The particular
stamp (lag 0), hence the name LoS. So, if the two time-series have choice of radius in this case was guided by the principle of keeping
equal or similar values (i.e., within the selected radius) at the same the %REC value in the resulting recurrence plot at a relatively low
time-stamp, a recurrence point will be charted on the LoS, and level, here about 2.5%.
this is why, for example, in RQA the main diagonal is always filled The following code will create the three plots of the profiles for
with recurrence points: a time-series is necessarily equal to itself the above analyses.
at lag0.
When the time-series come from different, possibly coupled plot(−20 : 20, dcrp_results_xy$profile, type = “l00 , xlab
systems, the main diagonal will not always contain recurrences = “Lag 00 , ylab = “%REC00 )
and the cross-recurrences will be asymmetrical distributed
around it. The distribution of recurrence points around the plot(−20 : 20, dcrp_results_xz$profile, type = “l00 , xlab
diagonal could then indicate that some values from one time- = “Lag 00 , ylab = “%REC00 )
series are followed by the same values in the other – if one of
them leads and the other follows with a given lag or range of lags. plot(−20 : 20, dcrp_results_yz$profile, type = “l00 , xlab
We can then compute the relative amount of recurrence = “Lag 00 , ylab = “%REC00 )
points, i.e., %REC, falling on a limitited set of diagonals (i.e., a
limited number of lags) in a window centered at lag 0, which Figure 9 shows the profiles for the three bivariate analyses.
corresponds to the LoS. In this way, we can consider how Table 3 shows the results outputted by the function, that is the
recurrences are distributed across the set of lags chosen. The value of maximal recurrence and at which lag it specifically occurs
DCRPs are then the graphical representation of the amount of (Note: this value is to be read as the index in the vector going
recurrence as a function of the lags. Figure 8 illustrates the from −ws to +ws, and hence it needs to be translated in the
relationship between the cross-recurrence plot and the diagonal appropriate, real time lag which is application specific).
recurrence profile that can be computed around the LoS. When eyeballing the profiles, we search for peaks emerging
from a more uniformly distributed recurrence line. In this case
a clear peak is evident in all the panels of Figure 9. In the cross-
RUNNING THE ANALYSIS IN R recurrence analysis of dimensions x and y of the Lorenz system
(Figure 9A) the peak reaches its maximum value at about lag
The core function to perform DCRP in R is to be found +3 (the 24th value of the profile’s vector, see Table 3) which
in the package ‘crqa’ (Coco and Dale, 2014), and is called means – given the order we entered the two time-series in the
drpdfromts(). The main focus of the whole package is on cross- drpdfromts()-function – that x is consistently lagging behind y
recurrence analysis, which is an advancement relative to other by 3 time steps. In other words, values of the y time-series
non-linear time-series packages in R, but its application is recur with a lag of 3 within the x time-series (look also at
also slightly biased toward categorical (nominal) time-series. Figures 2B,C). In the other plots, we also see a clear peak at lag
Although, the drpdfromts()-function provides the option of −1 for time-series x and z (Figure 9B), meaning these two time-
choosing continuous input time-series, it is not possible to series are almost perfectly synchronized in their fluctuations (see
overrule the predefined settings of embedding (m) and delay also Figures 2B–D), while the peak is at a more negative lag (−4)
(d) for the categorical case (m = d = 1). So, even though we for time-series y and z (Figure 9C), meaning in this case that z

Frontiers in Psychology | www.frontiersin.org 13 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

FIGURE 8 | Illustration of how to compute a diagonal recurrence profile from a cross-recurrence plot. The solid black line on the tilted cross-recurrence plot marks
the LoS. The dotted black and red lines show the width of lags ±5 and ±10 around the LoS, respectively. The line graph in the back of the figure illustrates the
summation of recurrence points for the lags – the diagonal cross-recurrent profile.

BOX 3 | Data preparation and running DCRP on the three possible pairing of
embedded version suggest a lag of +3, even though we see a
the dimensions of the Lorenz system. maximum of recurrence points across multiple lags in Figure 10.
lorDataz <– as.data.frame(lorData[2:4]) # transform the Lorenz data in a This, however, is also a function of the comparatively higher value
data.frame that we picked for the radius parameter.
lorDataz <– as.data.frame(scale(lorDataz)) # normalize the three variables
keeping the data.frame format
PITFALLS AND ISSUES
dcrp_results_xy <– drpdfromts(t1 = lorDataz$x, t2 = lorDataz$y, ws = 20,
datatype = “continuous”, radius = 0.05) # run DCRP on the x and y dimension As already pointed out, the function available in R to compute
of the Lorenz system DRCPs was specifically intended to analyze categorical time-
series. Hence, when time-series are categorical, some cross-
dcrp_results_xz <– drpdfromts(t1 = lorDataz$x, t2 = lorDataz$z, ws = 20, recurrence analysis parameters are set by default, usually m = 1,
datatype = “continuous”, radius = 0.05) # run DCRP on the x and z dimension
of the Lorenz system
d = 1, and r = 0, when using function drpdfromts(). It is important
to be aware of this limitation when running our analysis or
dcrp_results_yz <– drpdfromts(t1 = lorDataz$y, t2 = lorDataz$z, ws = 20, alternatively use the code provided in Box 4 for the computation
datatype = “continuous”, radius = 0.05) # run DCRP on the y and z dimension of continuous and embedded data.
of the Lorenz system
A few problems specific to this analysis have to do with the
evaluation of the profiles. The most important one concerns the
relevance of the points of maxima (and minima) in the profile,
is lagging behind y of four time steps. In both cases the amount indicating a concentration of recurrence (or some particularly
of maximum recurrence is considerably lower than in Figure 9A. low level of it) across a certain range of lags. In general, a
which is understandable given the different type of oscillation of maximum is always present in the profile we obtain, so the
time-series z compared to the other two (see Figures 2B–D). question is whether the amount of recurrence at this lag (or set
If we want to compute the recurrence profiles for embedded of lags) is indicative of a real lag-dependent coordination in the
time-series, we will have to compute the cross-recurrence plot two time-series or whether it is no different from the amount
with proper embedding first, and then use the following routine of recurrence we see at other lags. In other words, we need a
to compute the profile from that plot (see Box 4). Here, we use reference point against which to compare the peaks and valleys
the crqa()-function with the estimated embedding parameters in the profile.
and calculate the recurrence profile around ±20 lags around the This reference point has usually been found in a recurrence
LoS. The results are plotted in Figure 10. Comparing Figure 9A baseline, which is an additional profile we can plot alongside
with Figure 10, we see that both, the non-embedded and the the original one. A few different methods have been proposed

Frontiers in Psychology | www.frontiersin.org 14 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

BOX 4 | Computing DCRP for embedded data.


crqa_results_xy <– crqa(ts1 = lorData$x, ts2 = lorData$y, delay = 9,
embed = 4, rescale = 2, radius = 20, normalize = 2, mindiagline = 2,
minvertline = 2, tw = 0, whiteline = FALSE,
recpt = FALSE, side = "both") # compute cross-recurrence plot

diagLine <– split(crqa_results_xy$RP, row(crqa_results_xy$RP) -


col(crqa_results_xy$RP)) # sort CRP into diagonal lines

lags <– 20 # chose number of lags around LoS

recLag <– 0 # create variable to store recurrences at specific lags

for (i in seq(lags+round(length(diagLine)/2), -lags+round(length(diagLine)/2))) {


tempDiagLine <– unlist(diagLine[i])
recLag <– append(recLag, sum(tempDiagLine)/length(tempDiagLine))
} # loop through diagonal lines and calculate recurrences at each diagonale

plot(seq(-lags, lags), recLag[2:(lags∗ 2+2)], type = ’b’) # plot DCRP profile

time dependent coordination we would expect in coupled


systems without disrupting the actual, ordered nature of the
time-series themselves. Another more radical proposal is to
eliminate the ordered, sequential nature of the time-series by
shuffling them randomly and then run cross-recurrence analysis
on them, maybe even repeating the process several times to
finally take the averaged profile and confidence intervals from
these repetitions. In the case of categorical time-series, a similar
procedure would also be to shuffle the time-series without
‘breaking’ the chunks of equally coded events in which the
time-series is organized. As of now, it seems good practice to
compute both kinds of baslines in order to evaluate specific
parts of the DCRP. Moreover, there are other possibilities
to create surrogate series that retain specific moments of
the data and remove others, and can be used to test for
whether the presence of absence of these moments are driving
FIGURE 9 | Recurrence profiles of the pairwise cross-recurrence analyses of
the observed effects (such as the iterative amplitude-adjusted
the 1-dimensional x-y-z time-series from the Lorenz system. Plot of
drcp_xy$profile (negative lags = y lagging behind) (A). Plot of drcp_xz$profile fourier-transformation, IAAFT – Schreiber and Schmitz, 1996).
(negative lags = z lagging behind) (B). Plot of drcp_yz$profile (negative However, one needs to carefully check what moments such
lags = z lagging behind) (C). surrogates are manipulating in order to arrive at a proper
interpretation of the results.
We need also to underline the fact that the coupling in the
for the generation of baseline profiles. One proposal is two time-series ought to be rather strongly time-locked, for it
the creation of so-call false-pairs, extracting the diagonal- to appear as a clear peak in the DRCP. In fact, if the time delay
wise profiles from a surrogate pair of time-series which between similar states in the two time-series is highly variable, the
come from the same experimental condition, but different recurrence will spread across several diagonal lines close to the
participants. This would effectively eliminate the fine-grained LoS and hence we could possibly fail to see a peak at any definite
lag. This might, however, be itself exactly the kind of information
that is of interest.
TABLE 3 | Output of the drpdfromts()-function.

dcrp_results_xy dcrp_results_xz dcrp_results_yz MULTIDIMENSIONAL RECURRENCE


maxrec 0.403 0.051 0.0522
QUANTIFICATION ANALYSIS (MdRQA)
maxlag 24 20 17
Multidimensional recurrence quantification analysis is a
Apart from the profiles (shown in Figure 9), the function drpdfromts() usually multivariate extension of simple RQA for multidimensional
provides two other values as output, the maxrec, which is the value of recurrence
time-series, and can be used to analyze the joint dynamics
at the point of maximum in the profile, and the maxlag, or the index lag of the
point of maximum. In the table results for these two values are presented for the of groups (n > 2) of participants (Wallot et al., 2016b).
analyses run. The underlying idea of MdRQA is simple: Instead of using

Frontiers in Psychology | www.frontiersin.org 15 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

reconstructed from each dimension of the Lorenz system and the


3-dimensional original.
No matter whether one interprets the three variables as
a multidimensional behavior of one system, or the coupled
behavior of three individual systems, MdRQA makes it possible
to quantify such higher-level dynamics properly, by taking the
phase-space of multiple measures time-series as the point of
departure. Also, it allows to quantify the dynamics at different
grouping levels – for example a group of 4 participants which
act together in a task and where each participant provides
one observable can be analyzed in terms of six possible dyads
(MdRQA2) within this group, four possible triads (MdRQA3)
within the group, and one group-level containing all four
members (MdRQA4).
However, even though MdRQA offers new possibility for the
analysis of multivariate time-series, is also has certain limitations.
If MdRQA is run on un-embedded multidimensional time-series,
certain dynamics of the system might not be properly captured
if not all dimensions of the system are adequately represented
FIGURE 10 | Recurrence profiles of the pairwise cross-recurrence analyses of
as dimensions of the multivariate time-series. Particularly with
the properly embedded time-series from the Lorenz system. Plot of the empirical data, the problem is that – in contrast to the Lorenz
diagonal cross-recurrence profile of lorData$x and lorData$y, with the system example we are using here – we usually do not know
percentage of recurrence points plotted on the y-axis, and the number of lags the dimensionally of the data a priori. Of course, data can be
around the LoS on the x-axis. embedded using MdRQA as well, but the embedding parameters
have to be estimated on the individual component dimensions
of the multidimensional time-series and such an estimation
a single 1-dimensional time-series that is embedded in might not properly represent the actual parameters of the
phase-space, one uses multiple recorded time-series that multidimensional time-series (see section “Issues and Pitfalls”).
are embedded in a phase-space. However, in contrast to
CRQA, it is not that each of these time-series is embedded
separately into one phase-space, but each time-series actually RUNNING THE ANALYSIS IN R
provides one (or multiple – if the time-series is further
embedded via time-delayed copies) dimension of that To run the analysis in R, you need to copy-paste the mdrqa()-
phase-space. function from the Supplementary Materials to this paper into
Consider the data from the Lorenz-system that we have your workspace (or download it from a repository - see the
generated. We know that the system is 3-dimensional, and we link in the Supplementary Materials). Now, we want to use the
have a time-series that corresponds to the variation on each three time-series lorData$x, lorData$y, and lorData$z to run a
dimension over time. However, we also know from our analysis of MdRQA3, that is an analysis with three time-series. This also
these three time-series in CRQA that not all of the three possible means that the underlying phase-space is at least 3-dimensional.
pairings yield the same results. Hence, correlating all dyadic Of course, on top of that we might have to embed the time-series
time-series does not properly reflect the system-level dynamics via the method of time-delayed embedding. However, checking
of the Lorenz-system. Figure 11 displays the three phase-spaces the individual estimates of m for the three time-series (Table 2),

FIGURE 11 | Phase-space reconstruction through 3-D embedding of the individual time-series of the Lorenz-system (A–C) and the phase-space portrait of the
actual 3-dimensional Lorenz-system (D).

Frontiers in Psychology | www.frontiersin.org 16 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

BOX 5 | Computing MdRQA3 for the full 3-dimensional Lorenz system.


mdrqa3_results <– mdrqa(data = as.matrix(cbind(lorData$x, lorData$y,
lorData$z)), emb = 1, del = 1, norm = ’euc’, rad = 0.2) # run MdRQA3 on
the x, y and z dimensions of the Lorenz system

image(mdrqa3_results$RP) # show recurrence plot

it seems that all time-series are 3- or 4-dimensional. Hence, we


decide not to embed anymore, because minimum dimensionality
of phase-space (i.e., 3) is already pretty close to those estimates.
If the estimates of individual time-series dimensionality
through the false-nearest-neighbor function would be
substantially higher, for example 6, then we would additionally
embed the time-series a single time at their estimated average (or
maximum) delay. Because each of the three time-series already
contributes one dimension to the phase-space, embedding
this 3-dimensional time-series once would already yields a
6-dimensional phase-space.
To use the three time-series without further embedding, we
call the mdrqa()-function (see Box 5). The data for the mdrqa()-
function needs to be entered as a single matrix with each time-
series being a separate column in the matrix and all the data
points in rows. Hence, the as.matrix()-function and the cbind()-
function are used to convert the three time-series into a matrix
with three columns. emb is the embedding dimension, and
since we do not want to embed the time-series further, we set FIGURE 12 | Recurrence plot and results of the MdRQA3 analysis for the
emb = 1. del is the delay parameter, norm the parameter for phase- time-series lorData$x, lorData$y, and lorData$z.
space normalization, and rad the radius parameter just as in the
analyses above.
Figure 12 shows the results of the MdRQA3. Because MdRQA
BOX 6 | Running MdRQA2 on the three possible pairings of the Lorenz
treats the time-series as a single multidimensional series, the system.
resulting recurrence plot is symmetric. Similar to CRQA, we mdrqa2_results_xy <– mdrqa(data = as.matrix(cbind(lorData$x, lorData$y)),
face the problem that the absolute values of the results are dims = 2, emb = 2, del = 9, norm = ‘euc’, rad = 0.2) # run MdRQA2 on the x
dependent on the radius parameter, and that we do not know and y dimensions of the Lorenz system

how to evaluate them in terms of whether there is strong or mdrqa2_results_xz <– mdrqa(data = as.matrix(cbind(lorData$x, lorData$z)),
weak coupling between the three time-series. As suggested in dims = 2, emb = 2, del = 9, norm = ‘euc’, rad = 0.2) # run MdRQA2 on the x
the Section ” Cross-Recurrence Quantification Analysis,” one and z dimensions of the Lorenz system
could perform an additional analysis with all time-series shuffled,
or set the results in relation to the individual series’ RQA mdrqa2_results_yz <– mdrqa(data = as.matrix(cbind(lorData$y, lorData$z)),
dims = 2, emb = 2, del = 9, norm = ‘euc’, rad = 0.2) # run MdRQA2 on the y
results. Note, however, that higher values for MdRQA are not and z dimensions of the Lorenz system
necessarily an index of superior group coordination (Wallot
et al., 2016a,b). Sometimes, looser coupling on the group level
can be beneficial for task performance than stronger coupling,
implying that lower MdRQA results are positively correlated and To test this, one can run the three possible dyads as
more predictive of group performance (see also Abney et al., MdRQA2 (i.e., lorData$x with lorData$y, lorData$x with
2015; Vink et al., 2017). In other words this is an interesting, lorData$z, and lorData$y with lorData$z) and examine their
open empirical question that MdRQA analysis can help to results (see Box 6). As can be seen in Figure 13, dyad
address. x-y seems to exhibit stronger coupling in terms of %REC
Next, we could investigate whether there are differences on compared to the other dyads, while dyad y-z seem to exhibit
the dyadic level that could be of interest – for example, stronger more stable periods of coupling in terms of ADL compared
coupling between some of the dimensions of the Lorenz-system to the other dyads. In any case, the combination of x and
compared to others. Translated into group data analysis, such an z seems to exhibit the weakest coupling of the three. All,
analysis allows to investigate whether all members of a group are however, differ in some aspect from the “true” multivariate
equally interacting with each other or whether there are some group-level dynamics we’ve seen when subjecting the three
preferred dyads within a group that tend to couple their behavior dimensions of the Lorenz-system simultaneous to MdRQA3
more (or less) with each other than with others. (Figure 12).

Frontiers in Psychology | www.frontiersin.org 17 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

FIGURE 13 | Recurrence plots and MdRQA2 results for the three dyads lorData$x, lorData$y (A), lorData$x, lorData$z (B) and lorData$y, lorData$z (C) of the group.

PITFALLS AND ISSUES that are measured on the same scale, their absolute values might
now hold meaningful information for the multidimensional
While the advantage of MdRQA lies in its applicability to groups dynamics – but that is not necessarily so, and normalizing
of n > 2, it also has a certain number of disadvantages compared the data beforehand is definitely suggested if one wants to
to the other techniques presented above. As of now, it is not have equal weighting of the dynamics of each individual
possible to investigate leader-follower relationship with MdRQA, time-series in the resulting recurrence plot and MdRQA
as for example with DCRP. analysis.
Also, there are a few issues with data preparation and
parameter estimation. Currently, MdRQA parameters are
estimated on the individual component time-series that A NOTE ON COMPARING SAMPLES
enter the analysis. However, the multivariate time-series in
which they are combined could exhibit different average The logic of using recurrence-based measures (e.g., %REC,
mutual information and false-nearest-neighbor properties %DET, ADL, MDL, etc.) with inferential statistics for purposes
than the average of the individual time-series. Hence, of sample comparison is not different from comparing means
these estimates are more uncertain. However, Wallot and (or other quantities) between samples of participants – i.e.,
Mønster (2018) have recently developed Matlab functions they are computed for each participant, condition, or trial, and
for the estimation of embedding parameters for multivariate are subsequently put into statistical models that evaluate them
time-series. across these categories. However, the estimation and setting of
If one wants to compare the MdRQA results across different parameters, as well as a few other issues might warrant some
group levels (i.e., MdRQA2 with MdRQA3), one needs to keep guiding remarks in this context. As it has been summarized in
in mind that the overall dimensionality of the time-series should Wallot (2017) and in Wallot and Grabowski (in press) the main
be the same, or at least as similar as possible. As a rule of issues are the following:
thumb, higher (embedding) dimensionality de-correlates the Of course, the recurrence-based analyses above are time-
phase-space, and leads at least to fewer recurrences. Hence, if a series analysis techniques, so one needs to have multiple data
3-dimensional time-series is also embedded once (i.e., MdRQA3 points in order to apply the analyses. The more data points,
with emb = 2), this results in a 6-dimensional phase-space. the more reliable the measures will be, but this depends also
To compare the resulting MdRQA values with results from 2- on the dynamics in question. Additionally, because these are
dimensional time-series, one might have to embed these twice multivariate analyses, one needs to have at least two or more
(i.e., MdRQA2 with emb = 3), which also results in a 6- matched time-series with the same number of data points (for a
dimensional phase-space (see Wallot et al., 2016a,b). However, tutorial introduction of applying RQA to individual time-series
sometimes the true dimensionality cannot be re-produced, and in R, see Wallot, 2017). With some kinds of data however –
then trying to minimize the gap is the best that one can do. nominal data or data with strong, distinctive dynamics – as
Finally, the answer to the question of whether or not few as 10–30 data points might already be sufficient, while for
to normalize data before subjecting them to MdRQA is not others, a few hundreds or several thousands of data points are
straightforward. For example for the Lorenz-system, normalizing certainly desirable. Again, the most important issue is to capture
the time-series would not improve the results of the MdRQA, the phenomenon one wants to investigate sufficiently, and to
because the non-normalized time-series are properly scaled with do so at an (average) sampling rate that sufficiently covers the
regard to each other already. Similarly, when having time-series changes in the observable over time.

Frontiers in Psychology | www.frontiersin.org 18 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

When comparing data sets that compose a samples, this is converge across the different parameter settings, then one can
usually done by first selecting a single set of parameters for all accept the occurrence of a few individual cases where %REC = 0
of them, then to run the respective recurrence-based analysis or 100%.
on each dyad (or group) and obtain the results. Hence, one Another issue that arises when using recurrence-based
would start to chart the parameters as in Table 2, and then analysis is the number of results variables produced by the
use the same (maybe the average or maximum) value for delay analyses (e.g., %REC, %DET, ADL, MDL). In principle, all of these
and embedding dimension across all groupings in order to variables can be dissociated, but empirically this is not always the
properly compare the resulting recurrence measures (Wallot case. As a guideline for interpretation, while relatively high %REC
et al., 2012). If the sample is relatively diverse in terms of the means that many individual instances in a pair or group of time-
estimated parameters, one should select parameter values for series are recurrent, %DET means that several of these individual
delay and embedding dimension that are somewhat above the instances are connected. If %DET is high, and ADL and MDL are
average, because recurrence-based analyses are robust against low, this means we have a high, but rather homogenous cross-
(moderate degrees) of over-embedding (Webber and Zbilut, correlation in the time-series. If %DET is low and ADL and MDL
2005). are high, this means that the coupling of the time-series is very
Similarly, a single radius parameter r should be picked for heterogeneous, and is probably composed of changing epochs
the whole sample: One can start again with an arbitrary value of high and low correlation between the time-series. If ADL is
for r, run all pairings of data sets with this radius, and then high, and MDL is comparatively low, this could be indicative of
inspect the distribution of percent recurrence (%REC) in the bursting behavior, where the observed performance is composed
samples. As mentioned earlier, %REC should be low, but not of bursts of coupling and de-coupling.
too low in order to obtain meaningful results. For inter-event- However, the described relations between %REC, %DET, ADL,
times the lowest data set in the sample should have not much and MDL should only be seen as a rule-of-thumb, as an initial
less than one percent of recurrence (i.e., %REC ≈ 1%), with the suggestion. An inspection of the associated (cross-)recurrence
majority of the data sets being between %REC = 5 and 10%. plots will help to interpret the shared dynamics between the time-
For relatively deterministic time-series this figure can be lower series. As mentioned above, for inter-event-type data, many of
(%REC between 1 and 5%, and sometimes even below that), but the results variables are highly correlated, and do not actually
for very noisy data, it can be substantially higher. In any case, dissociate different dynamics. In such cases, one can pick one (or
the radius parameter r might have to be adjusted a couple of a few) of the variables that seem to capture the composition of
times before a satisfying solution is found. If one uses categorical the corresponding (cross-)recurrence plot best. Alternatively, the
data, the radius should be set to 0 or to a tiny value, so that different measures can also be subjected to principle component
(cross-)recurrences are only based on the repetition of identical analysis, and the extracted component(s) can be treated as a
instances. dependent (or predictor) variable which captures generalized
If the data sets cannot be reasonably fitted with a single radius stability or correlation in the data – depending on the respective
parameter – that is, for some value of r, some of the data sets are component loadings.
at or close to %REC = 100%, and at the same time some are at Finally, there is a yet unanswered question regarding the
or close to %REC = 0%, one can adjust the radius for each data number of degrees of freedom in inferential statistical models
set individually in order to keep the percentage of recurrence when analyzing pairs of data sets. On one hand, when one is
constant across all data sets (e.g., fixed percent recurrence of investigating all possible pairs in a sample using, for example,
%REC = 5% for each data set). Of course, in this case, %REC CRQA, one has many more observations than individual
needs to be omitted from the inferential statistical analysis, as it participants. Hence, such kind of analysis seems to inflate the
should be very similar (or the same) across pairings in all samples, degrees of freedom available, and adjustments for this inflation
but the other measures, such as %DET, ADL, and MDL can be are needed. On the other and, correlations are not transitive,
still analyzed (as a stand-in for %REC, one can instead include so it can be argued that all possible pairings actually provide
analysis of the radius parameter r that is now different across a reasonably independent degree of information (except from
pairs of groups of time-series. However, this might not yield their limits, only perfect correlations and perfect independence
the same results, as r and %REC do not scale linearly with each between data sets exist). However, this question for the current
other). research practice has not yet received a conclusive answer.
If one notices great heterogeneity of the values of one of the
parameters or %REC across the samples, one can also explore the
parameter space. This means that the parameters d, m, and r are
systematically varied to check whether the resulting solutions are CONCLUSION AND FURTHER
stable across these variations. A common first exploration of the READINGS
parameter space would be to run the analysis in question for the
lowest, highest, and average values of each parameter and pick Overall, the combination of CRQA, DCRP, and MdRQA allows
3 different values r that yield low (%REC ≈ 1 to 3%), moderate for a very detailed investigation of multivariate time-series. They
(%REC ≈ 5 to 10%), and high (%REC ≈ 15 to 20%) percentages allow to quantify the strength of coupling between two or more
of (cross-)recurrence. If the resulting recurrence measures (or time-series, to quantify leader-follower relations between them,
at least the direction of the effects observed in those measures) and to assess dynamics at different levels of composition of the

Frontiers in Psychology | www.frontiersin.org 19 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

observables. Recurrence-based analyses are especially suitable applying recurrence-based analysis that might be valuable for
for time-series data with non-stationary properties; moreover, interested readers. Also, we can recommend the webbook edited
they are robust against extreme outliers and do not make by Riley and Van Orden (2004) for a conceptual introduction to
any assumptions about particular distributions or particular RQA and CRQA on the webpage of the NSF, and the webpage
relationships between the time-series of interest. This makes www.recurrence-plot.tk, hosted by Norbert Marwan from the
them also useful for applications in naturalistic settings, or PIK Potsdam, which provides access to various other RQA-
investigations over longer time intervals. Again, we want to point software packages, and hosts a near exhaustive bibliography of
out one difference between CRQA (and DCRP, accordingly) on applications of recurrence-based analysis across several scientific
the one hand, and MdRQA on the other hand: While the former disciplines.
can rely on an established procedure for proper phase-space
reconstruction (if one wants to perform analysis on embedded
data), it is as of now unclear how these procedures perform AUTHOR CONTRIBUTIONS
multivariate cases where MdRQA is used, if one does not know
the embedding properties and the composition of the time-series SW and GL wrote the manuscript. SW coded the MdRQA-
beforehand (for a discussion, see the section “Multidimensional function.
Recurrence Quantification Analysis”).
The current tutorial provided hands-on examples of how to
run the different analysis in R, and how to utilize and interpret SUPPLEMENTARY MATERIAL
the results. Moreover, we outlined the current best practice for
how to apply the analyses to empirical data, and in the context The Supplementary Material for this article can be found
of sample comparisons. In addition to our recommendations, online at: https://www.frontiersin.org/articles/10.3389/fpsyg.
Marwan (2011) summarized general problems and pitfalls 2018.02232/full#supplementary-material

REFERENCES Dale, R., Warlaumont, A. S., and Richardson, D. C. (2011b). Nominal cross
recurrence as a generalized lag sequential analysis for behavioral streams. Int.
Abarbanel, H. (1996). Analysis of Observed Chaotic Data. New York, NY: Springer. J. Bifurcat Chaos 21, 1153–1161. doi: 10.1142/S0218127411028970
doi: 10.1007/978-1-4612-0763-4 Fisher, M. A., Patil, V. K., and Webber, C. L. Jr., (2015). Recurrence quantification
Abney, D. H., Paxton, A., Dale, R., and Kello, C. T. (2014). Complexity matching analysis of f-waves and the evaluation of neuropathies. Neurol. Res. Int.
in dyadic conversation. J. Exp. Psychol. Gen. 143, 2304–2315. doi: 10.1037/ 2015:183608. doi: 10.1155/2015/183608
xge0000021 Fusaroli, R., Konvalinka, I., and Wallot, S. (2014). “Analyzing social interactions:
Abney, D. H., Paxton, A., Dale, R., and Kello, C. T. (2015). Movement dynamics the promises and challenges of using cross recurrence quantification analysis,”
reflect a functional role for weak coupling and role structure in dyadic problem in Translational Recurrence. Springer Proceedings in Mathematics, eds N.
solving. Cogn. Process. 16, 325–332. doi: 10.1007/s10339-015-0648-2 Marwan, M. Riley, A. Giuliani, and C. L. Webber Jr. (London: Springer),
Abney, D. H., Warlaumont, A. S., Oller, D. K., Wallot, S., and Kello, C. T. (2017). 137–155. doi: 10.1007/978-3-319-09531-8_9
Multiple coordination patterns in infant and adult vocalizations. Infancy 22, Fusaroli, R., and Tylén, K. (2016). Investigating conversational dynamics:
514–539. doi: 10.1111/infa.12165 interactive alignment, interpersonal synergy, and collective task performance.
Acharya, U. R., Chua, E. C., Faust, O., Lim, T. C., and Lim, L. F. (2011). Cogn. Sci. 40, 145–171. doi: 10.1111/cogs.12251
Automated detection of sleep apnea from electrocardiogram signals using Giuliani, A., Piccirillo, G., Marigliano, V., and Colosimo, A. (1998). A nonlinear
nonlinear parameters. Physiol. Meas. 32, 287–303. doi: 10.1088/0967-3334/32/ explanation of aging-induced changes in heartbeat dynamics. Am. J. Physiol.
3/002 Heart Circ. Physiol. 275, H1455–H1461. doi: 10.1152/ajpheart.1998.275.4.
Andrade, K. C., Wehrle, R., Spoormaker, V. I., Sämann, P. G., and Czisch, M. H1455
(2012). Statistical evaluation of recurrence quantification analysis applied Javorka, M., Trunkvalterova, Z., Tonhajzerova, I., Lazarova, Z., Javorkova, J., and
on single trial evoked potential studies. Clin. Neurophysiol. 123, 1523–1535. Javorka, K. (2008). Recurrences in heart rate dynamics are changed in patients
doi: 10.1016/j.clinph.2012.01.005 with diabetes mellitus. Clin. Physiol. Funct. Imaging 28, 326–331. doi: 10.1111/
Angus, D., Watson, B., Smith, A., Gallois, C., and Wiles, J. (2012). Visualising j.1475-097X.2008.00813.x
conversation structure across time: insights into effective doctor-patient Kennel, M. B., Brown, R., and Abarbanel, H. D. (1992). Determining embedding
consultations. PLoS One 7:e38014. doi: 10.1371/journal.pone.0038014 dimension for phase-space reconstruction using a geometrical construction.
Cattell, R. B. (1966). The scree test for the number of factors. Multivariate Behav. Phys. Rev. A 45:3403. doi: 10.1103/PhysRevA.45.3403
Res. 1, 245–276. doi: 10.1207/s15327906mbr0102_10 Kiefer, A. W., Riley, M. A., Shockley, K., Sitton, C. A., Hewett, T. E., Cummins-
Coco, M. I., and Dale, R. (2014). Cross-recurrence quantification analysis of Sebree, S., et al. (2011). Multi-segmental postural coordination in professional
categorical and continuous time series: an R package. Front. Psychol. 5:510. ballet dancers. Gait Posture 34, 76–80. doi: 10.1016/j.gaitpost.2011.03.016
doi: 10.3389/fpsyg.2014.00510 Knoblich, G., Butterfill, S., and Sebanz, N. (2011). “Psychological research on joint
Dabiré, H., Mestivier, D., Jarnet, J., Safar, M. E., and Chau, N. P. (1998). action: theory and data,” in Psychology of Learning and Motivation-Advances
Quantification of sympathetic and parasympathetic tones by nonlinear indexes in Research and Theory, ed. B. Ross (Burlington: Academic Press), 59–101.
in normotensive rats. Am. J. Physiol Heart Circ. Physiol. 275, 1290–1297. doi: 10.1016/B978-0-12-385527-5.00003-6
doi: 10.1152/ajpheart.1998.275.4.H1290 Konvalinka, I., Xygalatas, D., Bulbulia, J., Schjødt, U., Jegindø, E. M., Wallot, S.,
Dale, R., Kirkham, N. Z., and Richardson, D. C. (2011a). The dynamics of reference et al. (2011). Synchronized arousal between performers and related spectators
and shared visual attention. Front. Psychol. 2:355. doi: 10.3389/fpsyg.2011.00355 in a fire-walking ritual. Proc. Natl. Acad. Sci. U.S.A. 108, 8514–8519. doi: 10.
Dale, R., and Spivey, M. J. (2006). Unraveling the dyad: using recurrence analysis 1073/pnas.1016955108
to explore patterns of syntactic coordination between children and caregivers in Kreibig, S. D. (2010). Autonomic nervous system activity in emotion: a review. Biol.
conversation. Lang. Learn. 56, 391–430. doi: 10.1111/j.1467-9922.2006.00372.x Psychol. 84, 394–421. doi: 10.1016/j.biopsycho.2010.03.010

Frontiers in Psychology | www.frontiersin.org 20 December 2018 | Volume 9 | Article 2232


Wallot and Leonardi CRQA-DCRP-MdRQA

Lichtwarck-Aschoff, A., Hasselman, F., Cox, R. F., Pepler, D., and Granic, I. (2012). Trulla, L. L., Giuliani, A., Zbilut, J. P., and Webber, Jr, C. L (1996). Recurrence
A characteristic destabilization profile in parent-child interactions associated quantification analysis of the logistic equation with transients. Phys. Lett. A 223,
with treatment efficacy for aggressive children. Nonlinear Dynamics Psychol. 255–260. doi: 10.1016/S0375-9601(96)00741-4
Life Sci. 16, 353–379. Vink, R., Wijnants, M. L., Cillessen, A. H., and Bosman, A. M. (2017). Cooperative
Lorenz, E. N. (1963). Deterministic nonperiodic flow. J. Atmos. Sci. 20, 130–141. learning and interpersonal synchrony. Nonlinear Dynamics Psychol. Life Sci. 21,
doi: 10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2 189–215.
Marsh, K. L., Richardson, M. J., and Schmidt, R. C. (2009). Social connection Wallot, S. (2017). Recurrence quantification analysis of processes and products
through joint action and interpersonal coordination. Top. Cogn. Sci. 1, 320–339. of discourse: a tutorial in R. Discourse Process. 54, 382–405. doi: 10.1080/
doi: 10.1111/j.1756-8765.2009.01022.x 0163853X.2017.1297921
Marwan, N. (2011). How to avoid potential pitfalls in recurrence plot based Wallot, S., Fusaroli, R., Tylén, K., and Jegindø, E. M. (2013). Using complexity
data analysis. Int. J. Bifurcat. Chaos 21, 1003–1017. doi: 10.1142/S0218127411 metrics with RR intervals and BPM heart rate measures. Front. Physiol. 4:211.
029008 doi: 10.3389/fphys.2013.00211
Marwan, N., and Kurths, J. (2002). Nonlinear analysis of bivariate data with Wallot, S., and Grabowski, J. (in press). “A tutorial introduction to Recurrence
cross recurrence plots. Phys. Lett. A 302, 299–307. doi: 10.1016/S0375-9601(02) Quantification Analysis (RQA) for key-logging data,” in Advances in Writing
01170-2 Research Using Key-Logging, eds E. Lindgren and K. Sullivan (Leiden: Brill).
Marwan, N., Romano, M. C., Thiel, M., and Kurths, J. (2007). Recurrence plots Wallot, S., Mitkidis, P., McGraw, J. J., and Roepstorff, A. (2016a). Beyond
for the analysis of complex systems. Phys. Rep. 438, 237–329. doi: 10.1016/j. synchrony: joint action in a complex production task reveals beneficial
physrep.2006.11.001 effects of decreased interpersonal synchrony. PLoS One 11:e0168306. doi:
Marwan, N., Saparin, P., Thomsen, J. S., and Kurths, J. (2005). An innovative 10.1371/journal.pone.0168306
approach for the assessment of 3D structures in trabecular bone. J. Gravit. Wallot, S., and Mønster, D. (2018). Calculation of Average Mutual Information
Physiol. 12, 127–128. (AMI) and False-Nearest Neighbors (FNN) for the Estimation of Embedding
Mønster, D., Håkonsson, D. D., Eskildsen, J. K., and Wallot, S. (2016). Physiological Parameters of Multidimensional Time Series in Matlab. Front. Psychol. 9:1679.
evidence of interpersonal dynamics in a cooperative production task. Physiol. doi: 10.3389/fpsyg.2018.01679
Behav. 156, 24–34. doi: 10.1016/j.physbeh.2016.01.004 Wallot, S., Roepstorff, A., and Mønster, D. (2016b). Multidimensional Recurrence
Nomikou, I., Leonardi, G., Rohlfing, K. J., and Raczaszek-Leonardi,
˛ J. (2016). Quantification Analysis (MdRQA) for the analysis of multidimensional time-
Constructing interaction: the development of gaze dynamics. Infant Child Dev. series: a software implementation in MATLAB and its application to group-
25, 277–295. doi: 10.1002/icd.1975 level data in joint action. Front. Psychol. 7:1835. doi: 10.3389/fpsyg.2016.
Ramenzoni, V. C., Davis, T. J., Riley, M. A., Shockley, K., and Baker, A. A. (2011). 01835
Joint action in a cooperative precision task: nested processes of intrapersonal Wallot, S., O’Brien, B. A., and Van Orden, G. (2012). “A tutorial introduction to
and interpersonal coordination. Exp. Brain Res. 211, 447–457. doi: 10.1007/ fractal and recurrence analyses of reading,” in Methodological and Analytical
s00221-011-2653-8 Frontiers in Lexical Research, eds G. Liben, G. Jarema, and C. Westbury
Reddy, V., Markova, G., and Wallot, S. (2013). Anticipatory adjustments to being (Amsterdam: John Benjamins), 395–430.
picked up in infancy. PLoS One 8:e65289. doi: 10.1371/journal.pone.0065289 Webber, C. L. Jr., Schmidt, M. A., and Walsh, J. M. (1995). Influence of isometric
Richardson, D. C., and Dale, R. (2005). Looking to understand: the coupling loading on biceps EMG dynamics as assessed by linear and nonlinear tools.
between speakers’ and listeners’ eye movements and its relationship to J. Appl. Physiol. 78, 814–822. doi: 10.1152/jappl.1995.78.3.814
discourse comprehension. Cogn. Sci. 29, 1045–1060. doi: 10.1207/s15516709 Webber, C. L., and Zbilut, J. P. (1994). Dynamical assessment of physiological
cog0000_29 systems and states using recurrence plot strategies. J. Appl. Physiol. 76, 965–973.
Riley, M. A., and Van Orden, G. C. (2004). Tutorials in Contemporary Nonlinear doi: 10.1152/jappl.1994.76.2.965
Methods for the Behavioral Sciences. Available at: https://www.nsf.gov/pubs/ Webber, C. L. Jr., Marwan, N., Facchini, A., and Giuliani, A. (2009). Simpler
2005/nsf05057/nmbs/nmbs.jsp methods do it better: success of recurrence quantification analysis as a
Sauer, T., Yorke, J. A., and Casdagli, M. (1991). Embedology. J. Stat. Phys. 65, general-purpose data analysis tool. Phys. Lett. A 373, 3753–3756. doi:
579–616. doi: 10.1007/BF01053745 10.1016/j.physleta.2009.08.052
Schinkel, S., Marwan, N., and Kurths, J. (2009). Brain signal analysis based on Webber, C. L. Jr., and Zbilut, J. P. (2005). “Recurrence quantification analysis of
recurrences. J. Physiol. Paris 103, 315–323. doi: 10.1016/j.jphysparis.2009.05.007 nonlinear dynamical systems,” in Tutorials in Contemporary Nonlinear Methods
Schreiber, T., and Schmitz, A. (1996). Improved surrogate data for nonlinearity for the Behavioral Sciences, eds M. A. Riley and G. C. Van Orden (Alexandria,
tests. Phys. Rev. Lett. 77, 635–638. doi: 10.1103/PhysRevLett.77.635 VA: NSF), 142–177.
Shockley, K. (2005). “Cross recurrence quantification of interpersonal postural Zbilut, J. P., Giuliani, A., and Webber, C. L. (1998). Detecting deterministic signals
activity,” in Tutorials in Contemporary Nonlinear Methods for the Behavioral in exceptionally noisy environments using cross-recurrence quantification.
Sciences, eds M. A. Riley and G. C. Van Orden (Alexandria, VA: NSF), Phys. Lett. A 246, 122–128. doi: 10.1016/S0375-9601(98)00457-5
142–177. Zbilut, J. P., Thomasson, N., and Webber, C. L. Jr. (2002). Recurrence
Shockley, K., Baker, A. A., Richardson, M. J., and Fowler, C. A. (2007). Articulatory quantification analysis as a tool for nonlinear exploration of nonstationary
constraints on interpersonal postural coordination. J. Exp. Psychol. Hum. cardiac signals. Medial Eng. Phys. 24, 53–60. doi: 10.1016/S1350-4533(01)
Percept. Perform. 33, 201–208. doi: 10.1037/0096-1523.33.1.201 00112-6
Shockley, K., Santana, M. V., and Fowler, C. A. (2003). Mutual interpersonal
postural constraints are involved in cooperative conversation. J. Exp. Psychol. Conflict of Interest Statement: The authors declare that the research was
Hum. Percept. Perform. 29, 326–332. doi: 10.1037/0096-1523.29.2.326 conducted in the absence of any commercial or financial relationships that could
Stephen, D. G., Boncoddo, R. A., Magnuson, J. S., and Dixon, J. A. (2009a). The be construed as a potential conflict of interest.
dynamics of insight: mathematical discovery as a phase transition. Mem. Cognit.
37, 1132–1149. doi: 10.3758/MC.37.8.1132 Copyright © 2018 Wallot and Leonardi. This is an open-access article distributed
Stephen, D. G., Dixon, J. A., and Isenhower, R. W. (2009b). Dynamics of under the terms of the Creative Commons Attribution License (CC BY). The use,
representational change: entropy, action, and cognition. J. Exp. Psychol. Hum. distribution or reproduction in other forums is permitted, provided the original
Percept. Perform. 35, 1811–1832. doi: 10.1037/a0014510 author(s) and the copyright owner(s) are credited and that the original publication
Takens, F. (1981). Detecting strange attractors in turbulence. Lecture Notes Math. in this journal is cited, in accordance with accepted academic practice. No use,
898, 366–381. doi: 10.1007/BFb0091924 distribution or reproduction is permitted which does not comply with these terms.

Frontiers in Psychology | www.frontiersin.org 21 December 2018 | Volume 9 | Article 2232

You might also like