ur.test | R Documentation |
The test proposed in Chang, Cheng and Yao (2021) for the following hypothesis testing problems:
H_0:Y_t \sim I(0)\ \ \mathrm{versus}\ \ H_1:Y_t \sim I(d)\ \mathrm{for\ some\ integer\ }d ≥q 2.
ur.test(Y, lagk.vec = lagk.vec, con_vec = con_vec, alpha = alpha)
Y |
Y = \{y_1, … , y_n \}, the observations of a univariate time series used for the test. |
lagk.vec |
Time lag K_0 used to calculate the test statistic, see
Section 2.1 in Chang, Cheng and Yao (2021). It can be a vector containing
more than one time lag. If it is a vector, the procedure will output all
the test results based on the different K_0 in the vector
|
con_vec |
Constant c_κ, see (5) in Chang, Cheng and Yao (2021). It also can be a vector. If missing, the default value we use 0.55. |
alpha |
The prescribed significance level. Default is 0.05. |
A dataframe containing the following components:
result |
|
Chang, J., Cheng, G. & Yao, Q. (2021). Testing for unit roots based on sample autocovariances. Available at https://arxiv.org/abs/2006.07551
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.