UR_test | R Documentation |
This function implements the test proposed in Chang, Cheng and Yao (2022) for the following hypothesis testing problem:
H_0:Y_t \sim I(0)\ \ \mathrm{versus}\ \ H_1:Y_t \sim
I(d)\ \mathrm{for\ some\ integer\ }d \geq 1\,,
where Y_t
is
a univariate time series.
UR_test(Y, lagk.vec = NULL, con_vec = NULL, alpha = 0.05)
Y |
A vector |
lagk.vec |
The time lag |
con_vec |
The constant |
alpha |
The significance level of the test. The default is 0.05. |
An object of class "urtest"
, which contains the following
components:
statistic |
A |
reject |
An |
lag.vec |
The time lags used in function. |
Chang, J., Cheng, G., & Yao, Q. (2022). Testing for unit roots based on sample autocovariances. Biometrika, 109, 543–550. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.1093/biomet/asab034")}.
# Example 1
## Generate yt
N <- 100
Y <-arima.sim(list(ar = c(0.9)), n = 2*N, sd = sqrt(1))
con_vec <- c(0.45, 0.55, 0.65)
lagk.vec <- c(0, 1, 2)
UR_test(Y, lagk.vec = lagk.vec, con_vec = con_vec, alpha = 0.05)
UR_test(Y, alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.