我正在使用航空里程数据集,我进行了三次不同的测试以检查时间序列数据集中的静止
测试1:使用acf和pacf
acf(airmiles)
pacf(airmiles)
在区分之后,似乎大多数值现在位于显着性水平
acf(diff(airmiles))
pacf(diff(airmiles))
测试2:使用adf.test
adf.test(airmiles,k=0,alternative = "stationary")
Augmented Dickey-Fuller Test
data: airmiles
Dickey-Fuller = -1.1415, Lag order = 0, p-value = 0.8994
alternative hypothesis: stationary
p值似乎大于0.05,因此我进行区分,然后进行相同的测试
adf.test(diff(airmiles),k=0,alternative = "stationary")
Augmented Dickey-Fuller Test
data: diff(airmiles)
Dickey-Fuller = -5.4406, Lag order = 0, p-value = 0.01
alternative hypothesis: stationary
所以现在值较小,但是在kpss.test
的情况下kpss.test(diff(airmiles)) KPSS Test for Level Stationarity
data: diff(airmiles) KPSS Level = 0.83442, Truncation lag parameter = 1, p-value = 0.01
p值已经小于0.05,我担心我应该在哪些测试中实际使用,哪一个最终会导致更好的模型。