bayerhanck | R Documentation |
Produces a joint test-statistic for the null of non-cointegration, aggregating various cointegration tests.
bayerhanck(formula, data, lags = 1, trend = "const", test = "all")
formula |
An object of class |
data |
An optional data frame containing the variables in the model. |
lags |
Number of lags to be included. |
trend |
Type of deterministic component to be included. "none" for no deterministic, "const" for a constant and "trend" for a constant plus trend. |
test |
Selection of tests to choose from. Choices are either "ej", for |
bayerhanck
returns an object of classes "bhtest"
and "list"
.
The function summary
is used to print a summary, which includes the test statistics and p-values
for the underlying tests, as well as the test statistic and p-value for the Bayer Hanck Test.
An object of class "bhtest"
is a "list"
containing, inter alia, the components:
bh.test |
the test statistic of the Bayer Hanck Test. |
bh.pval |
the p-Value of the Bayer Hanck Test. |
test.stat |
the test statistics of the underlying tests. |
pval.stat |
the p-values of the underlying tests. |
Bayer, C. and Hanck, C. (2013). Combining non-cointegration tests. Journal of Time Series Analysis, 34(1), 83 – 95. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1467-9892.2012.00814.x")}
# Luetkepohl (2007): Economic data from West Germany
data(lutkepohl_e1)
bayerhanck(linvestment ~ lincome + lconsumption, data = lutkepohl_e1)
bayerhanck(linvestment ~ lincome + lconsumption, data = lutkepohl_e1, lags = 4)
# World Almanac and Book of Facts (1975): Monthly simple returns of the stocks of IBM,
# Coca Cola and S&P Composite index
try({
data("mts-examples", package = "MTS")
bayerhanck(sp ~ ibm + ko, data = ibmspko)
}, silent = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.