FCVARbootRank | R Documentation |
FCVARbootRank
generates a distribution of a likelihood ratio
test statistic for the rank test using a wild bootstrap,
following the method of Cavaliere, Rahbek, and Taylor (2010). It
takes the two ranks as inputs to estimate the model under the
null and the model under the alternative.
FCVARbootRank(x, k, opt, r1, r2, B)
x |
A matrix of variables to be included in the system.
If |
k |
The number of lags in the system. |
opt |
An S3 object of class |
r1 |
The cointegrating rank under the null hypothesis. |
r2 |
The cointegrating rank under the alternative hypothesis. |
B |
The number of bootstrap samples. |
A list FCVARbootRank_stats
containing the test results,
including the following parameters:
LRbs
A B x 1 vector of simulated likelihood ratio statistics.
pv
An approximate p-value for the LR statistic based on the bootstrap distribution.
H
A list containing LR test results. It is
identical to the output from HypoTest
, with one addition,
namely H$pvBS
which is the bootstrap p-value)
mBS
Model estimates under the null hypothesis.
mUNR
Model estimates under the alternative hypothesis.
Cavaliere, G., A. Rahbek, and A. M. R. Taylor (2010). "Testing for co-integration in vector autoregressions with non-stationary volatility," Journal of Econometrics 158, 7-24.
FCVARoptions
to set default estimation options.
HypoTest
for the format of a hypothesis test results.
FCVARestn
for the estimates from a rectricted and unrestricted model within a hypothesis test.
Other FCVAR specification functions:
FCVARlagSelect()
,
FCVARrankTests()
,
summary.FCVAR_lags()
,
summary.FCVAR_ranks()
opt <- FCVARoptions() opt$gridSearch <- 0 # Disable grid search in optimization. opt$dbMin <- c(0.01, 0.01) # Set lower bound for d,b. opt$dbMax <- c(2.00, 2.00) # Set upper bound for d,b. opt$constrained <- 0 # Impose restriction dbMax >= d >= b >= dbMin ? 1 <- yes, 0 <- no. opt$plotRoots <- 0 x <- votingJNP2014[, c("lib", "ir_can", "un_can")] set.seed(42) FCVARbootRank_stats <- FCVARbootRank(x, k = 2, opt, r1 = 0, r2 = 1, B = 2) # In practice, set the number of bootstraps so that (B+1)*alpha is an integer, # where alpha is the chosen level of significance. # For example, set B = 999 (but it takes a long time to compute).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.