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

getModD

Get D OLS model.


Description

Generates an lm model for the Dynamic OLS estimator.

Usage

getModD(x, y, deter, n.lag, n.lead, check = FALSE)

Arguments

x

[matrix]
RHS variables of the D OLS estimation.

y

[matrix]
LHS variable(s) of the D OLS estimation.

deter

[matrix]
Matrix of deterministic variables to include in the D OLS model.

n.lag, n.lead

[numeric(1)]
Number of lags and leads, have to be non-negative integer values.

check

[logical]
Wheather to check (and if necessary convert) the arguments. See checkVars for further information.

Value

[lm]. An lm object, containing an additional list element (aux) with D-OLS specific objects:

Z [matrix]

jointed matrix of deterministics and x

x.delta [matrix]

differences of x

dx.all [matrix]

leads-and-lags matrix

all.trunc [matrix]

truncated version of jointed matrix of Z and dx.all

y.trunc [matrix]

truncated version of y

See Also

Examples

set.seed(1909)
y <- matrix(cumsum(rnorm(100)), ncol = 1)
x <- matrix(rep(y, 4) + rnorm(400, mean = 3, sd = 2), ncol = 4)
deter <- cbind(1, 1:100)
cointReg:::getModD(x = x, y = y, deter = deter, 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.