Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeLeadLagMatrix

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)

cointReg

Parameter Estimation and Inference in a Cointegrating Regression

v0.2.0
GPL-3
Authors
Philipp Aschersleben [aut, cre], Martin Wagner [aut] (Author of underlying MATLAB code.)
Initial release
2016-06-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.