Learn R Programming

rEDM (version 1.14.3)

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)

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).

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

Examples

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

Run the code above in your browser using DataLab