lshift: Take lag transformation of a series

View source: R/dynamac.R

lshiftR Documentation

Take lag transformation of a series

Description

Take lag transformation of a series

Usage

lshift(x, l)

Arguments

x

a series to be lagged

l

the number of lags

Details

lshift assumes that the series are ordered, that there is no missing data, and that the time intervals are even

Value

the lagged series

Author(s)

Soren Jordan and Andrew Q. Philips

Examples

x.var <- runif(50)
l.1.x.var <- lshift(x.var, 1)
l.2.x.var <- lshift(x.var, 2)
head(x.var)
head(l.1.x.var)
head(l.2.x.var)

dynamac documentation built on Nov. 18, 2022, 1:07 a.m.