Description Usage Arguments Details Value References Examples

View source: R/cointBootTest.R

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).

1 2 3 4 |

`y` |
a T x K matrix containing the time series. |

`r` |
either |

`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 |

`dummies` |
(optional) dummy variables. Must have the same number of rows as |

`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. |

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

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 |

`beta` |
a matrix with the estimated beta parameters for the model with |

`gamma` |
a list of matrices with the estimated gamma parameters. Each parameter matrix corresponds to the model estimated under the null hypothesis in |

`rho` |
a matrix with the estimated rho parameters for the model with |

`phi` |
a list of matrices with the estimated phi parameters. Each parameter matrix corresponds to the model estimated under the null hypothesis in |

`dummy_coefs` |
a list of matrices with the estimated dummy parameters. Each parameter matrix corresponds to the model estimated under the null hypothesis in |

`residuals` |
a list of residual matrices, one for each model estimated under the null hypothesis in |

`Q` |
a vector with the Q test statistics. If |

`B.Q` |
a matrix of the iid bootstrap Q statistics. Each column represent the null hypothesis in the order of |

`WB.Q` |
a matrix of the wild bootstrap Q statistics. Each column represent the null hypothesis in the order of |

`B.r` |
the selected cointegration rank from the iid bootstrap test, if |

`WB.r` |
the selected cointegration rank from the wild bootstrap test, if |

`B.pv` |
a vector with the bootstrap P.values, in the order of |

`WB.pv` |
a vector with the wild bootstrap P.values, in the order of |

`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). |

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.

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.