Create a state vector based on an embedding lag and a number of embedding dimanesions.

ts_embed(
  y,
  emDim,
  emLag,
  returnOnlyIndices = FALSE,
  doEmbed = TRUE,
  silent = TRUE
)

Arguments

y

Time series

emDim

Embedding dimension

emLag

Embedding lag

returnOnlyIndices

Return only the index of y for each surrogate dimension, not the values (default = FALSE)

doEmbed

Should the series be embedded? If FALSE adds attributes.

silent

Silent-ish mode

Value

The lag embedded time series

Note

If emLag = 0, the assumption is the columns in y represent the dimensions and y will be returned with attributes emLag = 0 and emDim = NCOL(y). If emLag > 0 and NCOL(y)>1 the first column of y will used for embedding and a warning will be triggered.

Author

Fred Hasselman