从图中可以看出此时间序列具有非常明显的周期性趋势。
3.2.2 Adf检验
> adf.test(tempdub) Augmented Dickey-Fuller Test
data: tempdub
Dickey-Fuller = -11.0773, Lag order = 5, p-value = 0.01 alternative hypothesis: stationary
结论:p-value = 0.01所以tempdub时间序列是平稳的。
3.2.3 Pp检验
> pp.test(tempdub) Phillips-Perron Unit Root Test
data: tempdub
Dickey-Fuller Z(alpha) = -51.0795, Truncation lag parameter = 4, p-value = 0.01
alternative hypothesis: stationary
警告信息:
In pp.test(tempdub) : p-value smaller than printed p-value 结论:p-value = 0.01再次验证该时间序列的平稳性。
3.2.4 ACF自相关函数判断
> modeltemp=lm(tempdub~time(tempdub)) > summary(modeltemp)
Call:
lm(formula = tempdub ~ time(tempdub))
Residuals:
Min 1Q Median 3Q Max -37.871 -19.066 2.394 17.053 28.156
Coefficients:
Estimate Std. Error t value Pr(>|t|) (Intercept) -214.1324 920.7668 -0.233 0.816 time(tempdub) 0.1322 0.4674 0.283 0.778
Residual standard error: 19.43 on 142 degrees of freedom Multiple R-squared: 0.0005629, Adjusted R-squared: -0.006475
F-statistic: 0.07998 on 1 and 142 DF, p-value: 0.7777
> acf(rstudent(modeltemp),main='关于tempdub的acf自相关系数')
从图中可以看出ACF也具有明显的周期性。