Skip to contents

Reorganizes a single observed time series into an embedded matrix. The embedded matrix is constructed with replicates of an individual time series that are offset from each other in time. The function requires two parameters, one that specifies the number of observations to be used (i.e., the number of embedded dimensions) and the other that specifies the number of observations to offset successive embeddings

Usage

Embed(x, E, tau)

Arguments

x

Numeric vector. An observed time series to be reorganized into a time-delayed embedded matrix.

E

Numeric (length = 1). Number of embedded dimensions or the number of observations to be used. E = 5, for example, will generate a matrix with five columns corresponding to five consecutive observations across each row of the embedded matrix

tau

Numeric (length = 1). Number of observations to offset successive embeddings. A tau of one uses adjacent observations. Default is tau = 1

Value

Returns a numeric matrix

References

Deboeck, P. R., Montpetit, M. A., Bergeman, C. S., & Boker, S. M. (2009) Using derivative estimates to describe intraindividual variability at multiple time scales. Psychological Methods, 14, 367-386.

Author

Pascal Deboeck <pascal.deboeck at psych.utah.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>

Examples

# A time series with 8 time points
time_series <- 49:56

# Time series embedding
Embed(time_series, E = 5, tau = 1)
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]   49   50   51   52   53
#> [2,]   50   51   52   53   54
#> [3,]   51   52   53   54   55
#> [4,]   52   53   54   55   56