[R] Dickey Fuller test of a time series (problem)
sarathsv
sarathsankarv at yahoo.com
Tue Feb 9 19:34:09 CET 2010
i also having the problem with R .
R version 2.10.0 (2009-10-26)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> z<-rnorm(289)
> z
[1] 2.330811003 1.504743043 1.768175890 0.629578885 -1.102466476
1.022360003 -0.683596222 0.825797728 1.970304092
[10] -0.434295690 -0.332111909 0.784754124 0.618029090 -0.323679397
0.477139243 0.567437753 -0.082967056 -0.631445108
[19] -0.599448056 -0.023043350 0.254275136 0.729704319 -0.557885077
0.136863688 0.336083722 -0.574337438 0.489163710
[28] -1.178968998 -0.500117153 0.194962840 1.077193868 -0.224323646
0.830018849 -0.923133317 0.984637207 -0.967962617
[37] -0.330364545 0.411477240 1.921856365 -0.402244385 0.287249079
-0.254981296 1.373816270 0.051474667 0.467294146
[46] -0.084979045 1.010413164 -1.685650845 -0.225540927 -0.068473164
0.076474205 -0.599026450 0.749528909 -0.005966977
[55] -0.751531710 -0.566290715 -0.653128084 1.252402084 -0.475794837
0.361830550 0.534634320 0.128657947 -0.998795343
[64] 0.439908085 -0.616926920 0.616190407 -0.503356528 -1.571513634
-0.862492045 -0.858421322 0.379999011 0.026994800
[73] -0.072956095 0.750615120 -0.111619011 0.073884163 -0.962739147
0.038873386 -0.343490682 0.752229210 0.965300992
[82] -1.604473652 1.516414656 -0.938925299 -0.709151677 0.231854623
-0.218100137 1.543797726 -0.898485417 -0.383154763
[91] 1.676661233 -0.050011605 -0.885938130 -0.759522611 0.825827497
0.307787209 -1.582181323 1.548739934 0.874375153
[100] -1.929437918 -1.257364398 -1.789263683 -2.143550087 -0.299557119
-0.034432098 0.523581523 1.282782038 -0.627147412
[109] 1.379406957 -1.943450866 -0.109843039 -0.186738958 1.940752202
-0.399888402 0.889084467 0.347721291 0.221675595
[118] 1.014829243 0.815928201 -1.289821785 1.086385072 -0.299486086
-0.126573107 0.527587325 -1.988292033 -0.661784968
[127] -0.739984305 0.043729158 0.780508168 -0.329149317 -0.239561967
0.479590885 0.483343301 -1.330296792 -1.347459911
[136] -0.588658836 -0.954908406 -0.215942979 -0.079013859 -0.386107147
1.030946757 1.352902085 1.621552841 0.951461132
[145] 0.107764563 -0.143231089 0.837469606 -0.687510567 1.376661975
0.837165093 0.063985577 1.381120151 -0.628153036
[154] -1.144266557 1.005945165 1.085202192 0.273625164 0.022451305
-0.372955252 0.283434935 -1.174292734 1.513095774
[163] -1.406613019 -0.954491994 0.275374664 -0.404428637 -0.791690077
-0.325169327 0.859515784 -1.605660446 -0.126481055
[172] -1.163844796 0.234669024 0.694055806 -0.503758028 0.747620192
-0.490237653 -0.673188493 0.597849322 0.508355060
[181] 0.220080232 1.254662349 -1.390019760 1.036511650 0.004499064
-0.171119971 0.341759420 0.883209195 0.196981832
[190] 1.966663083 -0.472635901 -0.143698739 0.134008071 0.123061173
-0.847030934 0.478631946 -0.640264555 1.198188793
[199] 0.928747360 -1.223396075 0.042572331 -1.193181087 -0.284040641
-0.511904510 -0.591542425 0.763156940 0.649463947
[208] -0.762889670 -0.628481227 0.367263423 -0.286380274 0.354460516
-0.138982551 -1.184283483 0.489375881 1.005739798
[217] 0.267274437 -0.118960041 -1.207006456 0.461973434 0.325420233
0.996123459 1.188010215 -2.000847324 1.043974965
[226] 0.356219212 0.620522833 3.800773985 -2.080091995 0.322824104
-1.793810727 0.492505555 -0.092310467 2.893818046
[235] -0.846021981 0.402650410 -0.426312400 1.162983880 2.076818805
-0.260109032 0.725039578 0.361726563 -0.116508468
[244] 0.820778041 1.664995327 0.361725669 0.577447944 -1.008407703
0.390553465 0.263064760 0.915409450 0.294579966
[253] 1.478028593 1.865177412 -1.050708541 -2.071520363 0.450842362
0.530261688 0.226103509 -0.875767768 0.255960500
[262] -0.675455904 -1.436531605 -0.715532812 0.498582850 0.463511831
0.568583368 0.337032963 -0.314896666 -0.738982923
[271] 1.740242504 1.089138147 -0.128574330 1.834612295 -0.657243928
0.701904808 1.550270461 -0.234375326 -0.420885683
[280] 1.845942481 -0.895760996 -0.593765244 0.586912606 -1.062899762
0.277845308 -0.834841694 -0.614720628 -0.343506642
[289] 0.442537573
> x <- data.frame(z)
> x
z
1 2.330811003
2 1.504743043
3 1.768175890
4 0.629578885
5 -1.102466476
6 1.022360003
7 -0.683596222
8 0.825797728
9 1.970304092
10 -0.434295690
11 -0.332111909
12 0.784754124
13 0.618029090
14 -0.323679397
15 0.477139243
16 0.567437753
17 -0.082967056
18 -0.631445108
19 -0.599448056
20 -0.023043350
21 0.254275136
22 0.729704319
23 -0.557885077
24 0.136863688
25 0.336083722
26 -0.574337438
27 0.489163710
28 -1.178968998
29 -0.500117153
30 0.194962840
31 1.077193868
32 -0.224323646
33 0.830018849
34 -0.923133317
35 0.984637207
36 -0.967962617
37 -0.330364545
38 0.411477240
39 1.921856365
40 -0.402244385
41 0.287249079
42 -0.254981296
43 1.373816270
44 0.051474667
45 0.467294146
46 -0.084979045
47 1.010413164
48 -1.685650845
49 -0.225540927
50 -0.068473164
51 0.076474205
52 -0.599026450
53 0.749528909
54 -0.005966977
55 -0.751531710
56 -0.566290715
57 -0.653128084
58 1.252402084
59 -0.475794837
60 0.361830550
61 0.534634320
62 0.128657947
63 -0.998795343
64 0.439908085
65 -0.616926920
66 0.616190407
67 -0.503356528
68 -1.571513634
69 -0.862492045
70 -0.858421322
71 0.379999011
72 0.026994800
73 -0.072956095
74 0.750615120
75 -0.111619011
76 0.073884163
77 -0.962739147
78 0.038873386
79 -0.343490682
80 0.752229210
81 0.965300992
82 -1.604473652
83 1.516414656
84 -0.938925299
85 -0.709151677
86 0.231854623
87 -0.218100137
88 1.543797726
89 -0.898485417
90 -0.383154763
91 1.676661233
92 -0.050011605
93 -0.885938130
94 -0.759522611
95 0.825827497
96 0.307787209
97 -1.582181323
98 1.548739934
99 0.874375153
100 -1.929437918
101 -1.257364398
102 -1.789263683
103 -2.143550087
104 -0.299557119
105 -0.034432098
106 0.523581523
107 1.282782038
108 -0.627147412
109 1.379406957
110 -1.943450866
111 -0.109843039
112 -0.186738958
113 1.940752202
114 -0.399888402
115 0.889084467
116 0.347721291
117 0.221675595
118 1.014829243
119 0.815928201
120 -1.289821785
121 1.086385072
122 -0.299486086
123 -0.126573107
124 0.527587325
125 -1.988292033
126 -0.661784968
127 -0.739984305
128 0.043729158
129 0.780508168
130 -0.329149317
131 -0.239561967
132 0.479590885
133 0.483343301
134 -1.330296792
135 -1.347459911
136 -0.588658836
137 -0.954908406
138 -0.215942979
139 -0.079013859
140 -0.386107147
141 1.030946757
142 1.352902085
143 1.621552841
144 0.951461132
145 0.107764563
146 -0.143231089
147 0.837469606
148 -0.687510567
149 1.376661975
150 0.837165093
151 0.063985577
152 1.381120151
153 -0.628153036
154 -1.144266557
155 1.005945165
156 1.085202192
157 0.273625164
158 0.022451305
159 -0.372955252
160 0.283434935
161 -1.174292734
162 1.513095774
163 -1.406613019
164 -0.954491994
165 0.275374664
166 -0.404428637
167 -0.791690077
168 -0.325169327
169 0.859515784
170 -1.605660446
171 -0.126481055
172 -1.163844796
173 0.234669024
174 0.694055806
175 -0.503758028
176 0.747620192
177 -0.490237653
178 -0.673188493
179 0.597849322
180 0.508355060
181 0.220080232
182 1.254662349
183 -1.390019760
184 1.036511650
185 0.004499064
186 -0.171119971
187 0.341759420
188 0.883209195
189 0.196981832
190 1.966663083
191 -0.472635901
192 -0.143698739
193 0.134008071
194 0.123061173
195 -0.847030934
196 0.478631946
197 -0.640264555
198 1.198188793
199 0.928747360
200 -1.223396075
201 0.042572331
202 -1.193181087
203 -0.284040641
204 -0.511904510
205 -0.591542425
206 0.763156940
207 0.649463947
208 -0.762889670
209 -0.628481227
210 0.367263423
211 -0.286380274
212 0.354460516
213 -0.138982551
214 -1.184283483
215 0.489375881
216 1.005739798
217 0.267274437
218 -0.118960041
219 -1.207006456
220 0.461973434
221 0.325420233
222 0.996123459
223 1.188010215
224 -2.000847324
225 1.043974965
226 0.356219212
227 0.620522833
228 3.800773985
229 -2.080091995
230 0.322824104
231 -1.793810727
232 0.492505555
233 -0.092310467
234 2.893818046
235 -0.846021981
236 0.402650410
237 -0.426312400
238 1.162983880
239 2.076818805
240 -0.260109032
241 0.725039578
242 0.361726563
243 -0.116508468
244 0.820778041
245 1.664995327
246 0.361725669
247 0.577447944
248 -1.008407703
249 0.390553465
250 0.263064760
251 0.915409450
252 0.294579966
253 1.478028593
254 1.865177412
255 -1.050708541
256 -2.071520363
257 0.450842362
258 0.530261688
259 0.226103509
260 -0.875767768
261 0.255960500
262 -0.675455904
263 -1.436531605
264 -0.715532812
265 0.498582850
266 0.463511831
267 0.568583368
268 0.337032963
269 -0.314896666
270 -0.738982923
271 1.740242504
272 1.089138147
273 -0.128574330
274 1.834612295
275 -0.657243928
276 0.701904808
277 1.550270461
278 -0.234375326
279 -0.420885683
280 1.845942481
281 -0.895760996
282 -0.593765244
283 0.586912606
284 -1.062899762
285 0.277845308
286 -0.834841694
287 -0.614720628
288 -0.343506642
289 0.442537573
> adf<-adf.test(x,k=1)
Error: could not find function "adf.test"
> y <- c(x)
> y
$z
[1] 2.330811003 1.504743043 1.768175890 0.629578885 -1.102466476
1.022360003 -0.683596222 0.825797728 1.970304092
[10] -0.434295690 -0.332111909 0.784754124 0.618029090 -0.323679397
0.477139243 0.567437753 -0.082967056 -0.631445108
[19] -0.599448056 -0.023043350 0.254275136 0.729704319 -0.557885077
0.136863688 0.336083722 -0.574337438 0.489163710
[28] -1.178968998 -0.500117153 0.194962840 1.077193868 -0.224323646
0.830018849 -0.923133317 0.984637207 -0.967962617
[37] -0.330364545 0.411477240 1.921856365 -0.402244385 0.287249079
-0.254981296 1.373816270 0.051474667 0.467294146
[46] -0.084979045 1.010413164 -1.685650845 -0.225540927 -0.068473164
0.076474205 -0.599026450 0.749528909 -0.005966977
[55] -0.751531710 -0.566290715 -0.653128084 1.252402084 -0.475794837
0.361830550 0.534634320 0.128657947 -0.998795343
[64] 0.439908085 -0.616926920 0.616190407 -0.503356528 -1.571513634
-0.862492045 -0.858421322 0.379999011 0.026994800
[73] -0.072956095 0.750615120 -0.111619011 0.073884163 -0.962739147
0.038873386 -0.343490682 0.752229210 0.965300992
[82] -1.604473652 1.516414656 -0.938925299 -0.709151677 0.231854623
-0.218100137 1.543797726 -0.898485417 -0.383154763
[91] 1.676661233 -0.050011605 -0.885938130 -0.759522611 0.825827497
0.307787209 -1.582181323 1.548739934 0.874375153
[100] -1.929437918 -1.257364398 -1.789263683 -2.143550087 -0.299557119
-0.034432098 0.523581523 1.282782038 -0.627147412
[109] 1.379406957 -1.943450866 -0.109843039 -0.186738958 1.940752202
-0.399888402 0.889084467 0.347721291 0.221675595
[118] 1.014829243 0.815928201 -1.289821785 1.086385072 -0.299486086
-0.126573107 0.527587325 -1.988292033 -0.661784968
[127] -0.739984305 0.043729158 0.780508168 -0.329149317 -0.239561967
0.479590885 0.483343301 -1.330296792 -1.347459911
[136] -0.588658836 -0.954908406 -0.215942979 -0.079013859 -0.386107147
1.030946757 1.352902085 1.621552841 0.951461132
[145] 0.107764563 -0.143231089 0.837469606 -0.687510567 1.376661975
0.837165093 0.063985577 1.381120151 -0.628153036
[154] -1.144266557 1.005945165 1.085202192 0.273625164 0.022451305
-0.372955252 0.283434935 -1.174292734 1.513095774
[163] -1.406613019 -0.954491994 0.275374664 -0.404428637 -0.791690077
-0.325169327 0.859515784 -1.605660446 -0.126481055
[172] -1.163844796 0.234669024 0.694055806 -0.503758028 0.747620192
-0.490237653 -0.673188493 0.597849322 0.508355060
[181] 0.220080232 1.254662349 -1.390019760 1.036511650 0.004499064
-0.171119971 0.341759420 0.883209195 0.196981832
[190] 1.966663083 -0.472635901 -0.143698739 0.134008071 0.123061173
-0.847030934 0.478631946 -0.640264555 1.198188793
[199] 0.928747360 -1.223396075 0.042572331 -1.193181087 -0.284040641
-0.511904510 -0.591542425 0.763156940 0.649463947
[208] -0.762889670 -0.628481227 0.367263423 -0.286380274 0.354460516
-0.138982551 -1.184283483 0.489375881 1.005739798
[217] 0.267274437 -0.118960041 -1.207006456 0.461973434 0.325420233
0.996123459 1.188010215 -2.000847324 1.043974965
[226] 0.356219212 0.620522833 3.800773985 -2.080091995 0.322824104
-1.793810727 0.492505555 -0.092310467 2.893818046
[235] -0.846021981 0.402650410 -0.426312400 1.162983880 2.076818805
-0.260109032 0.725039578 0.361726563 -0.116508468
[244] 0.820778041 1.664995327 0.361725669 0.577447944 -1.008407703
0.390553465 0.263064760 0.915409450 0.294579966
[253] 1.478028593 1.865177412 -1.050708541 -2.071520363 0.450842362
0.530261688 0.226103509 -0.875767768 0.255960500
[262] -0.675455904 -1.436531605 -0.715532812 0.498582850 0.463511831
0.568583368 0.337032963 -0.314896666 -0.738982923
[271] 1.740242504 1.089138147 -0.128574330 1.834612295 -0.657243928
0.701904808 1.550270461 -0.234375326 -0.420885683
[280] 1.845942481 -0.895760996 -0.593765244 0.586912606 -1.062899762
0.277845308 -0.834841694 -0.614720628 -0.343506642
[289] 0.442537573
> is.numeric(y)
[1] FALSE
> adf<-adf.test(y,k=1)
Error: could not find function "adf.test"
> k <- 1
> y <- x[,1]
> adf<-adf.test(y,k=1)
Error: could not find function "adf.test"
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: timeDate
Warning messages:
1: package 'timeSeries' was built under R version 2.10.1
2: package 'timeDate' was built under R version 2.10.1
> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---
Error in install.packages(NULL, .libPaths()[1L], dependencies = NA, type =
type) :
no packages were specified
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> utils:::menuInstallPkgs()
Error in install.packages(NULL, .libPaths()[1L], dependencies = NA, type =
type) :
no packages were specified
>
what i have to do
--
View this message in context: http://n4.nabble.com/Dickey-Fuller-test-of-a-time-series-problem-tp886976p1474835.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list