cointRegIM: Integrated Modified OLS

Description Usage Arguments Details Value References See Also Examples

View source: R/cointReg-IM-OLS.R

Description

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

Usage

1
2
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

See Also

Other cointReg: cointRegD, cointRegFM, cointReg, plot.cointReg, print.cointReg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 documentation built on May 2, 2019, 3:45 a.m.