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

cointRegIM

Integrated Modified OLS


Description

Computes the Vogelsang and Wagner (2014) Integrated Modified OLS estimator.

Usage

cointRegIM(x, y, deter, selector = 1, t.test = TRUE, kernel = c("ba",
  "pa", "qs", "tr"), bandwidth = c("and", "nw"), check = TRUE, ...)

Arguments

x

[numeric | matrix | data.frame]
RHS variables on which to apply the IM-OLS estimation (see Details).

y

[numeric | matrix | data.frame]
LHS variable(s) on which to apply the IM-OLS estimation (see Details). Has to be one-dimensional. If matrix, it may have only one row or column, if data.frame just one column.

deter

[numeric | matrix | data.frame | NULL]
Deterministic variable to include in the equation (see Details). If it's NULL or missing, no deterministic variable is included in the model.

selector

[numeric]
Choose the regression type: 1, 2, or c(1, 2) (see Details). Default is 1.

t.test

[logical]
Wheather to calculate t-values for the coefficients of the first regression. Default is TRUE. Attention: Needs more calculation time, because an additional FM-OLS model has to be fitted to get the long-run variance.

kernel

[character(1)]
The kernel function to use for calculating the long-run variance. Default is Bartlett kernel ("ba"), see Details for alternatives.

bandwidth

[character(1) | integer(1)]
The bandwidth to use for calculating the long-run variance. Default is Andrews (1991) ("and"), an alternative is Newey West (1994) ("nw").

check

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

...

Arguments passed to getBandwidthNW.

Details

The equation for which the IM-OLS estimator is calculated (type 1):

S[y] = δ * S[D] + β * S[x] + γ * x + u

where S[y], S[x] and S[D] are the cumulated sums of y, x and D (with D as the deterministics matrix). Then θ = (δ', β', γ')' is the full parameter vector.

The equation for which the IM-OLS estimator is calculated (type 2):

S[y] = δ * S[D] + β * S[x] + γ * x + λ * Z + u

where S[y], S[x] and S[D] are the cumulated sums of y, x and D (with D as the deterministics matrix) and Z as defined in equation (19) in Vogelsang and Wagner (2015). Then θ = (δ', β', γ', λ')' is the full parameter vector.

Value

[cointReg]. List with components:

delta [numeric]

coefficients of the deterministics (cumulative sum S_{deter})

beta [numeric]

coefficients of the regressors (cumulative sum S_{x})

gamma [numeric]

coefficients of the regressors (original regressors x)

theta [numeric]

combined coefficients of beta, delta

sd.theta [numeric]

standard errors for the theta coefficients

t.theta [numeric]

t-values for the theta coefficients

p.theta [numeric]

p-values for the theta coefficients

theta.all [numeric]

combined coefficients of beta, delta, gamma

residuals [numeric]

IM-OLS residuals. Attention: These are the first differences of S_u – the original residuals are stored in u.plus.

u.plus [numeric]

IM-OLS residuals, not differenced. See residuals above.

omega.u.v [numeric]

conditional long-run variance based on OLS residuals, via cointRegFM (in case of argument t.test is TRUE) or NULL

varmat [matrix]

variance-covariance matrix

Omega [matrix]

NULL (no long-run variance matrix for this regression type)

bandwidth [list]

number and name of bandwidth if t.test = TRUE

kernel [character]

abbr. name of kernel type if t.test = TRUE

delta2 [numeric]

coefficients of the deterministics (cumulative sum S_{deter}) for regression type 2

beta2 [numeric]

coefficients of the regressors (cumulative sum S_{x}) for regression type 2

gamma2 [numeric]

coefficients of the regressors (original regressors x) for regression type 2

lambda2 [numeric]

coefficients of the Z regressors for regression type 2

theta2 [numeric]

combined coefficients of beta2, delta2, gamma2 and lambda2 for regression type 2

u.plus2 [numeric]

IM-OLS residuals for regression type 2

References

  • Vogelsang, T.J. and M. Wagner (2014): "Integrated Modified OLS Estimation and Fixed-b Inference for Cointegrating Regressions," Journal of Econometrics, 148, 741–760, DOI:10.1016/j.jeconom.2013.10.015.

See Also

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 = cointRegIM(x, y, deter, selector = c(1, 2), t.test = TRUE,
                    kernel = "ba", bandwidth = "and")
print(test)

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.