cointRegD {cointReg} | R Documentation |

## Dynamic OLS

### Description

Computes the Saikkonen (1990) Dynamic OLS estimator.

### Usage

```
cointRegD(x, y, deter, kernel = c("ba", "pa", "qs", "tr"),
bandwidth = c("and", "nw"), n.lead = NULL, n.lag = NULL,
kmax = c("k4", "k12"), info.crit = c("AIC", "BIC"), demeaning = FALSE,
check = TRUE, ...)
```

### Arguments

`x` |
[ |

`y` |
[ |

`deter` |
[ |

`kernel` |
[ |

`bandwidth` |
[ |

`n.lead` , `n.lag` |
[ |

`kmax` |
[ |

`info.crit` |
[ |

`demeaning` |
[ |

`check` |
[ |

`...` |
Arguments passed to |

### Details

The equation for which the FM-OLS estimator is calculated:

`y = \delta \cdot D + \beta \cdot x + u`

with `D`

as the deterministics matrix.
Then `\theta = (\delta', \beta')'`

is the full parameter vector.

Information about the D-OLS specific arguments:

`n.lag`

,`n.lead`

A positive number to set the number of lags and leads. If at least one of them is equal to

`NULL`

(default), the function`getLeadLag`

will be used to calculate them automatically (see Choi and Kurozumi (2012) for details). In that case, the following two arguments are needed.`kmax`

Maximal value for lags and leads, when they are calculated automatically. If "k4", then the maximum is equal to

`floor(4 * (x.T/100)^(1/4))`

, else it's`floor(12 * (x.T/100)^(1/4))`

with`x.T`

is equal to the data's length. One of`"k4"`

or`"k12"`

. Default is`"k4"`

.`info.crit`

Information criterion to use for the automatical calculation of lags and leads. One of

`"AIC"`

or`"BIC"`

. Default is`"AIC"`

.

### Value

[`cointReg`

]. List with components:

`beta`

[`numeric`

]-
coefficients of the regressors

`delta`

[`numeric`

]-
coefficients of the deterministics

`theta`

[`numeric`

]-
combined coefficients of

`beta`

and`delta`

`sd.theta`

[`numeric`

]-
standard errors for

`theta`

`t.theta`

[`numeric`

]-
t-values for

`theta`

`p.theta`

[`numeric`

]-
p-values for

`theta`

`theta.all`

[`numeric`

]-
combined coefficients of

`beta`

,`delta`

and the auxiliary leads-and-lags regressors `residuals`

[`numeric`

]-
D-OLS residuals (length depends on leads and lags)

`omega.u.v`

[`numeric`

]-
conditional long-run variance based on OLS residuals

`varmat`

[`matrix`

]-
variance-covariance matrix

`Omega`

[`list`

]-
the whole long-run variance matrix and parts of it

`bandwidth`

[`list`

]-
number and name of the calculated bandwidth

`kernel`

[`character`

]-
abbr. name of kernel type

`lead.lag`

[`list`

]-
leads-and-lags parameters

### References

Phillips, P.C.B. and M. Loretan (1991): "Estimating Long Run Economic Equilibria,"

*Review of Economic Studies*, 58, 407–436, DOI:10.2307/2298004.Saikkonen, P. (1991): "Asymptotically Efficient Estimation of Cointegrating Regressions,"

*Econometric Theory*, 7, 1–21, DOI:10.1017/S0266466600004217.Stock, J.H. and M.W. Watson (1993): "A Simple Estimator of Cointegrating Vectors in Higher Order Integrated Systems,"

*Econometrica*, 61, 783–820, DOI:10.2307/2951763.

### See Also

Other cointReg: `cointRegFM`

,
`cointRegIM`

, `cointReg`

,
`plot.cointReg`

, `print.cointReg`

Other D-OLS: `getLeadLag`

,
`getModD`

, `makeLeadLagMatrix`

### Examples

```
set.seed(1909)
x1 <- cumsum(rnorm(100, mean = 0.05, sd = 0.1))
x2 <- cumsum(rnorm(100, sd = 0.1)) + 1
x3 <- cumsum(rnorm(100, sd = 0.2)) + 2
x <- cbind(x1, x2, x3)
y <- x1 + x2 + x3 + rnorm(100, sd = 0.2) + 1
deter <- cbind(level = 1, trend = 1:100)
test <- cointRegD(x, y, deter, n.lead = 2, n.lag = 2,
kernel = "ba", bandwidth = "and")
print(test)
test2 <- cointRegD(x, y, deter, kmax = "k4", info.crit = "BIC",
kernel = "ba", bandwidth = "and")
print(test2)
```

*cointReg*version 0.2.0 Index]