[R] Dickey Fuller Test
Cuckovic Paik
cuckovic.paik at gmail.com
Fri Oct 29 05:47:38 CEST 2010
Dear Users, please help with the following DF test:
=====
library(tseries)
library(timeSeries)
Y=c(3519,3803,4332,4251,4661,4811,4448,4451,4343,4067,4001,3934,3652,3768
,4082,4101,4628,4898,4476,4728,4458,4004,4095,4056,3641,3966,4417,4367
,4821,5190,4638,4904,4528,4383,4339,4327,3856,4072,4563,4561,4984,5316
,4843,5383,4889,4681,4466,4463,4217,4322,4779,4988,5383,5591,5322,5404
,5106,4871,4977,4706,4193,4460,4956,5022,5408,5565,5360,5490,5286,5257
,5002,4897,4577,4764,5052,5251,5558,5931,5476,5603,5425,5177,4792,4776
,4450,4659,5043,5233,5423,5814,5339,5474,5278,5184,4975,4751,4600,4718
,5218,5336,5665,5900,5330,5626,5512,5293,5143,4842,4627,4981,5321,5290
,6002,5811,5671,6102,5482,5429,5356,5167,4608,4889,5352,5441,5970,5750
,5670,5860,5449,5401,5240,5229,4770,5006,5518,5576,6160,6121,5900,5994
,5841,5832,5505,5573,5331,5355,6057,6055,6771,6669,6375,6666,6383,6118
,5927,5750,5122,5398,5817,6163,6763,6835,6678,6821,6421,6338,6265,6291
,5540,5822,6318,6268,7270,7096,6505,7039,6440,6446,6717,6320)
YY=as.timeSeries(Y)
adf.test(Y)
adf.test(YY)
======== Output ====
> adf.test(Y)
Augmented Dickey-Fuller Test
data: Y
Dickey-Fuller = -6.1661, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
Warning message:
In adf.test(Y) : p-value smaller than printed p-value
> adf.test(YY)
Augmented Dickey-Fuller Test
data: YY
Dickey-Fuller = 12.4944, Lag order = 5, p-value = 0.99
alternative hypothesis: stationary
Warning message:
In adf.test(YY) : p-value greater than printed p-value
>
==========================================
Question: Why the two results are different?
The help file says that the input series is either a numeric vector or a
time series object. But the results are completely opposite if the different
types of arguments are used. Thanks in advance.
--
View this message in context: http://r.789695.n4.nabble.com/Dickey-Fuller-Test-tp3018408p3018408.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list