makeLeadLagMatrix: Leads-and-Lags Matrix

Description Usage Arguments Value See Also Examples

View source: R/cointReg-D-OLS.R

Description

Generates leads-and-lags matrix for the Dynamic OLS estimator.

Usage

1
makeLeadLagMatrix(x, n.lag, n.lead)

Arguments

x

[matrix]
Matrix for which to generate the leads-and-lags matrix.

n.lag, n.lead

[numeric(1)]
Number of lags and leads, have to be non-negative integer values. If greater than nrow(x), produces 0-rows.

Value

[matrix]. Leads-and-lags matrix.

See Also

Other D-OLS: cointRegD, getLeadLag, getModD

Examples

1
2
x <- matrix(1:20, 2, byrow = TRUE)
cointReg:::makeLeadLagMatrix(x = x, n.lag = 2, n.lead = 3)

cointReg documentation built on May 2, 2019, 3:45 a.m.