create_lags: Lags creation

View source: R/create_lags.R

create_lagsR Documentation

Lags creation

Description

Creates a lag matrix of order p. Can include or exclude original series, and trim the NAs in the start of the sample.

Usage

create_lags(y, p = 1, include.original = TRUE, trim = TRUE)

Arguments

y

vector or matrix to lag

p

lag length

include.original

logical, if TRUE the original series are left inside the output matrix.

trim

logical, if TRUE the initial NAs due to the lag gets trimmed

Value

the lagged vector or matrix


Marga8/HDGCvar documentation built on May 25, 2024, 11:12 a.m.