# rqa: Recurrence Quantification Analysis (RQA) In nonlinearTseries: Nonlinear Time Series Analysis

## Description

The Recurrence Quantification Analysis (RQA) is an advanced technique for the nonlinear analysis that allows to quantify the number and duration of the recurrences in the phase space.

## Usage

 ```1 2 3``` ```rqa(takens = NULL, time.series = NULL, embedding.dim = 2, time.lag = 1, radius, lmin = 2, vmin = 2, distanceToBorder = 2, save.RM = TRUE, do.plot = FALSE, ...) ```

## Arguments

 `takens` Instead of specifying the time.series, the embedding.dim and the time.lag, the user may specify directly the Takens' vectors. `time.series` The original time series from which the phase-space reconstruction is performed. `embedding.dim` Integer denoting the dimension in which we shall embed the time.series. `time.lag` Integer denoting the number of time steps that will be use to construct the Takens' vectors. `radius` Maximum distance between two phase-space points to be considered a recurrence. `lmin` Minimal length of a diagonal line to be considered in the RQA. Default lmin = 2. `vmin` Minimal length of a vertical line to be considered in the RQA. Default vmin = 2. `distanceToBorder` In order to avoid border effects, the distanceToBorder points near the border of the recurrence matrix are ignored when computing the RQA parameters. Default, distanceToBorder = 2. `save.RM` Logical value. If TRUE, the recurrence matrix is stored as a sparse matrix. Note that computing the recurrences in matrix form can be computationally expensive. `do.plot` Logical. If TRUE, the recurrence plot is shown. However, plotting the recurrence matrix is computationally expensive. Use with caution. `...` Additional plotting parameters.

## Value

A rqa object that consist of a list with the most important RQA parameters:

• recurrence.matrix: A sparse symmetric matrix containing the recurrences of the phase space.

• REC: Recurrence. Percentage of recurrence points in a Recurrence Plot.

• DET: Determinism. Percentage of recurrence points that form diagonal lines.

• LAM: Percentage of recurrent points that form vertical lines.

• RATIO: Ratio between DET and RR.

• Lmax: Length of the longest diagonal line.

• Lmean: Mean length of the diagonal lines. The main diagonal is not taken into account.

• DIV: Inverse of Lmax.

• Vmax: Longest vertical line.

• Vmean: Average length of the vertical lines. This parameter is also referred to as the Trapping time.

• ENTR: Shannon entropy of the diagonal line lengths distribution

• TREND: Trend of the number of recurrent points depending on the distance to the main diagonal

• diagonalHistogram: Histogram of the length of the diagonals.

• recurrenceRate: Number of recurrent points depending on the distance to the main diagonal.

## Author(s)

Constantino A. Garcia and Gunther Sawitzki

## References

Zbilut, J. P. and C. L. Webber. Recurrence quantification analysis. Wiley Encyclopedia of Biomedical Engineering (2006).

## Examples

 ```1 2 3 4 5 6 7``` ```## Not run: rossler.ts = rossler(time=seq(0, 10, by = 0.01),do.plot=FALSE)\$x rqa.analysis=rqa(time.series = rossler.ts, embedding.dim=2, time.lag=1, radius=1.2,lmin=2,do.plot=FALSE,distanceToBorder=2) plot(rqa.analysis) ## End(Not run) ```

### Example output

```Loading required package: Matrix
Loading required package: rgl
Loading required package: tseries
Loading required package: TSA
Loading required package: leaps
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-17. For overview type 'help("mgcv-package")'.

Attaching package: 'TSA'

The following objects are masked from 'package:stats':

acf, arima

The following object is masked from 'package:utils':

tar

Loading required package: Rcpp

Attaching package: 'nonlinearTseries'

The following object is masked from 'package:grDevices':

contourLines

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
```

nonlinearTseries documentation built on Sept. 23, 2018, 9:03 a.m.