makeLeadLagMatrix {cointReg}R Documentation

Leads-and-Lags Matrix

Description

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

Usage

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

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

[Package cointReg version 0.2.0 Index]