Learn R Programming

bivarhr (version 0.1.5)

make_lags: Create Lag Matrix

Description

Creates a matrix of lagged values for a numeric vector.

Usage

make_lags(x, k)

Value

A matrix with k columns containing lags 1 through k.

Arguments

x

Numeric vector.

k

Integer; maximum lag order.