Testing for unit roots based on sample autocovariances
Testing for unit roots based on sample autocovariances
This function implements the test proposed in Chang, Cheng and Yao (2022) for the following hypothesis testing problem: [REMOVE_ME]H0:Yt∼I(0)versusH1:Yt\simI(d)forsomeintegerd≥1,[REMOVEME2] where Yt is a univariate time series.
Y: A vector Y=(Y1,…,Yn)′, where n is the number of the observations.
lagk.vec: The time lag K0 used to calculate the test statistic [See Section 2.1 of Chang, Cheng and Yao (2022)]. It can be a vector specifying multiple time lags. If provided as a s×1 vector, the function will output the test results corresponding to each of the s values in lagk.vec. The default is c(0, 1, 2, 3, 4).
con_vec: The constant cκ specified in (5) of Chang, Cheng and Yao (2022). The default is 0.55. Alternatively, it can be an m×1 vector specified by users, representing m candidate values of cκ.
alpha: The significance level of the test. The default is 0.05.
Returns
An object of class "urtest", which contains the following components:
statistic: A s×1 vector with each element representing the test statistic value associated with each of the s time lags specified in lagk.vec.
reject: An m×s data matrix R=(Ri,j) where Ri,j represents whether the null hypothesis H0 should be rejected for cκ specified by the i-th component of con_vec, and K0 specified by the j-th component of lagk.vec. Ri,j=1 indicates rejection of the null hypothesis, while Ri,j=0 indicates non-rejection.
lag.vec: The time lags used in function.
Description
This function implements the test proposed in Chang, Cheng and Yao (2022) for the following hypothesis testing problem: