R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)
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.
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.
> x <- array(list(210907
+ ,56
+ ,120982
+ ,56
+ ,176508
+ ,54
+ ,179321
+ ,89
+ ,123185
+ ,40
+ ,52746
+ ,25
+ ,385534
+ ,92
+ ,33170
+ ,18
+ ,101645
+ ,63
+ ,149061
+ ,44
+ ,165446
+ ,33
+ ,237213
+ ,84
+ ,173326
+ ,88
+ ,133131
+ ,55
+ ,258873
+ ,60
+ ,180083
+ ,66
+ ,324799
+ ,154
+ ,230964
+ ,53
+ ,236785
+ ,119
+ ,135473
+ ,41
+ ,202925
+ ,61
+ ,215147
+ ,58
+ ,344297
+ ,75
+ ,153935
+ ,33
+ ,132943
+ ,40
+ ,174724
+ ,92
+ ,174415
+ ,100
+ ,225548
+ ,112
+ ,223632
+ ,73
+ ,124817
+ ,40
+ ,221698
+ ,45
+ ,210767
+ ,60
+ ,170266
+ ,62
+ ,260561
+ ,75
+ ,84853
+ ,31
+ ,294424
+ ,77
+ ,101011
+ ,34
+ ,215641
+ ,46
+ ,325107
+ ,99
+ ,7176
+ ,17
+ ,167542
+ ,66
+ ,106408
+ ,30
+ ,96560
+ ,76
+ ,265769
+ ,146
+ ,269651
+ ,67
+ ,149112
+ ,56
+ ,175824
+ ,107
+ ,152871
+ ,58
+ ,111665
+ ,34
+ ,116408
+ ,61
+ ,362301
+ ,119
+ ,78800
+ ,42
+ ,183167
+ ,66
+ ,277965
+ ,89
+ ,150629
+ ,44
+ ,168809
+ ,66
+ ,24188
+ ,24
+ ,329267
+ ,259
+ ,65029
+ ,17
+ ,101097
+ ,64
+ ,218946
+ ,41
+ ,244052
+ ,68
+ ,341570
+ ,168
+ ,103597
+ ,43
+ ,233328
+ ,132
+ ,256462
+ ,105
+ ,206161
+ ,71
+ ,311473
+ ,112
+ ,235800
+ ,94
+ ,177939
+ ,82
+ ,207176
+ ,70
+ ,196553
+ ,57
+ ,174184
+ ,53
+ ,143246
+ ,103
+ ,187559
+ ,121
+ ,187681
+ ,62
+ ,119016
+ ,52
+ ,182192
+ ,52
+ ,73566
+ ,32
+ ,194979
+ ,62
+ ,167488
+ ,45
+ ,143756
+ ,46
+ ,275541
+ ,63
+ ,243199
+ ,75
+ ,182999
+ ,88
+ ,135649
+ ,46
+ ,152299
+ ,53
+ ,120221
+ ,37
+ ,346485
+ ,90
+ ,145790
+ ,63
+ ,193339
+ ,78
+ ,80953
+ ,25
+ ,122774
+ ,45
+ ,130585
+ ,46
+ ,112611
+ ,41
+ ,286468
+ ,144
+ ,241066
+ ,82
+ ,148446
+ ,91
+ ,204713
+ ,71
+ ,182079
+ ,63
+ ,140344
+ ,53
+ ,220516
+ ,62
+ ,243060
+ ,63
+ ,162765
+ ,32
+ ,182613
+ ,39
+ ,232138
+ ,62
+ ,265318
+ ,117
+ ,85574
+ ,34
+ ,310839
+ ,92
+ ,225060
+ ,93
+ ,232317
+ ,54
+ ,144966
+ ,144
+ ,43287
+ ,14
+ ,155754
+ ,61
+ ,164709
+ ,109
+ ,201940
+ ,38
+ ,235454
+ ,73
+ ,220801
+ ,75
+ ,99466
+ ,50
+ ,92661
+ ,61
+ ,133328
+ ,55
+ ,61361
+ ,77
+ ,125930
+ ,75
+ ,100750
+ ,72
+ ,224549
+ ,50
+ ,82316
+ ,32
+ ,102010
+ ,53
+ ,101523
+ ,42
+ ,243511
+ ,71
+ ,22938
+ ,10
+ ,41566
+ ,35
+ ,152474
+ ,65
+ ,61857
+ ,25
+ ,99923
+ ,66
+ ,132487
+ ,41
+ ,317394
+ ,86
+ ,21054
+ ,16
+ ,209641
+ ,42
+ ,22648
+ ,19
+ ,31414
+ ,19
+ ,46698
+ ,45
+ ,131698
+ ,65
+ ,91735
+ ,35
+ ,244749
+ ,95
+ ,184510
+ ,49
+ ,79863
+ ,37
+ ,128423
+ ,64
+ ,97839
+ ,38
+ ,38214
+ ,34
+ ,151101
+ ,32
+ ,272458
+ ,65
+ ,172494
+ ,52
+ ,108043
+ ,62
+ ,328107
+ ,65
+ ,250579
+ ,83
+ ,351067
+ ,95
+ ,158015
+ ,29
+ ,98866
+ ,18
+ ,85439
+ ,33
+ ,229242
+ ,247
+ ,351619
+ ,139
+ ,84207
+ ,29
+ ,120445
+ ,118
+ ,324598
+ ,110
+ ,131069
+ ,67
+ ,204271
+ ,42
+ ,165543
+ ,65
+ ,141722
+ ,94
+ ,116048
+ ,64
+ ,250047
+ ,81
+ ,299775
+ ,95
+ ,195838
+ ,67
+ ,173260
+ ,63
+ ,254488
+ ,83
+ ,104389
+ ,45
+ ,136084
+ ,30
+ ,199476
+ ,70
+ ,92499
+ ,32
+ ,224330
+ ,83
+ ,135781
+ ,31
+ ,74408
+ ,67
+ ,81240
+ ,66
+ ,14688
+ ,10
+ ,181633
+ ,70
+ ,271856
+ ,103
+ ,7199
+ ,5
+ ,46660
+ ,20
+ ,17547
+ ,5
+ ,133368
+ ,36
+ ,95227
+ ,34
+ ,152601
+ ,48
+ ,98146
+ ,40
+ ,79619
+ ,43
+ ,59194
+ ,31
+ ,139942
+ ,42
+ ,118612
+ ,46
+ ,72880
+ ,33
+ ,65475
+ ,18
+ ,99643
+ ,55
+ ,71965
+ ,35
+ ,77272
+ ,59
+ ,49289
+ ,19
+ ,135131
+ ,66
+ ,108446
+ ,60
+ ,89746
+ ,36
+ ,44296
+ ,25
+ ,77648
+ ,47
+ ,181528
+ ,54
+ ,134019
+ ,53
+ ,124064
+ ,40
+ ,92630
+ ,40
+ ,121848
+ ,39
+ ,52915
+ ,14
+ ,81872
+ ,45
+ ,58981
+ ,36
+ ,53515
+ ,28
+ ,60812
+ ,44
+ ,56375
+ ,30
+ ,65490
+ ,22
+ ,80949
+ ,17
+ ,76302
+ ,31
+ ,104011
+ ,55
+ ,98104
+ ,54
+ ,67989
+ ,21
+ ,30989
+ ,14
+ ,135458
+ ,81
+ ,73504
+ ,35
+ ,63123
+ ,43
+ ,61254
+ ,46
+ ,74914
+ ,30
+ ,31774
+ ,23
+ ,81437
+ ,38
+ ,87186
+ ,54
+ ,50090
+ ,20
+ ,65745
+ ,53
+ ,56653
+ ,45
+ ,158399
+ ,39
+ ,46455
+ ,20
+ ,73624
+ ,24
+ ,38395
+ ,31
+ ,91899
+ ,35
+ ,139526
+ ,151
+ ,52164
+ ,52
+ ,51567
+ ,30
+ ,70551
+ ,31
+ ,84856
+ ,29
+ ,102538
+ ,57
+ ,86678
+ ,40
+ ,85709
+ ,44
+ ,34662
+ ,25
+ ,150580
+ ,77
+ ,99611
+ ,35
+ ,19349
+ ,11
+ ,99373
+ ,63
+ ,86230
+ ,44
+ ,30837
+ ,19
+ ,31706
+ ,13
+ ,89806
+ ,42
+ ,62088
+ ,38
+ ,40151
+ ,29
+ ,27634
+ ,20
+ ,76990
+ ,27
+ ,37460
+ ,20
+ ,54157
+ ,19
+ ,49862
+ ,37
+ ,84337
+ ,26
+ ,64175
+ ,42
+ ,59382
+ ,49
+ ,119308
+ ,30
+ ,76702
+ ,49
+ ,103425
+ ,67
+ ,70344
+ ,28
+ ,43410
+ ,19
+ ,104838
+ ,49
+ ,62215
+ ,27
+ ,69304
+ ,30
+ ,53117
+ ,22
+ ,19764
+ ,12
+ ,86680
+ ,31
+ ,84105
+ ,20
+ ,77945
+ ,20
+ ,89113
+ ,39
+ ,91005
+ ,29
+ ,40248
+ ,16
+ ,64187
+ ,27
+ ,50857
+ ,21
+ ,56613
+ ,19
+ ,62792
+ ,35
+ ,72535
+ ,14)
+ ,dim=c(2
+ ,289)
+ ,dimnames=list(c('time_in_rfc'
+ ,'logins')
+ ,1:289))
> y <- array(NA,dim=c(2,289),dimnames=list(c('time_in_rfc','logins'),1:289))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '2'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '2'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
logins time_in_rfc
1 56 210907
2 56 120982
3 54 176508
4 89 179321
5 40 123185
6 25 52746
7 92 385534
8 18 33170
9 63 101645
10 44 149061
11 33 165446
12 84 237213
13 88 173326
14 55 133131
15 60 258873
16 66 180083
17 154 324799
18 53 230964
19 119 236785
20 41 135473
21 61 202925
22 58 215147
23 75 344297
24 33 153935
25 40 132943
26 92 174724
27 100 174415
28 112 225548
29 73 223632
30 40 124817
31 45 221698
32 60 210767
33 62 170266
34 75 260561
35 31 84853
36 77 294424
37 34 101011
38 46 215641
39 99 325107
40 17 7176
41 66 167542
42 30 106408
43 76 96560
44 146 265769
45 67 269651
46 56 149112
47 107 175824
48 58 152871
49 34 111665
50 61 116408
51 119 362301
52 42 78800
53 66 183167
54 89 277965
55 44 150629
56 66 168809
57 24 24188
58 259 329267
59 17 65029
60 64 101097
61 41 218946
62 68 244052
63 168 341570
64 43 103597
65 132 233328
66 105 256462
67 71 206161
68 112 311473
69 94 235800
70 82 177939
71 70 207176
72 57 196553
73 53 174184
74 103 143246
75 121 187559
76 62 187681
77 52 119016
78 52 182192
79 32 73566
80 62 194979
81 45 167488
82 46 143756
83 63 275541
84 75 243199
85 88 182999
86 46 135649
87 53 152299
88 37 120221
89 90 346485
90 63 145790
91 78 193339
92 25 80953
93 45 122774
94 46 130585
95 41 112611
96 144 286468
97 82 241066
98 91 148446
99 71 204713
100 63 182079
101 53 140344
102 62 220516
103 63 243060
104 32 162765
105 39 182613
106 62 232138
107 117 265318
108 34 85574
109 92 310839
110 93 225060
111 54 232317
112 144 144966
113 14 43287
114 61 155754
115 109 164709
116 38 201940
117 73 235454
118 75 220801
119 50 99466
120 61 92661
121 55 133328
122 77 61361
123 75 125930
124 72 100750
125 50 224549
126 32 82316
127 53 102010
128 42 101523
129 71 243511
130 10 22938
131 35 41566
132 65 152474
133 25 61857
134 66 99923
135 41 132487
136 86 317394
137 16 21054
138 42 209641
139 19 22648
140 19 31414
141 45 46698
142 65 131698
143 35 91735
144 95 244749
145 49 184510
146 37 79863
147 64 128423
148 38 97839
149 34 38214
150 32 151101
151 65 272458
152 52 172494
153 62 108043
154 65 328107
155 83 250579
156 95 351067
157 29 158015
158 18 98866
159 33 85439
160 247 229242
161 139 351619
162 29 84207
163 118 120445
164 110 324598
165 67 131069
166 42 204271
167 65 165543
168 94 141722
169 64 116048
170 81 250047
171 95 299775
172 67 195838
173 63 173260
174 83 254488
175 45 104389
176 30 136084
177 70 199476
178 32 92499
179 83 224330
180 31 135781
181 67 74408
182 66 81240
183 10 14688
184 70 181633
185 103 271856
186 5 7199
187 20 46660
188 5 17547
189 36 133368
190 34 95227
191 48 152601
192 40 98146
193 43 79619
194 31 59194
195 42 139942
196 46 118612
197 33 72880
198 18 65475
199 55 99643
200 35 71965
201 59 77272
202 19 49289
203 66 135131
204 60 108446
205 36 89746
206 25 44296
207 47 77648
208 54 181528
209 53 134019
210 40 124064
211 40 92630
212 39 121848
213 14 52915
214 45 81872
215 36 58981
216 28 53515
217 44 60812
218 30 56375
219 22 65490
220 17 80949
221 31 76302
222 55 104011
223 54 98104
224 21 67989
225 14 30989
226 81 135458
227 35 73504
228 43 63123
229 46 61254
230 30 74914
231 23 31774
232 38 81437
233 54 87186
234 20 50090
235 53 65745
236 45 56653
237 39 158399
238 20 46455
239 24 73624
240 31 38395
241 35 91899
242 151 139526
243 52 52164
244 30 51567
245 31 70551
246 29 84856
247 57 102538
248 40 86678
249 44 85709
250 25 34662
251 77 150580
252 35 99611
253 11 19349
254 63 99373
255 44 86230
256 19 30837
257 13 31706
258 42 89806
259 38 62088
260 29 40151
261 20 27634
262 27 76990
263 20 37460
264 19 54157
265 37 49862
266 26 84337
267 42 64175
268 49 59382
269 30 119308
270 49 76702
271 67 103425
272 28 70344
273 19 43410
274 49 104838
275 27 62215
276 30 69304
277 22 53117
278 12 19764
279 31 86680
280 20 84105
281 20 77945
282 39 89113
283 29 91005
284 16 40248
285 27 64187
286 21 50857
287 19 56613
288 35 62792
289 14 72535
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) time_in_rfc
1.420e+01 2.945e-04
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-45.834 -12.006 -4.405 8.542 165.282
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.420e+01 2.724e+00 5.214 3.54e-07 ***
time_in_rfc 2.945e-04 1.695e-05 17.374 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 23.69 on 287 degrees of freedom
Multiple R-squared: 0.5126, Adjusted R-squared: 0.5109
F-statistic: 301.8 on 1 and 287 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.40812238 8.162448e-01 5.918776e-01
[2,] 0.26419624 5.283925e-01 7.358038e-01
[3,] 0.18640279 3.728056e-01 8.135972e-01
[4,] 0.12912541 2.582508e-01 8.708746e-01
[5,] 0.13086918 2.617384e-01 8.691308e-01
[6,] 0.08722054 1.744411e-01 9.127795e-01
[7,] 0.10083788 2.016758e-01 8.991621e-01
[8,] 0.08212684 1.642537e-01 9.178732e-01
[9,] 0.13537367 2.707473e-01 8.646263e-01
[10,] 0.09131097 1.826219e-01 9.086890e-01
[11,] 0.07929269 1.585854e-01 9.207073e-01
[12,] 0.05337655 1.067531e-01 9.466234e-01
[13,] 0.36467484 7.293497e-01 6.353252e-01
[14,] 0.37220873 7.444175e-01 6.277913e-01
[15,] 0.50602364 9.879527e-01 4.939764e-01
[16,] 0.45134295 9.026859e-01 5.486570e-01
[17,] 0.39481200 7.896240e-01 6.051880e-01
[18,] 0.35904250 7.180850e-01 6.409575e-01
[19,] 0.40835750 8.167150e-01 5.916425e-01
[20,] 0.40431946 8.086389e-01 5.956805e-01
[21,] 0.35382258 7.076452e-01 6.461774e-01
[22,] 0.40418207 8.083641e-01 5.958179e-01
[23,] 0.50305688 9.938862e-01 4.969431e-01
[24,] 0.57750311 8.449938e-01 4.224969e-01
[25,] 0.52124003 9.575199e-01 4.787600e-01
[26,] 0.47488219 9.497644e-01 5.251178e-01
[27,] 0.50898396 9.820321e-01 4.910160e-01
[28,] 0.46701859 9.340372e-01 5.329814e-01
[29,] 0.41297994 8.259599e-01 5.870201e-01
[30,] 0.36917566 7.383513e-01 6.308243e-01
[31,] 0.32525161 6.505032e-01 6.747484e-01
[32,] 0.29941714 5.988343e-01 7.005829e-01
[33,] 0.26150944 5.230189e-01 7.384906e-01
[34,] 0.27208311 5.441662e-01 7.279169e-01
[35,] 0.23305430 4.661086e-01 7.669457e-01
[36,] 0.19591277 3.918255e-01 8.040872e-01
[37,] 0.16591235 3.318247e-01 8.340876e-01
[38,] 0.14650491 2.930098e-01 8.534951e-01
[39,] 0.18868264 3.773653e-01 8.113174e-01
[40,] 0.43329155 8.665831e-01 5.667084e-01
[41,] 0.42315435 8.463087e-01 5.768456e-01
[42,] 0.37766644 7.553329e-01 6.223336e-01
[43,] 0.49084315 9.816863e-01 5.091569e-01
[44,] 0.44505842 8.901168e-01 5.549416e-01
[45,] 0.41332020 8.266404e-01 5.866798e-01
[46,] 0.38280857 7.656171e-01 6.171914e-01
[47,] 0.34580266 6.916053e-01 6.541973e-01
[48,] 0.30632749 6.126550e-01 6.936725e-01
[49,] 0.26840474 5.368095e-01 7.315953e-01
[50,] 0.23404947 4.680989e-01 7.659505e-01
[51,] 0.21182945 4.236589e-01 7.881705e-01
[52,] 0.18243250 3.648650e-01 8.175675e-01
[53,] 0.15499639 3.099928e-01 8.450036e-01
[54,] 0.99780412 4.391753e-03 2.195877e-03
[55,] 0.99728923 5.421543e-03 2.710772e-03
[56,] 0.99704661 5.906789e-03 2.953395e-03
[57,] 0.99795498 4.090036e-03 2.045018e-03
[58,] 0.99761057 4.778859e-03 2.389430e-03
[59,] 0.99913960 1.720800e-03 8.604000e-04
[60,] 0.99880858 2.382838e-03 1.191419e-03
[61,] 0.99951196 9.760729e-04 4.880365e-04
[62,] 0.99938505 1.229898e-03 6.149489e-04
[63,] 0.99915281 1.694386e-03 8.471929e-04
[64,] 0.99884908 2.301848e-03 1.150924e-03
[65,] 0.99849957 3.000866e-03 1.500433e-03
[66,] 0.99819155 3.616900e-03 1.808450e-03
[67,] 0.99760244 4.795117e-03 2.397559e-03
[68,] 0.99712349 5.753027e-03 2.876513e-03
[69,] 0.99642722 7.145569e-03 3.572785e-03
[70,] 0.99833360 3.332809e-03 1.666405e-03
[71,] 0.99939727 1.205469e-03 6.027345e-04
[72,] 0.99919687 1.606270e-03 8.031350e-04
[73,] 0.99890985 2.180309e-03 1.090154e-03
[74,] 0.99869952 2.600952e-03 1.300476e-03
[75,] 0.99825638 3.487244e-03 1.743622e-03
[76,] 0.99777808 4.443848e-03 2.221924e-03
[77,] 0.99747631 5.047374e-03 2.523687e-03
[78,] 0.99681341 6.373188e-03 3.186594e-03
[79,] 0.99747758 5.044837e-03 2.522419e-03
[80,] 0.99686341 6.273187e-03 3.136594e-03
[81,] 0.99657061 6.858784e-03 3.429392e-03
[82,] 0.99563069 8.738612e-03 4.369306e-03
[83,] 0.99440989 1.118023e-02 5.590114e-03
[84,] 0.99320257 1.359486e-02 6.797428e-03
[85,] 0.99365604 1.268791e-02 6.343957e-03
[86,] 0.99201818 1.596363e-02 7.981817e-03
[87,] 0.99005667 1.988665e-02 9.943326e-03
[88,] 0.98812670 2.374660e-02 1.187330e-02
[89,] 0.98521714 2.956572e-02 1.478286e-02
[90,] 0.98181237 3.637526e-02 1.818763e-02
[91,] 0.97773047 4.453905e-02 2.226953e-02
[92,] 0.98683780 2.632439e-02 1.316220e-02
[93,] 0.98365925 3.268149e-02 1.634075e-02
[94,] 0.98674748 2.650505e-02 1.325252e-02
[95,] 0.98355135 3.289730e-02 1.644865e-02
[96,] 0.97977766 4.044468e-02 2.022234e-02
[97,] 0.97515582 4.968835e-02 2.484418e-02
[98,] 0.97251288 5.497424e-02 2.748712e-02
[99,] 0.97192988 5.614024e-02 2.807012e-02
[100,] 0.97454894 5.090211e-02 2.545106e-02
[101,] 0.97647838 4.704324e-02 2.352162e-02
[102,] 0.97512067 4.975867e-02 2.487933e-02
[103,] 0.97526920 4.946159e-02 2.473080e-02
[104,] 0.97004343 5.991313e-02 2.995657e-02
[105,] 0.96612277 6.775446e-02 3.387723e-02
[106,] 0.96121077 7.757846e-02 3.878923e-02
[107,] 0.96403423 7.193154e-02 3.596577e-02
[108,] 0.99783333 4.333336e-03 2.166668e-03
[109,] 0.99736142 5.277161e-03 2.638581e-03
[110,] 0.99658414 6.831726e-03 3.415863e-03
[111,] 0.99838532 3.229354e-03 1.614677e-03
[112,] 0.99883162 2.336768e-03 1.168384e-03
[113,] 0.99853284 2.934311e-03 1.467156e-03
[114,] 0.99808701 3.825984e-03 1.912992e-03
[115,] 0.99756208 4.875841e-03 2.437921e-03
[116,] 0.99736524 5.269527e-03 2.634764e-03
[117,] 0.99659637 6.807254e-03 3.403627e-03
[118,] 0.99826067 3.478652e-03 1.739326e-03
[119,] 0.99826181 3.476379e-03 1.738190e-03
[120,] 0.99843909 3.121819e-03 1.560909e-03
[121,] 0.99867472 2.650561e-03 1.325281e-03
[122,] 0.99829400 3.412000e-03 1.706000e-03
[123,] 0.99784762 4.304753e-03 2.152377e-03
[124,] 0.99721003 5.579945e-03 2.789973e-03
[125,] 0.99673144 6.537112e-03 3.268556e-03
[126,] 0.99602653 7.946942e-03 3.973471e-03
[127,] 0.99506901 9.861988e-03 4.930994e-03
[128,] 0.99382045 1.235910e-02 6.179552e-03
[129,] 0.99237287 1.525427e-02 7.627135e-03
[130,] 0.99216618 1.566764e-02 7.833820e-03
[131,] 0.99073974 1.852052e-02 9.260261e-03
[132,] 0.99037343 1.925314e-02 9.626572e-03
[133,] 0.98808474 2.383052e-02 1.191526e-02
[134,] 0.99067600 1.864801e-02 9.324003e-03
[135,] 0.98836745 2.326510e-02 1.163255e-02
[136,] 0.98566709 2.866582e-02 1.433291e-02
[137,] 0.98411924 3.176152e-02 1.588076e-02
[138,] 0.98141687 3.716626e-02 1.858313e-02
[139,] 0.97757523 4.484954e-02 2.242477e-02
[140,] 0.97333418 5.333165e-02 2.666582e-02
[141,] 0.97181268 5.637464e-02 2.818732e-02
[142,] 0.96592881 6.814239e-02 3.407119e-02
[143,] 0.96083220 7.833560e-02 3.916780e-02
[144,] 0.95355203 9.289595e-02 4.644797e-02
[145,] 0.94598010 1.080398e-01 5.401990e-02
[146,] 0.94886612 1.022678e-01 5.113388e-02
[147,] 0.95489863 9.020273e-02 4.510137e-02
[148,] 0.94949581 1.010084e-01 5.050419e-02
[149,] 0.94431809 1.113638e-01 5.568191e-02
[150,] 0.97047384 5.905232e-02 2.952616e-02
[151,] 0.96548632 6.902735e-02 3.451368e-02
[152,] 0.97040532 5.918936e-02 2.959468e-02
[153,] 0.97684565 4.630871e-02 2.315435e-02
[154,] 0.97819642 4.360717e-02 2.180358e-02
[155,] 0.97383870 5.232261e-02 2.616130e-02
[156,] 1.00000000 1.884737e-10 9.423687e-11
[157,] 1.00000000 2.235273e-10 1.117636e-10
[158,] 1.00000000 3.477084e-10 1.738542e-10
[159,] 1.00000000 7.711466e-13 3.855733e-13
[160,] 1.00000000 1.470865e-12 7.354326e-13
[161,] 1.00000000 2.039996e-12 1.019998e-12
[162,] 1.00000000 6.383086e-13 3.191543e-13
[163,] 1.00000000 1.231322e-12 6.156611e-13
[164,] 1.00000000 2.197740e-13 1.098870e-13
[165,] 1.00000000 2.806214e-13 1.403107e-13
[166,] 1.00000000 4.887380e-13 2.443690e-13
[167,] 1.00000000 7.779397e-13 3.889698e-13
[168,] 1.00000000 1.390914e-12 6.954571e-13
[169,] 1.00000000 2.614440e-12 1.307220e-12
[170,] 1.00000000 4.104940e-12 2.052470e-12
[171,] 1.00000000 7.843604e-12 3.921802e-12
[172,] 1.00000000 4.879743e-12 2.439871e-12
[173,] 1.00000000 8.421671e-12 4.210836e-12
[174,] 1.00000000 1.367241e-11 6.836203e-12
[175,] 1.00000000 2.497969e-11 1.248984e-11
[176,] 1.00000000 1.540264e-11 7.701320e-12
[177,] 1.00000000 5.541477e-12 2.770739e-12
[178,] 1.00000000 2.645840e-12 1.322920e-12
[179,] 1.00000000 4.925755e-12 2.462877e-12
[180,] 1.00000000 9.351348e-12 4.675674e-12
[181,] 1.00000000 1.715760e-11 8.578801e-12
[182,] 1.00000000 3.011323e-11 1.505661e-11
[183,] 1.00000000 5.407564e-11 2.703782e-11
[184,] 1.00000000 8.408239e-11 4.204119e-11
[185,] 1.00000000 7.743520e-11 3.871760e-11
[186,] 1.00000000 1.267070e-10 6.335351e-11
[187,] 1.00000000 1.493333e-10 7.466665e-11
[188,] 1.00000000 2.704196e-10 1.352098e-10
[189,] 1.00000000 4.842833e-10 2.421416e-10
[190,] 1.00000000 8.971511e-10 4.485756e-10
[191,] 1.00000000 9.219542e-10 4.609771e-10
[192,] 1.00000000 1.559481e-09 7.797404e-10
[193,] 1.00000000 2.831743e-09 1.415872e-09
[194,] 1.00000000 3.659014e-09 1.829507e-09
[195,] 1.00000000 5.850831e-09 2.925416e-09
[196,] 0.99999999 1.057198e-08 5.285990e-09
[197,] 1.00000000 9.104562e-09 4.552281e-09
[198,] 0.99999999 1.506313e-08 7.531564e-09
[199,] 0.99999999 2.504065e-08 1.252032e-08
[200,] 0.99999998 3.690903e-08 1.845451e-08
[201,] 0.99999997 6.228123e-08 3.114062e-08
[202,] 0.99999995 1.091922e-07 5.459608e-08
[203,] 0.99999992 1.655648e-07 8.278239e-08
[204,] 0.99999994 1.217307e-07 6.086536e-08
[205,] 0.99999990 1.931998e-07 9.659992e-08
[206,] 0.99999989 2.152553e-07 1.076276e-07
[207,] 0.99999982 3.642823e-07 1.821411e-07
[208,] 0.99999981 3.824489e-07 1.912245e-07
[209,] 0.99999974 5.126863e-07 2.563431e-07
[210,] 0.99999957 8.554134e-07 4.277067e-07
[211,] 0.99999930 1.390867e-06 6.954336e-07
[212,] 0.99999882 2.357187e-06 1.178594e-06
[213,] 0.99999844 3.122161e-06 1.561081e-06
[214,] 0.99999739 5.215380e-06 2.607690e-06
[215,] 0.99999626 7.477567e-06 3.738784e-06
[216,] 0.99999686 6.289473e-06 3.144736e-06
[217,] 0.99999508 9.845774e-06 4.922887e-06
[218,] 0.99999212 1.576578e-05 7.882891e-06
[219,] 0.99998776 2.448049e-05 1.224025e-05
[220,] 0.99998392 3.215998e-05 1.607999e-05
[221,] 0.99997454 5.091956e-05 2.545978e-05
[222,] 0.99997189 5.621898e-05 2.810949e-05
[223,] 0.99995498 9.004361e-05 4.502180e-05
[224,] 0.99993769 1.246126e-04 6.230631e-05
[225,] 0.99992372 1.525620e-04 7.628101e-05
[226,] 0.99988577 2.284653e-04 1.142326e-04
[227,] 0.99982662 3.467677e-04 1.733839e-04
[228,] 0.99973225 5.354948e-04 2.677474e-04
[229,] 0.99964596 7.080874e-04 3.540437e-04
[230,] 0.99948007 1.039852e-03 5.199258e-04
[231,] 0.99948177 1.036453e-03 5.182263e-04
[232,] 0.99940650 1.186996e-03 5.934981e-04
[233,] 0.99979517 4.096650e-04 2.048325e-04
[234,] 0.99968062 6.387529e-04 3.193765e-04
[235,] 0.99958162 8.367566e-04 4.183783e-04
[236,] 0.99945481 1.090380e-03 5.451901e-04
[237,] 0.99926314 1.473717e-03 7.368584e-04
[238,] 1.00000000 1.651239e-09 8.256197e-10
[239,] 1.00000000 3.102095e-10 1.551047e-10
[240,] 1.00000000 7.074498e-10 3.537249e-10
[241,] 1.00000000 1.737004e-09 8.685018e-10
[242,] 1.00000000 3.064854e-09 1.532427e-09
[243,] 1.00000000 4.397843e-09 2.198922e-09
[244,] 0.99999999 1.067737e-08 5.338687e-09
[245,] 0.99999999 2.274716e-08 1.137358e-08
[246,] 0.99999998 4.632441e-08 2.316220e-08
[247,] 0.99999998 4.443790e-08 2.221895e-08
[248,] 0.99999995 9.053329e-08 4.526664e-08
[249,] 0.99999990 2.070738e-07 1.035369e-07
[250,] 0.99999996 7.951566e-08 3.975783e-08
[251,] 0.99999993 1.489286e-07 7.446428e-08
[252,] 0.99999982 3.632984e-07 1.816492e-07
[253,] 0.99999963 7.462522e-07 3.731261e-07
[254,] 0.99999922 1.569703e-06 7.848514e-07
[255,] 0.99999869 2.620504e-06 1.310252e-06
[256,] 0.99999747 5.058036e-06 2.529018e-06
[257,] 0.99999429 1.141988e-05 5.709942e-06
[258,] 0.99998810 2.379750e-05 1.189875e-05
[259,] 0.99997348 5.303955e-05 2.651978e-05
[260,] 0.99994882 1.023586e-04 5.117932e-05
[261,] 0.99993280 1.344029e-04 6.720146e-05
[262,] 0.99988232 2.353573e-04 1.176786e-04
[263,] 0.99985775 2.844959e-04 1.422480e-04
[264,] 0.99995118 9.764856e-05 4.882428e-05
[265,] 0.99997024 5.952436e-05 2.976218e-05
[266,] 0.99998074 3.852026e-05 1.926013e-05
[267,] 0.99999963 7.365409e-07 3.682705e-07
[268,] 0.99999868 2.645660e-06 1.322830e-06
[269,] 0.99999535 9.294237e-06 4.647118e-06
[270,] 0.99999705 5.896172e-06 2.948086e-06
[271,] 0.99999028 1.943342e-05 9.716712e-06
[272,] 0.99997290 5.420742e-05 2.710371e-05
[273,] 0.99990305 1.939007e-04 9.695033e-05
[274,] 0.99966272 6.745521e-04 3.372760e-04
[275,] 0.99894771 2.104575e-03 1.052287e-03
[276,] 0.99786035 4.279292e-03 2.139646e-03
[277,] 0.99556628 8.867437e-03 4.433719e-03
[278,] 0.99166691 1.666618e-02 8.333090e-03
[279,] 0.97251860 5.496281e-02 2.748140e-02
[280,] 0.92920442 1.415912e-01 7.079558e-02
> postscript(file="/var/wessaorg/rcomp/tmp/158es1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/2uqpq1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3tk761353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/4snpo1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/5nvqu1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 289
Frequency = 1
1 2 3 4 5 6
-20.3177226 6.1658939 -12.1869478 21.9846016 -10.4829069 -4.7380699
7 8 9 10 11 12
-35.7467413 -5.9727846 18.8607918 -14.1035914 -29.9291022 -0.0650456
13 14 15 16 17 18
22.7501761 1.5879183 -30.4440852 -1.2398133 44.1401917 -29.2246662
19 20 21 22 23 24
35.0610038 -13.1018191 -12.9669612 -19.5664358 -40.6021220 -26.5390226
25 26 27 28 29 30
-13.3567143 26.3384541 34.4294571 31.3703882 -7.0653348 -10.9635436
31 32 33 34 35 36
-34.4957566 -16.2764915 -2.3486300 -15.9412144 -8.1938327 -23.9141330
37 38 39 40 41 42
-9.9524903 -31.7119227 -10.9505167 0.6826519 2.4536094 -15.5419490
43 44 45 46 47 48
33.3583641 53.5249888 -26.6182906 -2.1186113 41.0144955 -1.2256663
49 50 51 52 53 54
-13.0901767 12.5129727 -1.9044409 4.5888231 -2.1480755 -7.0668287
55 56 57 58 59 60
-14.5653797 2.0804679 2.6724847 147.8243307 -16.3555095 20.0221821
61 62 63 64 65 66
-37.6852711 -18.0791846 53.2010009 -1.7140875 49.0791173 15.2659732
67 68 69 70 71 72
-3.9199885 6.0648030 10.3510940 15.3916115 -5.2189139 -15.0903573
73 74 75 76 77 78
-12.5025116 46.6089716 51.5584462 -7.4774838 2.7448963 -15.8609303
79 80 81 82 83 84
-3.8697229 -9.6268019 -18.5304872 -10.5412274 -32.3529417 -10.8279695
85 86 87 88 89 90
19.9014019 -8.1536524 -6.0572078 -12.6099856 -26.2465051 5.8597437
91 92 93 94 95 96
6.8561909 -13.0452522 -5.3618641 -6.6622648 -6.3687811 45.4289713
97 98 99 100 101 102
-3.1997843 33.0775309 -3.4935412 -4.8276509 -2.5363667 -17.1476484
103 104 105 106 107 108
-22.7870329 -30.1395267 -28.9849181 -20.5704184 24.6578119 -5.4061729
109 110 111 112 113 114
-13.7484790 12.5141080 -28.6231353 87.1024181 -12.9523203 0.9252677
115 116 117 118 119 120
46.2879500 -35.6768709 -10.5470063 -4.2315831 6.5025243 19.5066501
121 122 123 124 125 126
1.5299002 44.7247452 23.7086692 28.1243763 -30.3353985 -6.4466664
127 128 129 130 131 132
8.7532964 -2.1032783 -14.9198559 -10.9593805 8.5545277 5.8912533
133 134 135 136 137 138
-7.4213307 22.3679343 -12.2224187 -21.6789778 -4.4045278 -33.9448757
139 140 141 142 143 144
-1.8739732 -4.4556289 17.0431135 12.0099480 -6.2206356 8.7155434
145 146 147 148 149 150
-19.5435995 -0.7242387 11.9744611 -5.0183114 8.5417179 -26.7043874
151 152 153 154 155 156
-29.4449740 -13.0047934 15.9765307 -45.8340402 -5.0014372 -22.5959400
157 158 159 160 161 162
-31.7406145 -25.3207710 -6.3664143 165.2824763 21.2414917 -10.0035807
163 164 165 166 167 168
68.3240446 0.1993877 14.1951934 -32.3633687 2.0423305 38.0578015
169 170 171 172 173 174
15.6189955 -6.8447591 -7.4900444 -4.8797842 -2.2303864 -6.1526683
175 176 177 178 179 180
0.0526623 -24.2817633 -2.9512036 -9.4456396 2.7290988 -23.1925275
181 182 183 184 185 186
30.8823015 27.8702240 -8.5296909 2.3036995 8.7323197 -11.3241218
187 188 189 190 191 192
-7.9456952 -14.3716888 -17.4818801 -8.2490570 -11.1461492 -3.1087253
193 194 195 196 197 198
5.3476212 -0.6370564 -13.4179745 -3.1361226 -2.6676905 -15.4868600
199 200 201 202 203 204
11.4503965 -0.3982158 22.0388311 -9.7199563 11.9989026 13.8578440
205 206 207 208 209 210
-4.6348596 -2.2494787 9.9280962 -13.6653771 -0.6736047 -10.7417792
211 212 213 214 215 216
-1.4842201 -11.0891499 -15.7878417 6.6840951 4.4256738 -1.9645464
217 218 219 220 221 222
11.8864300 -0.8068388 -11.4912777 -21.0440742 -5.6754963 10.1639863
223 224 225 226 227 228
10.9036440 -13.2272527 -9.3304630 26.9025986 -0.8514634 10.2058224
229 230 231 232 233 234
13.7562575 -6.2667194 -0.5616517 -0.1877940 14.1190805 -8.9558571
235 236 237 238 239 240
19.4336229 14.1112880 -21.8537056 -7.8853211 -11.8868043 5.4884120
241 242 243 244 245 246
-6.2689349 95.7045407 22.4333337 0.6091549 -3.9817818 -10.1947163
247 248 249 250 251 252
12.5977963 0.2686905 4.5540686 0.5878097 18.4490512 -8.5401793
253 254 255 256 257 258
-8.9023919 19.5299136 4.4006300 -4.2856978 -10.5416251 1.3474700
259 260 261 262 263 264
5.5106380 2.9712562 -2.3423893 -9.8781177 -5.2362232 -11.1536204
265 266 267 268 269 270
8.1112907 -13.0418667 8.8960001 17.3075762 -19.3411000 12.2067006
271 272 273 274 275 276
22.3365679 -6.9208187 -7.9885448 3.9204283 -5.5267645 -4.6145305
277 278 279 280 281 282
-7.8473323 -8.0246127 -8.7318986 -18.9735409 -17.1593727 -1.4484361
283 284 285 286 287 288
-12.0056449 -10.0573110 -6.1075339 -8.1817446 -11.8769317 2.3033045
289
-21.5660853
> postscript(file="/var/wessaorg/rcomp/tmp/6n2fv1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 289
Frequency = 1
lag(myerror, k = 1) myerror
0 -20.3177226 NA
1 6.1658939 -20.3177226
2 -12.1869478 6.1658939
3 21.9846016 -12.1869478
4 -10.4829069 21.9846016
5 -4.7380699 -10.4829069
6 -35.7467413 -4.7380699
7 -5.9727846 -35.7467413
8 18.8607918 -5.9727846
9 -14.1035914 18.8607918
10 -29.9291022 -14.1035914
11 -0.0650456 -29.9291022
12 22.7501761 -0.0650456
13 1.5879183 22.7501761
14 -30.4440852 1.5879183
15 -1.2398133 -30.4440852
16 44.1401917 -1.2398133
17 -29.2246662 44.1401917
18 35.0610038 -29.2246662
19 -13.1018191 35.0610038
20 -12.9669612 -13.1018191
21 -19.5664358 -12.9669612
22 -40.6021220 -19.5664358
23 -26.5390226 -40.6021220
24 -13.3567143 -26.5390226
25 26.3384541 -13.3567143
26 34.4294571 26.3384541
27 31.3703882 34.4294571
28 -7.0653348 31.3703882
29 -10.9635436 -7.0653348
30 -34.4957566 -10.9635436
31 -16.2764915 -34.4957566
32 -2.3486300 -16.2764915
33 -15.9412144 -2.3486300
34 -8.1938327 -15.9412144
35 -23.9141330 -8.1938327
36 -9.9524903 -23.9141330
37 -31.7119227 -9.9524903
38 -10.9505167 -31.7119227
39 0.6826519 -10.9505167
40 2.4536094 0.6826519
41 -15.5419490 2.4536094
42 33.3583641 -15.5419490
43 53.5249888 33.3583641
44 -26.6182906 53.5249888
45 -2.1186113 -26.6182906
46 41.0144955 -2.1186113
47 -1.2256663 41.0144955
48 -13.0901767 -1.2256663
49 12.5129727 -13.0901767
50 -1.9044409 12.5129727
51 4.5888231 -1.9044409
52 -2.1480755 4.5888231
53 -7.0668287 -2.1480755
54 -14.5653797 -7.0668287
55 2.0804679 -14.5653797
56 2.6724847 2.0804679
57 147.8243307 2.6724847
58 -16.3555095 147.8243307
59 20.0221821 -16.3555095
60 -37.6852711 20.0221821
61 -18.0791846 -37.6852711
62 53.2010009 -18.0791846
63 -1.7140875 53.2010009
64 49.0791173 -1.7140875
65 15.2659732 49.0791173
66 -3.9199885 15.2659732
67 6.0648030 -3.9199885
68 10.3510940 6.0648030
69 15.3916115 10.3510940
70 -5.2189139 15.3916115
71 -15.0903573 -5.2189139
72 -12.5025116 -15.0903573
73 46.6089716 -12.5025116
74 51.5584462 46.6089716
75 -7.4774838 51.5584462
76 2.7448963 -7.4774838
77 -15.8609303 2.7448963
78 -3.8697229 -15.8609303
79 -9.6268019 -3.8697229
80 -18.5304872 -9.6268019
81 -10.5412274 -18.5304872
82 -32.3529417 -10.5412274
83 -10.8279695 -32.3529417
84 19.9014019 -10.8279695
85 -8.1536524 19.9014019
86 -6.0572078 -8.1536524
87 -12.6099856 -6.0572078
88 -26.2465051 -12.6099856
89 5.8597437 -26.2465051
90 6.8561909 5.8597437
91 -13.0452522 6.8561909
92 -5.3618641 -13.0452522
93 -6.6622648 -5.3618641
94 -6.3687811 -6.6622648
95 45.4289713 -6.3687811
96 -3.1997843 45.4289713
97 33.0775309 -3.1997843
98 -3.4935412 33.0775309
99 -4.8276509 -3.4935412
100 -2.5363667 -4.8276509
101 -17.1476484 -2.5363667
102 -22.7870329 -17.1476484
103 -30.1395267 -22.7870329
104 -28.9849181 -30.1395267
105 -20.5704184 -28.9849181
106 24.6578119 -20.5704184
107 -5.4061729 24.6578119
108 -13.7484790 -5.4061729
109 12.5141080 -13.7484790
110 -28.6231353 12.5141080
111 87.1024181 -28.6231353
112 -12.9523203 87.1024181
113 0.9252677 -12.9523203
114 46.2879500 0.9252677
115 -35.6768709 46.2879500
116 -10.5470063 -35.6768709
117 -4.2315831 -10.5470063
118 6.5025243 -4.2315831
119 19.5066501 6.5025243
120 1.5299002 19.5066501
121 44.7247452 1.5299002
122 23.7086692 44.7247452
123 28.1243763 23.7086692
124 -30.3353985 28.1243763
125 -6.4466664 -30.3353985
126 8.7532964 -6.4466664
127 -2.1032783 8.7532964
128 -14.9198559 -2.1032783
129 -10.9593805 -14.9198559
130 8.5545277 -10.9593805
131 5.8912533 8.5545277
132 -7.4213307 5.8912533
133 22.3679343 -7.4213307
134 -12.2224187 22.3679343
135 -21.6789778 -12.2224187
136 -4.4045278 -21.6789778
137 -33.9448757 -4.4045278
138 -1.8739732 -33.9448757
139 -4.4556289 -1.8739732
140 17.0431135 -4.4556289
141 12.0099480 17.0431135
142 -6.2206356 12.0099480
143 8.7155434 -6.2206356
144 -19.5435995 8.7155434
145 -0.7242387 -19.5435995
146 11.9744611 -0.7242387
147 -5.0183114 11.9744611
148 8.5417179 -5.0183114
149 -26.7043874 8.5417179
150 -29.4449740 -26.7043874
151 -13.0047934 -29.4449740
152 15.9765307 -13.0047934
153 -45.8340402 15.9765307
154 -5.0014372 -45.8340402
155 -22.5959400 -5.0014372
156 -31.7406145 -22.5959400
157 -25.3207710 -31.7406145
158 -6.3664143 -25.3207710
159 165.2824763 -6.3664143
160 21.2414917 165.2824763
161 -10.0035807 21.2414917
162 68.3240446 -10.0035807
163 0.1993877 68.3240446
164 14.1951934 0.1993877
165 -32.3633687 14.1951934
166 2.0423305 -32.3633687
167 38.0578015 2.0423305
168 15.6189955 38.0578015
169 -6.8447591 15.6189955
170 -7.4900444 -6.8447591
171 -4.8797842 -7.4900444
172 -2.2303864 -4.8797842
173 -6.1526683 -2.2303864
174 0.0526623 -6.1526683
175 -24.2817633 0.0526623
176 -2.9512036 -24.2817633
177 -9.4456396 -2.9512036
178 2.7290988 -9.4456396
179 -23.1925275 2.7290988
180 30.8823015 -23.1925275
181 27.8702240 30.8823015
182 -8.5296909 27.8702240
183 2.3036995 -8.5296909
184 8.7323197 2.3036995
185 -11.3241218 8.7323197
186 -7.9456952 -11.3241218
187 -14.3716888 -7.9456952
188 -17.4818801 -14.3716888
189 -8.2490570 -17.4818801
190 -11.1461492 -8.2490570
191 -3.1087253 -11.1461492
192 5.3476212 -3.1087253
193 -0.6370564 5.3476212
194 -13.4179745 -0.6370564
195 -3.1361226 -13.4179745
196 -2.6676905 -3.1361226
197 -15.4868600 -2.6676905
198 11.4503965 -15.4868600
199 -0.3982158 11.4503965
200 22.0388311 -0.3982158
201 -9.7199563 22.0388311
202 11.9989026 -9.7199563
203 13.8578440 11.9989026
204 -4.6348596 13.8578440
205 -2.2494787 -4.6348596
206 9.9280962 -2.2494787
207 -13.6653771 9.9280962
208 -0.6736047 -13.6653771
209 -10.7417792 -0.6736047
210 -1.4842201 -10.7417792
211 -11.0891499 -1.4842201
212 -15.7878417 -11.0891499
213 6.6840951 -15.7878417
214 4.4256738 6.6840951
215 -1.9645464 4.4256738
216 11.8864300 -1.9645464
217 -0.8068388 11.8864300
218 -11.4912777 -0.8068388
219 -21.0440742 -11.4912777
220 -5.6754963 -21.0440742
221 10.1639863 -5.6754963
222 10.9036440 10.1639863
223 -13.2272527 10.9036440
224 -9.3304630 -13.2272527
225 26.9025986 -9.3304630
226 -0.8514634 26.9025986
227 10.2058224 -0.8514634
228 13.7562575 10.2058224
229 -6.2667194 13.7562575
230 -0.5616517 -6.2667194
231 -0.1877940 -0.5616517
232 14.1190805 -0.1877940
233 -8.9558571 14.1190805
234 19.4336229 -8.9558571
235 14.1112880 19.4336229
236 -21.8537056 14.1112880
237 -7.8853211 -21.8537056
238 -11.8868043 -7.8853211
239 5.4884120 -11.8868043
240 -6.2689349 5.4884120
241 95.7045407 -6.2689349
242 22.4333337 95.7045407
243 0.6091549 22.4333337
244 -3.9817818 0.6091549
245 -10.1947163 -3.9817818
246 12.5977963 -10.1947163
247 0.2686905 12.5977963
248 4.5540686 0.2686905
249 0.5878097 4.5540686
250 18.4490512 0.5878097
251 -8.5401793 18.4490512
252 -8.9023919 -8.5401793
253 19.5299136 -8.9023919
254 4.4006300 19.5299136
255 -4.2856978 4.4006300
256 -10.5416251 -4.2856978
257 1.3474700 -10.5416251
258 5.5106380 1.3474700
259 2.9712562 5.5106380
260 -2.3423893 2.9712562
261 -9.8781177 -2.3423893
262 -5.2362232 -9.8781177
263 -11.1536204 -5.2362232
264 8.1112907 -11.1536204
265 -13.0418667 8.1112907
266 8.8960001 -13.0418667
267 17.3075762 8.8960001
268 -19.3411000 17.3075762
269 12.2067006 -19.3411000
270 22.3365679 12.2067006
271 -6.9208187 22.3365679
272 -7.9885448 -6.9208187
273 3.9204283 -7.9885448
274 -5.5267645 3.9204283
275 -4.6145305 -5.5267645
276 -7.8473323 -4.6145305
277 -8.0246127 -7.8473323
278 -8.7318986 -8.0246127
279 -18.9735409 -8.7318986
280 -17.1593727 -18.9735409
281 -1.4484361 -17.1593727
282 -12.0056449 -1.4484361
283 -10.0573110 -12.0056449
284 -6.1075339 -10.0573110
285 -8.1817446 -6.1075339
286 -11.8769317 -8.1817446
287 2.3033045 -11.8769317
288 -21.5660853 2.3033045
289 NA -21.5660853
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 6.1658939 -20.3177226
[2,] -12.1869478 6.1658939
[3,] 21.9846016 -12.1869478
[4,] -10.4829069 21.9846016
[5,] -4.7380699 -10.4829069
[6,] -35.7467413 -4.7380699
[7,] -5.9727846 -35.7467413
[8,] 18.8607918 -5.9727846
[9,] -14.1035914 18.8607918
[10,] -29.9291022 -14.1035914
[11,] -0.0650456 -29.9291022
[12,] 22.7501761 -0.0650456
[13,] 1.5879183 22.7501761
[14,] -30.4440852 1.5879183
[15,] -1.2398133 -30.4440852
[16,] 44.1401917 -1.2398133
[17,] -29.2246662 44.1401917
[18,] 35.0610038 -29.2246662
[19,] -13.1018191 35.0610038
[20,] -12.9669612 -13.1018191
[21,] -19.5664358 -12.9669612
[22,] -40.6021220 -19.5664358
[23,] -26.5390226 -40.6021220
[24,] -13.3567143 -26.5390226
[25,] 26.3384541 -13.3567143
[26,] 34.4294571 26.3384541
[27,] 31.3703882 34.4294571
[28,] -7.0653348 31.3703882
[29,] -10.9635436 -7.0653348
[30,] -34.4957566 -10.9635436
[31,] -16.2764915 -34.4957566
[32,] -2.3486300 -16.2764915
[33,] -15.9412144 -2.3486300
[34,] -8.1938327 -15.9412144
[35,] -23.9141330 -8.1938327
[36,] -9.9524903 -23.9141330
[37,] -31.7119227 -9.9524903
[38,] -10.9505167 -31.7119227
[39,] 0.6826519 -10.9505167
[40,] 2.4536094 0.6826519
[41,] -15.5419490 2.4536094
[42,] 33.3583641 -15.5419490
[43,] 53.5249888 33.3583641
[44,] -26.6182906 53.5249888
[45,] -2.1186113 -26.6182906
[46,] 41.0144955 -2.1186113
[47,] -1.2256663 41.0144955
[48,] -13.0901767 -1.2256663
[49,] 12.5129727 -13.0901767
[50,] -1.9044409 12.5129727
[51,] 4.5888231 -1.9044409
[52,] -2.1480755 4.5888231
[53,] -7.0668287 -2.1480755
[54,] -14.5653797 -7.0668287
[55,] 2.0804679 -14.5653797
[56,] 2.6724847 2.0804679
[57,] 147.8243307 2.6724847
[58,] -16.3555095 147.8243307
[59,] 20.0221821 -16.3555095
[60,] -37.6852711 20.0221821
[61,] -18.0791846 -37.6852711
[62,] 53.2010009 -18.0791846
[63,] -1.7140875 53.2010009
[64,] 49.0791173 -1.7140875
[65,] 15.2659732 49.0791173
[66,] -3.9199885 15.2659732
[67,] 6.0648030 -3.9199885
[68,] 10.3510940 6.0648030
[69,] 15.3916115 10.3510940
[70,] -5.2189139 15.3916115
[71,] -15.0903573 -5.2189139
[72,] -12.5025116 -15.0903573
[73,] 46.6089716 -12.5025116
[74,] 51.5584462 46.6089716
[75,] -7.4774838 51.5584462
[76,] 2.7448963 -7.4774838
[77,] -15.8609303 2.7448963
[78,] -3.8697229 -15.8609303
[79,] -9.6268019 -3.8697229
[80,] -18.5304872 -9.6268019
[81,] -10.5412274 -18.5304872
[82,] -32.3529417 -10.5412274
[83,] -10.8279695 -32.3529417
[84,] 19.9014019 -10.8279695
[85,] -8.1536524 19.9014019
[86,] -6.0572078 -8.1536524
[87,] -12.6099856 -6.0572078
[88,] -26.2465051 -12.6099856
[89,] 5.8597437 -26.2465051
[90,] 6.8561909 5.8597437
[91,] -13.0452522 6.8561909
[92,] -5.3618641 -13.0452522
[93,] -6.6622648 -5.3618641
[94,] -6.3687811 -6.6622648
[95,] 45.4289713 -6.3687811
[96,] -3.1997843 45.4289713
[97,] 33.0775309 -3.1997843
[98,] -3.4935412 33.0775309
[99,] -4.8276509 -3.4935412
[100,] -2.5363667 -4.8276509
[101,] -17.1476484 -2.5363667
[102,] -22.7870329 -17.1476484
[103,] -30.1395267 -22.7870329
[104,] -28.9849181 -30.1395267
[105,] -20.5704184 -28.9849181
[106,] 24.6578119 -20.5704184
[107,] -5.4061729 24.6578119
[108,] -13.7484790 -5.4061729
[109,] 12.5141080 -13.7484790
[110,] -28.6231353 12.5141080
[111,] 87.1024181 -28.6231353
[112,] -12.9523203 87.1024181
[113,] 0.9252677 -12.9523203
[114,] 46.2879500 0.9252677
[115,] -35.6768709 46.2879500
[116,] -10.5470063 -35.6768709
[117,] -4.2315831 -10.5470063
[118,] 6.5025243 -4.2315831
[119,] 19.5066501 6.5025243
[120,] 1.5299002 19.5066501
[121,] 44.7247452 1.5299002
[122,] 23.7086692 44.7247452
[123,] 28.1243763 23.7086692
[124,] -30.3353985 28.1243763
[125,] -6.4466664 -30.3353985
[126,] 8.7532964 -6.4466664
[127,] -2.1032783 8.7532964
[128,] -14.9198559 -2.1032783
[129,] -10.9593805 -14.9198559
[130,] 8.5545277 -10.9593805
[131,] 5.8912533 8.5545277
[132,] -7.4213307 5.8912533
[133,] 22.3679343 -7.4213307
[134,] -12.2224187 22.3679343
[135,] -21.6789778 -12.2224187
[136,] -4.4045278 -21.6789778
[137,] -33.9448757 -4.4045278
[138,] -1.8739732 -33.9448757
[139,] -4.4556289 -1.8739732
[140,] 17.0431135 -4.4556289
[141,] 12.0099480 17.0431135
[142,] -6.2206356 12.0099480
[143,] 8.7155434 -6.2206356
[144,] -19.5435995 8.7155434
[145,] -0.7242387 -19.5435995
[146,] 11.9744611 -0.7242387
[147,] -5.0183114 11.9744611
[148,] 8.5417179 -5.0183114
[149,] -26.7043874 8.5417179
[150,] -29.4449740 -26.7043874
[151,] -13.0047934 -29.4449740
[152,] 15.9765307 -13.0047934
[153,] -45.8340402 15.9765307
[154,] -5.0014372 -45.8340402
[155,] -22.5959400 -5.0014372
[156,] -31.7406145 -22.5959400
[157,] -25.3207710 -31.7406145
[158,] -6.3664143 -25.3207710
[159,] 165.2824763 -6.3664143
[160,] 21.2414917 165.2824763
[161,] -10.0035807 21.2414917
[162,] 68.3240446 -10.0035807
[163,] 0.1993877 68.3240446
[164,] 14.1951934 0.1993877
[165,] -32.3633687 14.1951934
[166,] 2.0423305 -32.3633687
[167,] 38.0578015 2.0423305
[168,] 15.6189955 38.0578015
[169,] -6.8447591 15.6189955
[170,] -7.4900444 -6.8447591
[171,] -4.8797842 -7.4900444
[172,] -2.2303864 -4.8797842
[173,] -6.1526683 -2.2303864
[174,] 0.0526623 -6.1526683
[175,] -24.2817633 0.0526623
[176,] -2.9512036 -24.2817633
[177,] -9.4456396 -2.9512036
[178,] 2.7290988 -9.4456396
[179,] -23.1925275 2.7290988
[180,] 30.8823015 -23.1925275
[181,] 27.8702240 30.8823015
[182,] -8.5296909 27.8702240
[183,] 2.3036995 -8.5296909
[184,] 8.7323197 2.3036995
[185,] -11.3241218 8.7323197
[186,] -7.9456952 -11.3241218
[187,] -14.3716888 -7.9456952
[188,] -17.4818801 -14.3716888
[189,] -8.2490570 -17.4818801
[190,] -11.1461492 -8.2490570
[191,] -3.1087253 -11.1461492
[192,] 5.3476212 -3.1087253
[193,] -0.6370564 5.3476212
[194,] -13.4179745 -0.6370564
[195,] -3.1361226 -13.4179745
[196,] -2.6676905 -3.1361226
[197,] -15.4868600 -2.6676905
[198,] 11.4503965 -15.4868600
[199,] -0.3982158 11.4503965
[200,] 22.0388311 -0.3982158
[201,] -9.7199563 22.0388311
[202,] 11.9989026 -9.7199563
[203,] 13.8578440 11.9989026
[204,] -4.6348596 13.8578440
[205,] -2.2494787 -4.6348596
[206,] 9.9280962 -2.2494787
[207,] -13.6653771 9.9280962
[208,] -0.6736047 -13.6653771
[209,] -10.7417792 -0.6736047
[210,] -1.4842201 -10.7417792
[211,] -11.0891499 -1.4842201
[212,] -15.7878417 -11.0891499
[213,] 6.6840951 -15.7878417
[214,] 4.4256738 6.6840951
[215,] -1.9645464 4.4256738
[216,] 11.8864300 -1.9645464
[217,] -0.8068388 11.8864300
[218,] -11.4912777 -0.8068388
[219,] -21.0440742 -11.4912777
[220,] -5.6754963 -21.0440742
[221,] 10.1639863 -5.6754963
[222,] 10.9036440 10.1639863
[223,] -13.2272527 10.9036440
[224,] -9.3304630 -13.2272527
[225,] 26.9025986 -9.3304630
[226,] -0.8514634 26.9025986
[227,] 10.2058224 -0.8514634
[228,] 13.7562575 10.2058224
[229,] -6.2667194 13.7562575
[230,] -0.5616517 -6.2667194
[231,] -0.1877940 -0.5616517
[232,] 14.1190805 -0.1877940
[233,] -8.9558571 14.1190805
[234,] 19.4336229 -8.9558571
[235,] 14.1112880 19.4336229
[236,] -21.8537056 14.1112880
[237,] -7.8853211 -21.8537056
[238,] -11.8868043 -7.8853211
[239,] 5.4884120 -11.8868043
[240,] -6.2689349 5.4884120
[241,] 95.7045407 -6.2689349
[242,] 22.4333337 95.7045407
[243,] 0.6091549 22.4333337
[244,] -3.9817818 0.6091549
[245,] -10.1947163 -3.9817818
[246,] 12.5977963 -10.1947163
[247,] 0.2686905 12.5977963
[248,] 4.5540686 0.2686905
[249,] 0.5878097 4.5540686
[250,] 18.4490512 0.5878097
[251,] -8.5401793 18.4490512
[252,] -8.9023919 -8.5401793
[253,] 19.5299136 -8.9023919
[254,] 4.4006300 19.5299136
[255,] -4.2856978 4.4006300
[256,] -10.5416251 -4.2856978
[257,] 1.3474700 -10.5416251
[258,] 5.5106380 1.3474700
[259,] 2.9712562 5.5106380
[260,] -2.3423893 2.9712562
[261,] -9.8781177 -2.3423893
[262,] -5.2362232 -9.8781177
[263,] -11.1536204 -5.2362232
[264,] 8.1112907 -11.1536204
[265,] -13.0418667 8.1112907
[266,] 8.8960001 -13.0418667
[267,] 17.3075762 8.8960001
[268,] -19.3411000 17.3075762
[269,] 12.2067006 -19.3411000
[270,] 22.3365679 12.2067006
[271,] -6.9208187 22.3365679
[272,] -7.9885448 -6.9208187
[273,] 3.9204283 -7.9885448
[274,] -5.5267645 3.9204283
[275,] -4.6145305 -5.5267645
[276,] -7.8473323 -4.6145305
[277,] -8.0246127 -7.8473323
[278,] -8.7318986 -8.0246127
[279,] -18.9735409 -8.7318986
[280,] -17.1593727 -18.9735409
[281,] -1.4484361 -17.1593727
[282,] -12.0056449 -1.4484361
[283,] -10.0573110 -12.0056449
[284,] -6.1075339 -10.0573110
[285,] -8.1817446 -6.1075339
[286,] -11.8769317 -8.1817446
[287,] 2.3033045 -11.8769317
[288,] -21.5660853 2.3033045
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 6.1658939 -20.3177226
2 -12.1869478 6.1658939
3 21.9846016 -12.1869478
4 -10.4829069 21.9846016
5 -4.7380699 -10.4829069
6 -35.7467413 -4.7380699
7 -5.9727846 -35.7467413
8 18.8607918 -5.9727846
9 -14.1035914 18.8607918
10 -29.9291022 -14.1035914
11 -0.0650456 -29.9291022
12 22.7501761 -0.0650456
13 1.5879183 22.7501761
14 -30.4440852 1.5879183
15 -1.2398133 -30.4440852
16 44.1401917 -1.2398133
17 -29.2246662 44.1401917
18 35.0610038 -29.2246662
19 -13.1018191 35.0610038
20 -12.9669612 -13.1018191
21 -19.5664358 -12.9669612
22 -40.6021220 -19.5664358
23 -26.5390226 -40.6021220
24 -13.3567143 -26.5390226
25 26.3384541 -13.3567143
26 34.4294571 26.3384541
27 31.3703882 34.4294571
28 -7.0653348 31.3703882
29 -10.9635436 -7.0653348
30 -34.4957566 -10.9635436
31 -16.2764915 -34.4957566
32 -2.3486300 -16.2764915
33 -15.9412144 -2.3486300
34 -8.1938327 -15.9412144
35 -23.9141330 -8.1938327
36 -9.9524903 -23.9141330
37 -31.7119227 -9.9524903
38 -10.9505167 -31.7119227
39 0.6826519 -10.9505167
40 2.4536094 0.6826519
41 -15.5419490 2.4536094
42 33.3583641 -15.5419490
43 53.5249888 33.3583641
44 -26.6182906 53.5249888
45 -2.1186113 -26.6182906
46 41.0144955 -2.1186113
47 -1.2256663 41.0144955
48 -13.0901767 -1.2256663
49 12.5129727 -13.0901767
50 -1.9044409 12.5129727
51 4.5888231 -1.9044409
52 -2.1480755 4.5888231
53 -7.0668287 -2.1480755
54 -14.5653797 -7.0668287
55 2.0804679 -14.5653797
56 2.6724847 2.0804679
57 147.8243307 2.6724847
58 -16.3555095 147.8243307
59 20.0221821 -16.3555095
60 -37.6852711 20.0221821
61 -18.0791846 -37.6852711
62 53.2010009 -18.0791846
63 -1.7140875 53.2010009
64 49.0791173 -1.7140875
65 15.2659732 49.0791173
66 -3.9199885 15.2659732
67 6.0648030 -3.9199885
68 10.3510940 6.0648030
69 15.3916115 10.3510940
70 -5.2189139 15.3916115
71 -15.0903573 -5.2189139
72 -12.5025116 -15.0903573
73 46.6089716 -12.5025116
74 51.5584462 46.6089716
75 -7.4774838 51.5584462
76 2.7448963 -7.4774838
77 -15.8609303 2.7448963
78 -3.8697229 -15.8609303
79 -9.6268019 -3.8697229
80 -18.5304872 -9.6268019
81 -10.5412274 -18.5304872
82 -32.3529417 -10.5412274
83 -10.8279695 -32.3529417
84 19.9014019 -10.8279695
85 -8.1536524 19.9014019
86 -6.0572078 -8.1536524
87 -12.6099856 -6.0572078
88 -26.2465051 -12.6099856
89 5.8597437 -26.2465051
90 6.8561909 5.8597437
91 -13.0452522 6.8561909
92 -5.3618641 -13.0452522
93 -6.6622648 -5.3618641
94 -6.3687811 -6.6622648
95 45.4289713 -6.3687811
96 -3.1997843 45.4289713
97 33.0775309 -3.1997843
98 -3.4935412 33.0775309
99 -4.8276509 -3.4935412
100 -2.5363667 -4.8276509
101 -17.1476484 -2.5363667
102 -22.7870329 -17.1476484
103 -30.1395267 -22.7870329
104 -28.9849181 -30.1395267
105 -20.5704184 -28.9849181
106 24.6578119 -20.5704184
107 -5.4061729 24.6578119
108 -13.7484790 -5.4061729
109 12.5141080 -13.7484790
110 -28.6231353 12.5141080
111 87.1024181 -28.6231353
112 -12.9523203 87.1024181
113 0.9252677 -12.9523203
114 46.2879500 0.9252677
115 -35.6768709 46.2879500
116 -10.5470063 -35.6768709
117 -4.2315831 -10.5470063
118 6.5025243 -4.2315831
119 19.5066501 6.5025243
120 1.5299002 19.5066501
121 44.7247452 1.5299002
122 23.7086692 44.7247452
123 28.1243763 23.7086692
124 -30.3353985 28.1243763
125 -6.4466664 -30.3353985
126 8.7532964 -6.4466664
127 -2.1032783 8.7532964
128 -14.9198559 -2.1032783
129 -10.9593805 -14.9198559
130 8.5545277 -10.9593805
131 5.8912533 8.5545277
132 -7.4213307 5.8912533
133 22.3679343 -7.4213307
134 -12.2224187 22.3679343
135 -21.6789778 -12.2224187
136 -4.4045278 -21.6789778
137 -33.9448757 -4.4045278
138 -1.8739732 -33.9448757
139 -4.4556289 -1.8739732
140 17.0431135 -4.4556289
141 12.0099480 17.0431135
142 -6.2206356 12.0099480
143 8.7155434 -6.2206356
144 -19.5435995 8.7155434
145 -0.7242387 -19.5435995
146 11.9744611 -0.7242387
147 -5.0183114 11.9744611
148 8.5417179 -5.0183114
149 -26.7043874 8.5417179
150 -29.4449740 -26.7043874
151 -13.0047934 -29.4449740
152 15.9765307 -13.0047934
153 -45.8340402 15.9765307
154 -5.0014372 -45.8340402
155 -22.5959400 -5.0014372
156 -31.7406145 -22.5959400
157 -25.3207710 -31.7406145
158 -6.3664143 -25.3207710
159 165.2824763 -6.3664143
160 21.2414917 165.2824763
161 -10.0035807 21.2414917
162 68.3240446 -10.0035807
163 0.1993877 68.3240446
164 14.1951934 0.1993877
165 -32.3633687 14.1951934
166 2.0423305 -32.3633687
167 38.0578015 2.0423305
168 15.6189955 38.0578015
169 -6.8447591 15.6189955
170 -7.4900444 -6.8447591
171 -4.8797842 -7.4900444
172 -2.2303864 -4.8797842
173 -6.1526683 -2.2303864
174 0.0526623 -6.1526683
175 -24.2817633 0.0526623
176 -2.9512036 -24.2817633
177 -9.4456396 -2.9512036
178 2.7290988 -9.4456396
179 -23.1925275 2.7290988
180 30.8823015 -23.1925275
181 27.8702240 30.8823015
182 -8.5296909 27.8702240
183 2.3036995 -8.5296909
184 8.7323197 2.3036995
185 -11.3241218 8.7323197
186 -7.9456952 -11.3241218
187 -14.3716888 -7.9456952
188 -17.4818801 -14.3716888
189 -8.2490570 -17.4818801
190 -11.1461492 -8.2490570
191 -3.1087253 -11.1461492
192 5.3476212 -3.1087253
193 -0.6370564 5.3476212
194 -13.4179745 -0.6370564
195 -3.1361226 -13.4179745
196 -2.6676905 -3.1361226
197 -15.4868600 -2.6676905
198 11.4503965 -15.4868600
199 -0.3982158 11.4503965
200 22.0388311 -0.3982158
201 -9.7199563 22.0388311
202 11.9989026 -9.7199563
203 13.8578440 11.9989026
204 -4.6348596 13.8578440
205 -2.2494787 -4.6348596
206 9.9280962 -2.2494787
207 -13.6653771 9.9280962
208 -0.6736047 -13.6653771
209 -10.7417792 -0.6736047
210 -1.4842201 -10.7417792
211 -11.0891499 -1.4842201
212 -15.7878417 -11.0891499
213 6.6840951 -15.7878417
214 4.4256738 6.6840951
215 -1.9645464 4.4256738
216 11.8864300 -1.9645464
217 -0.8068388 11.8864300
218 -11.4912777 -0.8068388
219 -21.0440742 -11.4912777
220 -5.6754963 -21.0440742
221 10.1639863 -5.6754963
222 10.9036440 10.1639863
223 -13.2272527 10.9036440
224 -9.3304630 -13.2272527
225 26.9025986 -9.3304630
226 -0.8514634 26.9025986
227 10.2058224 -0.8514634
228 13.7562575 10.2058224
229 -6.2667194 13.7562575
230 -0.5616517 -6.2667194
231 -0.1877940 -0.5616517
232 14.1190805 -0.1877940
233 -8.9558571 14.1190805
234 19.4336229 -8.9558571
235 14.1112880 19.4336229
236 -21.8537056 14.1112880
237 -7.8853211 -21.8537056
238 -11.8868043 -7.8853211
239 5.4884120 -11.8868043
240 -6.2689349 5.4884120
241 95.7045407 -6.2689349
242 22.4333337 95.7045407
243 0.6091549 22.4333337
244 -3.9817818 0.6091549
245 -10.1947163 -3.9817818
246 12.5977963 -10.1947163
247 0.2686905 12.5977963
248 4.5540686 0.2686905
249 0.5878097 4.5540686
250 18.4490512 0.5878097
251 -8.5401793 18.4490512
252 -8.9023919 -8.5401793
253 19.5299136 -8.9023919
254 4.4006300 19.5299136
255 -4.2856978 4.4006300
256 -10.5416251 -4.2856978
257 1.3474700 -10.5416251
258 5.5106380 1.3474700
259 2.9712562 5.5106380
260 -2.3423893 2.9712562
261 -9.8781177 -2.3423893
262 -5.2362232 -9.8781177
263 -11.1536204 -5.2362232
264 8.1112907 -11.1536204
265 -13.0418667 8.1112907
266 8.8960001 -13.0418667
267 17.3075762 8.8960001
268 -19.3411000 17.3075762
269 12.2067006 -19.3411000
270 22.3365679 12.2067006
271 -6.9208187 22.3365679
272 -7.9885448 -6.9208187
273 3.9204283 -7.9885448
274 -5.5267645 3.9204283
275 -4.6145305 -5.5267645
276 -7.8473323 -4.6145305
277 -8.0246127 -7.8473323
278 -8.7318986 -8.0246127
279 -18.9735409 -8.7318986
280 -17.1593727 -18.9735409
281 -1.4484361 -17.1593727
282 -12.0056449 -1.4484361
283 -10.0573110 -12.0056449
284 -6.1075339 -10.0573110
285 -8.1817446 -6.1075339
286 -11.8769317 -8.1817446
287 2.3033045 -11.8769317
288 -21.5660853 2.3033045
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7ftgv1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/85dpl1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/95x0g1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10cffh1353456115.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/11a3ni1353456115.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12e6to1353456115.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13fey41353456115.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/14cktk1353456115.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/15vg4e1353456115.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/16n7de1353456115.tab")
+ }
>
> try(system("convert tmp/158es1353456115.ps tmp/158es1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/2uqpq1353456115.ps tmp/2uqpq1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/3tk761353456115.ps tmp/3tk761353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/4snpo1353456115.ps tmp/4snpo1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/5nvqu1353456115.ps tmp/5nvqu1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/6n2fv1353456115.ps tmp/6n2fv1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ftgv1353456115.ps tmp/7ftgv1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/85dpl1353456115.ps tmp/85dpl1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/95x0g1353456115.ps tmp/95x0g1353456115.png",intern=TRUE))
character(0)
> try(system("convert tmp/10cffh1353456115.ps tmp/10cffh1353456115.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
16.224 1.916 18.182