Description Usage Arguments Value Author(s) References Examples

View source: R/basicNonLinearFunctions.R

This function builds the Takens' vectors from a given time series. The set
of Takens' vectors is the result of embedding the time series in a m-dimensional
space. That is, the *n^{th}* Takens' vector is defined as

*T[n]=\{time.series[n], time.series[n+ timeLag],...time.series[n+m*timeLag]\}.*

Taken's theorem states that we can then reconstruct an equivalent dynamical system to the original one (the dynamical system that generated the observed time series) by using the Takens' vectors.

1 | ```
buildTakens(time.series, embedding.dim, time.lag)
``` |

`time.series` |
The original time series. |

`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. |

A matrix containing the Takens' vectors (one per row). The resulting matrix also contains information about the time lag and the embedding dimension used (as attributes).

Constantino A. Garcia and Gunther Sawitzki.

H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)

1 2 3 4 5 6 7 8 9 | ```
## Not run:
# Build the Takens vector for the Henon map using the x-coordinate time series
h = henon(n.sample= 3000,n.transient= 100, a = 1.4, b = 0.3,
start = c(0.73954883, 0.04772637), do.plot = FALSE)
takens = buildTakens(h$x,embedding.dim=2,time.lag=1)
# using the x-coordinate time series we are able to reconstruct
# the state space of the Henon map
plot(takens)
## End(Not run)
``` |

```
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-20. 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
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.