data(denmark)
## How to use cases under different models (regarding deterministic terms)
## Construct an ARDL(3,1,3,2) model with different deterministic terms -
# Without constant
ardl_3132_n <- ardl(LRM ~ LRY + IBO + IDE -1, data = denmark, order = c(3,1,3,2))
# With constant
ardl_3132_c <- ardl(LRM ~ LRY + IBO + IDE, data = denmark, order = c(3,1,3,2))
# With constant and trend
ardl_3132_ct <- ardl(LRM ~ LRY + IBO + IDE + trend(LRM), data = denmark, order = c(3,1,3,2))
## t-bounds test for no level relationship (no cointegration) ----------
# For the model without a constant
bounds_t_test(ardl_3132_n, case = 1)
# or
bounds_t_test(ardl_3132_n, case = "n")
# For the model with a constant
# Including the constant term in the short-run relationship (unrestricted constant)
bounds_t_test(ardl_3132_c, case = "uc")
# or
bounds_t_test(ardl_3132_c, case = 3)
# For the model with constant and trend
# Including the constant term and the trend in the short-run relationship
# (unrestricted constant and unrestricted trend)
bounds_t_test(ardl_3132_ct, case = "ucut")
# or
bounds_t_test(ardl_3132_ct, case = 5)
## Note that you can't use bounds t-test for cases 2 and 4, or use a wrong model
# For example, the following tests will produce an error:
if (FALSE) {
bounds_t_test(ardl_3132_n, case = 2)
bounds_t_test(ardl_3132_c, case = 4)
bounds_t_test(ardl_3132_ct, case = 3)
}
## Asymptotic p-value and critical value bounds (assuming T = 1000) ----
# Include critical value bounds for a certain level of significance
# t-statistic is larger than the I(1) bound (for a=0.05) as expected (p-value < 0.05)
btt <- bounds_t_test(ardl_3132_c, case = 3, alpha = 0.05)
btt
btt$tab
# Traditional but less precise critical value bounds, as presented in Pesaran et al. (2001)
btt$PSS2001parameters
# t-statistic doesn't exceed the I(1) bound (for a=0.005) as p-value is greater than 0.005
bounds_t_test(ardl_3132_c, case = 3, alpha = 0.005)
## Exact sample size p-value and critical value bounds -----------------
# Setting a seed is suggested to allow the replication of results
# 'R' can be increased for more accurate resutls
# t-statistic is smaller than the I(1) bound (for a=0.01) as expected (p-value > 0.01)
# Note that the exact sample p-value (0.009874) is very different than the asymptotic (0.005538)
# It can take more than 90 seconds
if (FALSE) {
set.seed(2020)
bounds_t_test(ardl_3132_c, case = 3, alpha = 0.01, exact = TRUE)
}
Run the code above in your browser using DataLab