DChaos (version 0.1-7)

embedding: Provides the delayed-coordinate embedding vectors backwards

Description

This function generates both the uniform and non-uniform embedding vectors backwards using the method of delays from univariate time-series data.

Usage

embedding(x, m = 2, lag = 1, timelapse = c("FIXED", "VARIABLE"))

Value

The uniform or non-uniform delayed-coordinate embedding vectors backwards by columns from an univariate time-series data considering the parameter set selected by the user. If FIXED has been selected data must be a vector or a time-series object ts or xts. Otherwise VARIABLE has to be specified. In this case data must be a data.frame, a data.table or a matrix with two columns, the date and the univariate time series as a sequence of numerical values, in that order. The date can have the following three classes: POSIXt, Date or Factor. In the latter case the date should come in the following format YMD H:M:OS3 considering milliseconds e.g., 20190407 00:00:03.347. If you don't consider milliseconds you must put .000 after the seconds.

Arguments

x

a vector, a time-series object ts or xts, a data.frame, a data.table or a matrix depending on the method selected in timelapse.

m

a non-negative integer denoting the embedding dimension (Default 2).

lag

a non-negative integer denoting the reconstruction delay (Default 1).

timelapse

a character denoting if the time-series data are sampled at uniform time-frequency e.g., 1-month, 1-day, 1-hour, 30-min, 5-min, 1-min and so on FIXED or non-uniform time-frequency which are not equally spaced in time VARIABLE (Default FIXED).

Author

Julio E. Sandubete, Lorenzo Escot

References

Ruelle, D., Takens, F. 1971 On the nature of turbulence. Communications in Mathematical Physics 20(3):167-192.

Takens, F. 1981 Detecting strange attractors in turbulence. Springer Berlin Heidelberg.

Abarbanel, H.D. 1996 Analysis of observed chaotic data. Springer.

Cha, K.-S., Tong, H. 2001 Chaos: a statistical perspective. Springer-Verlag.

Kantz, H., Schreiber, T. 2004 Nonlinear time series analysis, volume 7. Cambridge university press.

Huke, J.P., Broomhead, D.S. 2007 Embedding theorems for non-uniformly sampled dynamical systems. Nonlinearity 20(9):205-244.

Examples

Run this code
## set.seed(34)
## Simulates time-series data from the Logistic map with chaos
## ts        <- DChaos::logistic.sim(n=1000, a=4)
## show(head(ts, 5))

## Provides the uniform delayed-coordinate embedding vectors (Backward)
## data      <- DChaos::embedding(ts, m=5, lag=2, timelapse="FIXED")
## show(head(data, 5))

## Simulates tick-by-tick data (bid price) for Starbucks company
## ts        <- highfrequency::sbux
## show(head(ts, 5))

## Provides the non-uniform delayed-coordinate embedding vectors (Backward)
## data      <- DChaos::embedding(ts, m=3, lag=4, timelapse="VARIABLE")
## show(head(data, 5))

Run the code above in your browser using DataLab