estimateEmbeddingDim: Estimate the embedding dimension

Description Usage Arguments Details Note Author(s) References Examples

View source: R/getMinimumEmbeddingDimension.R

Description

This function determines the minimum embedding dimension from a scalar time series using the algorithm proposed by L. Cao (see references).

Usage

1
2
3
4
5
estimateEmbeddingDim(time.series, number.points = length(time.series),
  time.lag = 1, max.embedding.dim = 15, threshold = 0.95,
  max.relative.change = 0.1, do.plot = TRUE,
  main = "Computing the embedding dimension", xlab = "dimension (d)",
  ylab = "E1(d) & E2(d)", ylim = NULL, xlim = NULL)

Arguments

time.series

The original time series.

number.points

Number of points from the time series that will be used to estimate the embedding dimension. By default, all the points in the time series are used.

time.lag

Time lag used to build the Takens' vectors needed to estimate the embedding dimension (see buildTakens). Default: 1.

max.embedding.dim

Maximum possible embedding dimension for the time series. Default: 15.

threshold

Numerical value between 0 and 1. The embedding dimension is estimated using the E1(d) function. E1(d) stops changing when d is greater than or equal to embedding dimension, staying close to 1. This value establishes a threshold for considering that E1(d) is close to 1. Default: 0.95

max.relative.change

Maximum relative change in E1(d) with respect to E1(d-1) in order to consider that the E1 function has been stabilized and it will stop changing. Default: 0.01.

do.plot

Logical value. If TRUE (default value), a plot of E1(d) and E2(d) is shown.

main

Title for the plot.

xlab

Title for the x axis.

ylab

Title for the y axis.

ylim

numeric vectors of length 2, giving the y coordinates range.

xlim

numeric vectors of length 2, giving the x coordinates range.

Details

The Cao's algorithm uses 2 functions in order to estimate the embedding dimension from a time series: the E1(d) and the E2(d) functions, where d denotes the dimension.

E1(d) stops changing when d is greater than or equal to the embedding dimension, staying close to 1. On the other hand, E2(d) is used to distinguish deterministic signals from stochastic signals. For deterministic signals, there exist some d such that E2(d)!=1. For stochastic signals, E2(d) is approximately 1 for all the values.

This function uses the Arya and Mount's C++ ANN library for nearest neighbour search (For more information on the ANN library please visit http://www.cs.umd.edu/~mount/ANN/). The R wrapper is a modified version of the RANN package code by Samuel E. Kemp and Gregory Jefferis.

Note

In the current version of the package, the automatic detection of stochastic signals has not been implemented yet.

Author(s)

Constantino A. Garcia

References

Cao, L. Practical method for determining the minimum embedding dimension of a scalar time series. Physica D: Nonlinear Phenomena, 110,1, pp. 43-50 (1997).

Arya S. and Mount D. M. (1993), Approximate nearest neighbor searching, Proc. 4th Ann. ACM-SIAM Symposium on Discrete Algorithms (SODA'93), 271-280.

Arya S., Mount D. M., Netanyahu N. S., Silverman R. and Wu A. Y (1998), An optimal algorithm for approximate nearest neighbor searching, Journal of the ACM, 45, 891-923.

Examples

1
2
3
4
5
6
## Not run: 
h = henon(do.plot=FALSE)
dimension = estimateEmbeddingDim(h$x, time.lag=1, max.embedding.dim=6,
             threshold=0.9, do.plot=TRUE)
             
## 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 May 29, 2017, 8:53 p.m.