| getModD {cointReg} | R Documentation |
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 |
[ |
y |
[ |
deter |
[ |
n.lag, n.lead |
[ |
check |
[ |
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
Zanddx.all y.trunc[matrix]-
truncated version of
y
See Also
Other D-OLS: cointRegD,
getLeadLag, makeLeadLagMatrix
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)
[Package cointReg version 0.2.0 Index]