全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
4181 1
2018-04-10
> aab1<-resid(aa1)
> retPadf<-adf.test(aab1)                        
> retPadf  

        Augmented Dickey-Fuller Test

data:  aab1
Dickey-Fuller = -2.9876, Lag order = 21, p-value = 0.16
alternative hypothesis: stationary

>
>
> ur<-ur.df(aab1,type="none")
> summary(ur)

###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################

Test regression none


Call:
lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)

Residuals:
       Min         1Q     Median         3Q        Max
-0.0091598 -0.0005151  0.0000096  0.0005293  0.0203194

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
z.lag.1    -0.0035302  0.0009687  -3.644  0.00027 ***
z.diff.lag -0.2824573  0.0096931 -29.140  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.0009542 on 9788 degrees of freedom
Multiple R-squared:  0.08209,   Adjusted R-squared:  0.0819
F-statistic: 437.7 on 2 and 9788 DF,  p-value: < 2.2e-16


Value of test-statistic is: -3.6442

Critical values for test statistics:
      1pct  5pct 10pct
tau1 -2.58 -1.95 -1.62



同样的单位根检验,一个做出来是不平稳的一个做出来是平稳的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2018-4-11 09:22:25
主要是 DF 的 critical values 不一样。 adf.test是基于 drift 的,ur.df 相反。 所以如果你写成
复制代码


我估计就一致了,具体的可以翻阅一下 R 时间序列的一些书,估计有所提及
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群