cointBootTest: Bootstrap Determination of Cointegration Rank in VAR Models

Description Usage Arguments Details Value References Examples

View source: R/cointBootTest.R

Description

This function uses the bootstrap and wild bootstrap to test the cointegration rank of a VAR model. The test is an implementation of Cavaliere, Rahbek & Taylor (2012, 2014), and is used in Ahlgren & Catani (2018).

Usage

1
2
3
4
cointBootTest(y, r = "sequence", p, model = 1, signif = 0.05, dummies = NULL, B = 999,
boot_type = c("B", "WB"), WB_dist = c("rademacher", "normal", "mammen"))
## S3 method for class 'cointBootTest'
print(x, ...)

Arguments

y

a T x K matrix containing the time series.

r

either "sequence" or a vector of integers (0 <= r <= K - 1, where K is the number of columns in y). If a vector of integers, r is the cointegration rank being tested. If r = "sequence", the bootstrap sequential algorithm will be used (see 'details').

p

the lag order of the model.

model

either 1 (no deterministic terms), 2 (restricted constant), or 3 (restricted linear trend). See 'details' below.

signif

if r = "sequence" is used, signif sets the significance level of the tests in the sequential algorithm.

dummies

(optional) dummy variables. Must have the same number of rows as y. The models will then be estimated with the dummy variables, but the dummy variables are not used in the bootstrap DGP. In the boot_type = "B" version, the residuals used to draw the bootstrap errors do not include rows corresponding to observations where any of the dummies are equal to 1.

B

the number of bootstrap replications.

boot_type

either "B", "WB", or both. "B" uses the iid bootstrap algorithm, while "WB" uses the wild bootstrap algorithm.

WB_dist

The distribution used for the wild bootstrap. Either "rademacher", "normal", or "mammen".

x

Object with class attribute ‘cointBootTest’.

...

further arguments passed to or from other methods.

Details

Please see the pdf version of the manual at the package's CRAN page for mathematical details of the test.

Value

a list of class "cointBootTest".

eigen_val

the eigenvalues.

eigen_vec

the eigenvectors.

alpha

a matrix with the estimated alpha parameters for the model with r = K (for other values of r, the alpha parameters are the first r columns of this matrix).

beta

a matrix with the estimated beta parameters for the model with r = K (for other values of r, the beta parameters are the first r columns of this matrix).

gamma

a list of matrices with the estimated gamma parameters. Each parameter matrix corresponds to the model estimated under the null hypothesis in r (0:(K-1) if r = "sequence"), in the same order.

rho

a matrix with the estimated rho parameters for the model with r = K (for other values of r, the rho parameters are the first r columns of this matrix).

phi

a list of matrices with the estimated phi parameters. Each parameter matrix corresponds to the model estimated under the null hypothesis in r (0:(K-1) if r = "sequence"), in the same order.

dummy_coefs

a list of matrices with the estimated dummy parameters. Each parameter matrix corresponds to the model estimated under the null hypothesis in r (0:(K-1) if r = "sequence"), in the same order.

residuals

a list of residual matrices, one for each model estimated under the null hypothesis in r (0:(K-1) if r = "sequence"), in that order.

Q

a vector with the Q test statistics. If r = "sequence", then the first element is for the null hypothesis r = 0, and the last is for r = K - 1. Otherwise, the order corresponds to the r argument.

B.Q

a matrix of the iid bootstrap Q statistics. Each column represent the null hypothesis in the order of r (0:(K-1) if r = "sequence").

WB.Q

a matrix of the wild bootstrap Q statistics. Each column represent the null hypothesis in the order of r (0:(K-1) if r = "sequence").

B.r

the selected cointegration rank from the iid bootstrap test, if r = "sequence") were used.

WB.r

the selected cointegration rank from the wild bootstrap test, if r = "sequence") were used.

B.pv

a vector with the bootstrap P.values, in the order of r (0:(K-1) if r = "sequence").

WB.pv

a vector with the wild bootstrap P.values, in the order of r (0:(K-1) if r = "sequence").

B.errors

the number of times the bootstrap simulations had to be resimulated due to errors.

WB.errors

the number of times the wild bootstrap simulations had to be resimulated due to errors.

companion_eigen

a list of matrices with the eigenvalues of the companion matrix. The inverse of the eigenvalues are the roots in step 2 of the boostrap algorithm (see the .pdf version of this help file).

References

Ahlgren, N. & Catani, P. (2018). Practical Problems with Tests of Cointegration Rank with Strong Persistence and Heavy-Tailed Errors. In Corazza, M., Durábn, M., Grané, A., Perna, C., Sibillo, M. (eds) Mathematical and Statistical Methods for Actuarial Sciences and Finance, Cham, Springer.

Cavaliere, G., Rahbek, A., & Taylor, A. M. R. (2012). Bootstrap determination of the co-integration rank in vector autoregressive models, Econometrica, 80, 1721-1740.

Cavaliere, G., Rahbek, A., & Taylor, A. M. R. (2014). Bootstrap determination of the co-integration rank in heteroskedastic VAR models, Econometric Reviews, 33, 606-650.

Johansen, S. (1996). Likelihood-based inference in cointegrated vector autoregressive models, Oxford, Oxford University Press.

Examples

1
2
3
4
5
6
7
## Not run: 

test <- cointBootTest(y = VodafoneCDS, r = "sequence", p = 2, model = 3, signif = 0.05, 
  dummies = NULL, B = 999, boot_type = c("B", "WB"), WB_dist = "rademacher")
test

## End(Not run)

VARtests documentation built on May 2, 2019, 5:03 a.m.