tseries (version 0.1-2)

embed: Embedding a Time Series

Description

Embeds the time series x into the dimension dimensional Euclidean space. Each row of the resulting matrix consists of sequences x[t], x[t-1], ..., x[t-dimension+1], where t is the original index of x. If x is a matrix, i.e., x contains more than one variable, then x[t] consists of the tth observation on each variable. Missing values are not handled.

Usage

embed (x, dimension = 1)

Arguments

x
a numeric vector, matrix, or time series.
dimension
a scalar representing the embedding dimension.

Value

  • A matrix containing the embedded time series x.

Examples

Run this code
x <- 1:10
embed (x, 3)

Run the code above in your browser using DataCamp Workspace