Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

make_block

Make a time delay offset block


Description

make_block generates a time offset block with the appropriate max_lag and tau. The first column is presumed to be a time or index vector, and is not included in the embedding.

Usage

make_block(block, columns = NULL, t = NULL, max_lag = 3, tau = -1, lib =
NULL, restrict_to_lib = TRUE)

Arguments

block

a data.frame or matrix where each column is a time series

columns

list of column names to time delay.

t

Not used

max_lag

the total number of lags to include for each variable. So if max_lag == 3, a variable X is offset with lags X[t], X[t + tau], X[t + 2*tau]

tau

the time delay offset for embedding

lib

not used

restrict_to_lib

not used

Value

A data.frame with time offset columns. If the original block had columns X, Y and max_lag = 3, then the returned data.frame will have columns X(t-0) X(t-1) X(t-2) Y(t-0) Y(t-1) Y(t-2).

Examples

data("block_3sp")
make_block(block_3sp[, c(1, 2, 5)])

rEDM

Empirical Dynamic Modeling ('EDM')

v1.10.0
BSD_2_clause + file LICENSE
Authors
Joseph Park [aut, cre] (<https://orcid.org/0000-0001-5411-1409>), Cameron Smith [aut] (<https://orcid.org/0000-0003-0020-5607>), George Sugihara [aut, ccp] (<https://orcid.org/0000-0002-2863-6946>), Ethan Deyle [aut] (<https://orcid.org/0000-0001-8704-8434>), Erik Saberski [ctb] (<https://orcid.org/0000-0002-6475-6187>), Hao Ye [ctb] (<https://orcid.org/0000-0002-8630-1458>), The Regents of the University of California [cph]
Initial release
2021-12-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.