Helper function for eLag.

Description

Generates shifted columns.

Usage

1
lagshift(x, i, lagMax, pad)

Arguments

x

Input vector

i

Shift (integer)

lagMax

Maximum lag that will be needed

pad

Scalar used for padding.

Value

vector padded front and back with padding appropriate for generating lag.

Examples

1
lagshift(1:3,0,1,NA)