R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-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(0
+ ,210907
+ ,0
+ ,2
+ ,0
+ ,120982
+ ,0
+ ,0
+ ,176508
+ ,1
+ ,0
+ ,179321
+ ,4
+ ,0
+ ,123185
+ ,0
+ ,52746
+ ,0
+ ,385534
+ ,0
+ ,0
+ ,33170
+ ,0
+ ,101645
+ ,0
+ ,149061
+ ,0
+ ,0
+ ,0
+ ,165446
+ ,1
+ ,0
+ ,237213
+ ,1
+ ,0
+ ,0
+ ,173326
+ ,-4
+ ,0
+ ,133131
+ ,1
+ ,4
+ ,0
+ ,258873
+ ,4
+ ,0
+ ,180083
+ ,0
+ ,324799
+ ,1
+ ,0
+ ,0
+ ,230964
+ ,0
+ ,-1
+ ,0
+ ,236785
+ ,1
+ ,0
+ ,0
+ ,135473
+ ,0
+ ,0
+ ,202925
+ ,0
+ ,215147
+ ,0
+ ,0
+ ,344297
+ ,1
+ ,1
+ ,0
+ ,153935
+ ,0
+ ,0
+ ,132943
+ ,0
+ ,174724
+ ,1
+ ,0
+ ,0
+ ,174415
+ ,1
+ ,3
+ ,0
+ ,225548
+ ,0
+ ,0
+ ,223632
+ ,1
+ ,-1
+ ,0
+ ,124817
+ ,1
+ ,0
+ ,221698
+ ,0
+ ,210767
+ ,0
+ ,0
+ ,170266
+ ,0
+ ,0
+ ,260561
+ ,0
+ ,84853
+ ,0
+ ,294424
+ ,0
+ ,4
+ ,0
+ ,101011
+ ,0
+ ,215641
+ ,0
+ ,325107
+ ,1
+ ,3
+ ,0
+ ,7176
+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 ,62088
+ ,1
+ ,40151
+ ,1
+ ,27634
+ ,1
+ ,76990
+ ,1
+ ,37460
+ ,1
+ ,54157
+ ,0
+ ,1
+ ,49862
+ ,1
+ ,84337
+ ,1
+ ,64175
+ ,0
+ ,1
+ ,59382
+ ,0
+ ,1
+ ,1
+ ,119308
+ ,0
+ ,1
+ ,76702
+ ,0
+ ,1
+ ,103425
+ ,1
+ ,70344
+ ,1
+ ,43410
+ ,1
+ ,104838
+ ,1
+ ,62215
+ ,1
+ ,69304
+ ,1
+ ,53117
+ ,1
+ ,19764
+ ,1
+ ,1
+ ,86680
+ ,1
+ ,84105
+ ,0
+ ,0
+ ,1
+ ,77945
+ ,1
+ ,89113
+ ,1
+ ,91005
+ ,1
+ ,40248
+ ,1
+ ,64187
+ ,1
+ ,1
+ ,50857
+ ,1
+ ,56613
+ ,1
+ ,62792
+ ,1
+ ,72535
+ ,1)
+ ,dim=c(4
+ ,289)
+ ,dimnames=list(c('pop'
+ ,'time_in_rfc'
+ ,'gender'
+ ,'total_tests')
+ ,1:289))
> y <- array(NA,dim=c(4,289),dimnames=list(c('pop','time_in_rfc','gender','total_tests'),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 = '4'
> library(lattice)
> library(lmtest)
Loading required package: zoo
> 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
total_tests pop time_in_rfc gender
1 2 0 210907 0
2 0 0 120982 0
3 179321 176508 1 0
4 0 4 0 123185
5 0 52746 0 385534
6 101645 0 33170 0
7 0 0 149061 0
8 0 0 165446 1
9 0 237213 1 0
10 133131 173326 -4 0
11 258873 1 4 0
12 0 4 0 180083
13 0 324799 1 0
14 0 230964 0 -1
15 0 236785 1 0
16 202925 135473 0 0
17 0 0 215147 0
18 0 344297 1 1
19 132943 153935 0 0
20 0 0 174724 1
21 3 0 174415 1
22 0 0 225548 0
23 0 223632 1 -1
24 221698 124817 1 0
25 0 0 210767 0
26 260561 170266 0 0
27 294424 0 84853 0
28 101011 0 4 0
29 325107 0 215641 0
30 7176 1 3 0
31 0 1 0 167542
32 0 106408 0 1
33 0 96560 0 0
34 0 265769 1 -2
35 149112 269651 -3 0
36 175824 0 -4 0
37 0 1 0 152871
38 1 2 0 111665
39 362301 0 116408 0
40 78800 1 2 0
41 -4 0 183167 0
42 0 0 277965 3
43 1 150629 0 168809
44 0 0 24188 1
45 65029 329267 1 0
46 218946 0 101097 0
47 244052 1 2 0
48 341570 1 2 0
49 103597 1 0 0
50 5 0 0 233328
51 0 0 256462 1
52 311473 206161 -2 0
53 0 0 0 235800
54 207176 0 177939 0
55 1 -2 0 196553
56 1 -3 0 174184
57 2 0 143246 0
58 0 0 187559 1
59 119016 187681 0 0
60 0 0 182192 2
61 194979 73566 1 0
62 0 2 0 167488
63 0 0 0 143756
64 4 4 0 275541
65 0 0 243199 0
66 135649 182999 1 0
67 2 0 152299 1
68 346485 0 120221 0
69 0 1 0 145790
70 0 193339 1 2
71 1 80953 0 122774
72 -4 0 130585 0
73 3 0 112611 1
74 0 0 286468 1
75 1 241066 0 148446
76 0 3 0 204713
77 0 182079 0 2
78 220516 140344 1 0
79 1 1 0 243060
80 1 -1 0 162765
81 0 -3 0 182613
82 265318 232138 1 0
83 1 0 0 85574
84 0 0 0 310839
85 1 0 225060 0
86 0 0 232317 1
87 43287 144966 0 0
88 164709 0 155754 0
89 0 1 0 201940
90 1 235454 0 220801
91 0 0 99466 0
92 133328 92661 1 0
93 61361 1 -3 0
94 0 1 0 125930
95 0 100750 1 3
96 0 224549 0 82316
97 101523 102010 0 0
98 243511 1 0 0
99 22938 1 0 0
100 0 1 0 41566
101 0 152474 1 0
102 0 61857 0 99923
103 3 0 132487 1
104 -3 0 317394 0
105 0 0 21054 1
106 22648 209641 1 0
107 0 0 0 31414
108 0 0 46698 1
109 91735 131698 1 0
110 0 0 244749 1
111 0 0 184510 -4
112 0 79863 0 128423
113 0 2 0 97839
114 1 -1 0 38214
115 1 151101 1 272458
116 1 1 172494 3
117 328107 108043 1 1
118 1 0 1 250579
119 158015 351067 1 1
120 1 0 1 98866
121 1 85439 1 229242
122 5 2 1 351619
123 1 1 84207 1
124 324598 120445 0 1
125 131069 0 2 1
126 0 0 1 204271
127 141722 1 165543 1
128 1 1 116048 0
129 299775 250047 1 1
130 0 1 1 195838
131 1 -2 1 173260
132 0 1 254488 0
133 136084 1 104389 1
134 1 1 199476 3
135 1 92499 1 -2
136 1 224330 0 0
137 74408 135781 0 1
138 0 1 1 81240
139 181633 1 14688 1
140 271856 1 6 1
141 7199 1 -3 1
142 17547 1 46660 1
143 95227 1 133368 1
144 152601 1 3 1
145 0 1 98146 0
146 59194 1 79619 1
147 1 0 1 139942
148 -2 1 118612 0
149 1 1 72880 1
150 1 65475 1 1
151 1 99643 1 71965
152 49289 1 77272 1
153 1 1 135131 0
154 1 108446 0 0
155 1 89746 1 44296
156 1 77648 1 181528
157 1 1 134019 1
158 1 124064 1 92630
159 1 121848 0 2
160 0 52915 1 81872
161 1 1 58981 0
162 60812 53515 0 1
163 1 1 56375 1
164 80949 65490 1 1
165 2 1 76302 1
166 1 1 104011 1
167 1 98104 0 -3
168 1 67989 1 30989
169 0 -2 1 135458
170 63123 1 73504 1
171 1 1 1 61254
172 31774 74914 1 1
173 81437 0 1 1
174 1 1 1 87186
175 1 50090 1 65745
176 1 1 56653 1
177 46455 158399 1 1
178 1 1 73624 1
179 1 38395 1 91899
180 1 1 139526 1
181 0 52164 1 51567
182 84856 1 70551 1
183 1 1 102538 0
184 85709 86678 1 1
185 150580 1 34662 1
186 99611 1 -4 1
187 1 1 1 19349
188 86230 99373 0 1
189 0 0 1 30837
190 1 1 31706 1
191 62088 89806 1 1
192 27634 1 40151 1
193 37460 1 76990 1
194 1 1 54157 0
195 1 49862 1 84337
196 59382 64175 0 1
197 119308 0 1 1
198 0 0 1 76702
199 70344 1 103425 1
200 104838 1 43410 1
201 69304 1 62215 1
202 19764 1 53117 1
203 1 1 1 86680
204 1 84105 0 0
205 1 77945 1 89113
206 1 91005 1 40248
207 50857 64187 1 1
208 62792 1 56613 1
209 0 1 72535 1
210 0 210907 0 2
211 176508 120982 0 0
212 4 1 0 179321
213 52746 0 123185 0
214 0 0 385534 0
215 0 33170 0 101645
216 0 149061 0 0
217 237213 165446 1 0
218 173326 1 0 0
219 1 -4 0 133131
220 4 4 0 258873
221 324799 0 180083 0
222 230964 1 0 0
223 236785 0 -1 0
224 135473 1 0 0
225 0 0 0 202925
226 344297 215147 0 0
227 153935 1 1 0
228 0 0 0 132943
229 0 174724 1 0
230 0 174415 1 3
231 223632 225548 0 0
232 124817 1 -1 0
233 0 1 0 221698
234 170266 210767 0 0
235 0 0 0 260561
236 0 84853 0 294424
237 0 4 0 101011
238 1 215641 0 325107
239 1 3 0 7176
240 106408 0 167542 0
241 96560 0 1 0
242 265769 0 0 0
243 269651 1 -2 0
244 0 -3 0 149112
245 1 -4 0 175824
246 2 0 152871 0
247 0 0 111665 1
248 1 116408 0 362301
249 0 2 0 78800
250 0 183167 0 -4
251 150629 277965 3 0
252 0 0 168809 1
253 329267 24188 1 0
254 0 1 0 65029
255 1 101097 0 218946
256 1 2 0 244052
257 1 2 0 341570
258 0 0 0 103597
259 0 0 233328 5
260 206161 256462 1 0
261 0 -2 0 311473
262 0 0 235800 0
263 -2 177939 0 207176
264 -3 0 196553 1
265 0 0 174184 1
266 0 143246 0 2
267 187681 187559 1 0
268 0 0 0 119016
269 73566 182192 2 0
270 2 1 0 194979
271 0 0 167488 0
272 4 0 143756 0
273 0 0 275541 4
274 182999 243199 0 0
275 0 1 0 135649
276 0 152299 1 2
277 1 120221 0 346485
278 193339 0 145790 0
279 80953 1 2 0
280 0 0 122774 1
281 0 130585 0 -4
282 0 112611 1 3
283 241066 286468 1 0
284 3 0 148446 1
285 182079 0 204713 0
286 140344 0 2 0
287 1 1 0 220516
288 -1 0 243060 1
289 -3 0 162765 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) pop time_in_rfc gender
8.441e+04 6.299e-02 -2.565e-01 -4.175e-01
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-106094 -53546 -24386 30642 307751
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8.441e+04 9.118e+03 9.257 < 2e-16 ***
pop 6.299e-02 6.601e-02 0.954 0.340786
time_in_rfc -2.565e-01 7.435e-02 -3.450 0.000645 ***
gender -4.175e-01 6.171e-02 -6.767 7.49e-11 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 84750 on 285 degrees of freedom
Multiple R-squared: 0.1677, Adjusted R-squared: 0.159
F-statistic: 19.15 on 3 and 285 DF, p-value: 2.442e-11
> 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.09330212 0.186604246 0.9066978769
[2,] 0.03222307 0.064446143 0.9677769284
[3,] 0.28768105 0.575362094 0.7123189530
[4,] 0.21666916 0.433338313 0.7833308437
[5,] 0.40309004 0.806180070 0.5969099649
[6,] 0.36769080 0.735381599 0.6323092003
[7,] 0.30774123 0.615482454 0.6922587731
[8,] 0.27540571 0.550811412 0.7245942940
[9,] 0.23021912 0.460438248 0.7697808761
[10,] 0.29122241 0.582444830 0.7087775850
[11,] 0.23813877 0.476277547 0.7618612263
[12,] 0.18186518 0.363730355 0.8181348225
[13,] 0.14385173 0.287703450 0.8561482749
[14,] 0.10326090 0.206521804 0.8967390978
[15,] 0.07231511 0.144630218 0.9276848908
[16,] 0.05565150 0.111302990 0.9443485049
[17,] 0.05009018 0.100180359 0.9499098205
[18,] 0.08067109 0.161342190 0.9193289051
[19,] 0.05944572 0.118891446 0.9405542769
[20,] 0.17314670 0.346293390 0.8268533049
[21,] 0.40280844 0.805616888 0.5971915559
[22,] 0.42937513 0.858750260 0.5706248701
[23,] 0.94603107 0.107937858 0.0539689289
[24,] 0.96725976 0.065480471 0.0327402353
[25,] 0.96089693 0.078206136 0.0391030682
[26,] 0.96466211 0.070675787 0.0353378933
[27,] 0.96725614 0.065487713 0.0327438567
[28,] 0.96206797 0.075864059 0.0379320296
[29,] 0.96190940 0.076181192 0.0380905962
[30,] 0.95473391 0.090532190 0.0452660949
[31,] 0.94609072 0.107818557 0.0539092787
[32,] 0.93949024 0.121019512 0.0605097562
[33,] 0.99525899 0.009482018 0.0047410088
[34,] 0.99397596 0.012048074 0.0060240369
[35,] 0.99265541 0.014689182 0.0073445910
[36,] 0.99004835 0.019903299 0.0099516496
[37,] 0.98661736 0.026765279 0.0133826393
[38,] 0.98837923 0.023241547 0.0116207737
[39,] 0.98506594 0.029868118 0.0149340592
[40,] 0.98987250 0.020255006 0.0101275032
[41,] 0.99236678 0.015266436 0.0076332179
[42,] 0.99835730 0.003285403 0.0016427013
[43,] 0.99786462 0.004270753 0.0021353765
[44,] 0.99702785 0.005944305 0.0029721527
[45,] 0.99598460 0.008030805 0.0040154026
[46,] 0.99926278 0.001474450 0.0007372248
[47,] 0.99895073 0.002098540 0.0010492698
[48,] 0.99945210 0.001095795 0.0005478973
[49,] 0.99923105 0.001537899 0.0007689495
[50,] 0.99895660 0.002086803 0.0010434017
[51,] 0.99883704 0.002325914 0.0011629571
[52,] 0.99855430 0.002891391 0.0014456954
[53,] 0.99803286 0.003934289 0.0019671443
[54,] 0.99758414 0.004831712 0.0024158559
[55,] 0.99746594 0.005068129 0.0025340647
[56,] 0.99670808 0.006583842 0.0032919210
[57,] 0.99590532 0.008189357 0.0040946786
[58,] 0.99478065 0.010438701 0.0052193507
[59,] 0.99323747 0.013525051 0.0067625255
[60,] 0.99151802 0.016963960 0.0084819798
[61,] 0.99036104 0.019277921 0.0096389603
[62,] 0.99924969 0.001500623 0.0007503114
[63,] 0.99904404 0.001911924 0.0009559619
[64,] 0.99912396 0.001752083 0.0008760415
[65,] 0.99887631 0.002247377 0.0011236885
[66,] 0.99876846 0.002463090 0.0012315448
[67,] 0.99870055 0.002598891 0.0012994456
[68,] 0.99823690 0.003526195 0.0017630975
[69,] 0.99777145 0.004457098 0.0022285488
[70,] 0.99703210 0.005935803 0.0029679016
[71,] 0.99727729 0.005445428 0.0027227142
[72,] 0.99785011 0.004299783 0.0021498917
[73,] 0.99716934 0.005661317 0.0028306586
[74,] 0.99639044 0.007219121 0.0036095604
[75,] 0.99532488 0.009350246 0.0046751230
[76,] 0.99788774 0.004224529 0.0021122644
[77,] 0.99771061 0.004578785 0.0022893927
[78,] 0.99732331 0.005353372 0.0026766858
[79,] 0.99658235 0.006835301 0.0034176503
[80,] 0.99563059 0.008738817 0.0043694084
[81,] 0.99502249 0.009955023 0.0049775117
[82,] 0.99582442 0.008351155 0.0041755774
[83,] 0.99459628 0.010807443 0.0054037217
[84,] 0.99354712 0.012905759 0.0064528794
[85,] 0.99328102 0.013437963 0.0067189815
[86,] 0.99169766 0.016604687 0.0083023433
[87,] 0.99061244 0.018775120 0.0093875602
[88,] 0.98892529 0.022149410 0.0110747052
[89,] 0.99009848 0.019803037 0.0099015183
[90,] 0.98885898 0.022282033 0.0111410166
[91,] 0.98606015 0.027879710 0.0139398549
[92,] 0.99068721 0.018625576 0.0093127881
[93,] 0.99090800 0.018183995 0.0090919973
[94,] 0.99097355 0.018052894 0.0090264470
[95,] 0.99172131 0.016557375 0.0082786874
[96,] 0.99038287 0.019234262 0.0096171310
[97,] 0.98920042 0.021599154 0.0107995768
[98,] 0.98645913 0.027081741 0.0135408704
[99,] 0.98723375 0.025532496 0.0127662479
[100,] 0.98671278 0.026574438 0.0132872191
[101,] 0.98668132 0.026637364 0.0133186822
[102,] 0.98657020 0.026859601 0.0134298007
[103,] 0.98331066 0.033378686 0.0166893430
[104,] 0.97968304 0.040633922 0.0203169612
[105,] 0.97617372 0.047652560 0.0238262802
[106,] 0.97192828 0.056143439 0.0280717196
[107,] 0.96811897 0.063762060 0.0318810300
[108,] 0.96703365 0.065932705 0.0329663525
[109,] 0.96168896 0.076622085 0.0383110427
[110,] 0.95607089 0.087858221 0.0439291105
[111,] 0.98806271 0.023874583 0.0119372913
[112,] 0.98534286 0.029314286 0.0146571429
[113,] 0.98367554 0.032648918 0.0163244592
[114,] 0.98115552 0.037688955 0.0188444775
[115,] 0.97698056 0.046038874 0.0230194370
[116,] 0.97511117 0.049777658 0.0248888291
[117,] 0.97322749 0.053545012 0.0267725058
[118,] 0.99306673 0.013866534 0.0069332672
[119,] 0.99185665 0.016286699 0.0081433497
[120,] 0.98977643 0.020447132 0.0102235662
[121,] 0.99060602 0.018787962 0.0093939810
[122,] 0.98941152 0.021176964 0.0105884821
[123,] 0.99634438 0.007311247 0.0036556236
[124,] 0.99531199 0.009376027 0.0046880136
[125,] 0.99406192 0.011876151 0.0059380756
[126,] 0.99255081 0.014898384 0.0074491921
[127,] 0.99231070 0.015378605 0.0076893025
[128,] 0.99065573 0.018688544 0.0093442722
[129,] 0.99115127 0.017697461 0.0088487303
[130,] 0.99201917 0.015961662 0.0079808311
[131,] 0.99012358 0.019752847 0.0098764236
[132,] 0.98870481 0.022590384 0.0112951921
[133,] 0.98981096 0.020378084 0.0101890422
[134,] 0.99615508 0.007689849 0.0038449243
[135,] 0.99609756 0.007804877 0.0039024385
[136,] 0.99554678 0.008906447 0.0044532234
[137,] 0.99474259 0.010514825 0.0052574125
[138,] 0.99445935 0.011081303 0.0055406514
[139,] 0.99376577 0.012468452 0.0062342258
[140,] 0.99217429 0.015651428 0.0078257138
[141,] 0.99036823 0.019263542 0.0096317710
[142,] 0.98900413 0.021991748 0.0109958739
[143,] 0.98802188 0.023956243 0.0119781213
[144,] 0.98836678 0.023266440 0.0116332198
[145,] 0.98712773 0.025744547 0.0128722736
[146,] 0.98418424 0.031631513 0.0158157564
[147,] 0.98180993 0.036380139 0.0181900694
[148,] 0.98262981 0.034740382 0.0173701910
[149,] 0.98168333 0.036633346 0.0183166729
[150,] 0.97763387 0.044732265 0.0223661324
[151,] 0.97445766 0.051084685 0.0255423424
[152,] 0.97156010 0.056879791 0.0284398955
[153,] 0.97307760 0.053844806 0.0269224029
[154,] 0.96977085 0.060458302 0.0302291512
[155,] 0.96765246 0.064695079 0.0323475393
[156,] 0.96167740 0.076645206 0.0383226029
[157,] 0.95915904 0.081681927 0.0408409633
[158,] 0.95112980 0.097740393 0.0488701963
[159,] 0.94720218 0.105595642 0.0527978210
[160,] 0.94190439 0.116191217 0.0580956087
[161,] 0.94403330 0.111933400 0.0559666998
[162,] 0.94240306 0.115193887 0.0575969433
[163,] 0.93279505 0.134409891 0.0672049456
[164,] 0.92081175 0.158376508 0.0791882541
[165,] 0.91357538 0.172849246 0.0864246229
[166,] 0.90635407 0.187291866 0.0936459329
[167,] 0.89106250 0.217874993 0.1089374963
[168,] 0.87923511 0.241529780 0.1207648898
[169,] 0.87070762 0.258584760 0.1292923802
[170,] 0.86439090 0.271218204 0.1356091018
[171,] 0.85348157 0.293036865 0.1465184325
[172,] 0.84512513 0.309749738 0.1548748690
[173,] 0.83114651 0.337706988 0.1688534941
[174,] 0.81614635 0.367707308 0.1838536542
[175,] 0.80817110 0.383657792 0.1918288959
[176,] 0.78438102 0.431237963 0.2156189813
[177,] 0.77085286 0.458294274 0.2291471370
[178,] 0.74355581 0.512888370 0.2564441851
[179,] 0.73773481 0.524530388 0.2622651939
[180,] 0.70915511 0.581689781 0.2908448905
[181,] 0.70295903 0.594081945 0.2970409725
[182,] 0.67197193 0.656056134 0.3280280671
[183,] 0.66280420 0.674391605 0.3371958023
[184,] 0.65750007 0.684999860 0.3424999300
[185,] 0.62978653 0.740426935 0.3702134676
[186,] 0.60685136 0.786297287 0.3931486433
[187,] 0.57621052 0.847578969 0.4237894845
[188,] 0.56771120 0.864577595 0.4322887975
[189,] 0.54887649 0.902247029 0.4511235144
[190,] 0.51985223 0.960295546 0.4801477729
[191,] 0.48814161 0.976283212 0.5118583942
[192,] 0.46806395 0.936127893 0.5319360537
[193,] 0.43225210 0.864504208 0.5677478958
[194,] 0.40003813 0.800076266 0.5999618668
[195,] 0.36512999 0.730259973 0.6348700136
[196,] 0.34583472 0.691669442 0.6541652791
[197,] 0.32566514 0.651330280 0.6743348601
[198,] 0.33921821 0.678436429 0.6607817854
[199,] 0.32386981 0.647739623 0.6761301883
[200,] 0.32491190 0.649823793 0.6750881036
[201,] 0.30444889 0.608897775 0.6955511127
[202,] 0.27401072 0.548021445 0.7259892775
[203,] 0.26791914 0.535838275 0.7320808623
[204,] 0.30052016 0.601040317 0.6994798415
[205,] 0.28827235 0.576544695 0.7117276525
[206,] 0.25809591 0.516191820 0.7419040901
[207,] 0.22871784 0.457435686 0.7712821570
[208,] 0.20188757 0.403775135 0.7981124323
[209,] 0.18754632 0.375092641 0.8124536795
[210,] 0.21240826 0.424816517 0.7875917414
[211,] 0.24054912 0.481098244 0.7594508780
[212,] 0.23246129 0.464922580 0.7675387098
[213,] 0.20988756 0.419775111 0.7901124446
[214,] 0.18386084 0.367721681 0.8161391597
[215,] 0.54778363 0.904432732 0.4522163659
[216,] 0.60613068 0.787738634 0.3938693172
[217,] 0.67862279 0.642754423 0.3213772117
[218,] 0.65178903 0.696421945 0.3482109724
[219,] 0.61298916 0.774021686 0.3870108432
[220,] 0.82882747 0.342345065 0.1711725327
[221,] 0.81927596 0.361448083 0.1807240416
[222,] 0.79500821 0.409983573 0.2049917863
[223,] 0.81991358 0.360172844 0.1800864218
[224,] 0.84833230 0.303335405 0.1516677026
[225,] 0.86059381 0.278812388 0.1394061938
[226,] 0.83976519 0.320469623 0.1602348116
[227,] 0.81134487 0.377310257 0.1886551284
[228,] 0.79325094 0.413498110 0.2067490552
[229,] 0.76112391 0.477752179 0.2388760894
[230,] 0.72702414 0.545951713 0.2729758563
[231,] 0.70132387 0.597352253 0.2986761265
[232,] 0.66291780 0.674164404 0.3370822020
[233,] 0.66918019 0.661639617 0.3308198085
[234,] 0.65722628 0.685547441 0.3427737205
[235,] 0.61324975 0.773500493 0.3867502465
[236,] 0.76058706 0.478825890 0.2394129450
[237,] 0.90502548 0.189949037 0.0949745187
[238,] 0.88333784 0.233324312 0.1166621558
[239,] 0.85729008 0.285419842 0.1427099211
[240,] 0.83231771 0.335364582 0.1676822911
[241,] 0.80821860 0.383562794 0.1917813970
[242,] 0.77565559 0.448688829 0.2243444145
[243,] 0.74646886 0.507062286 0.2535311428
[244,] 0.78259883 0.434802334 0.2174011670
[245,] 0.74381896 0.512362081 0.2561810404
[246,] 0.70662493 0.586750136 0.2933750679
[247,] 0.97485211 0.050295773 0.0251478866
[248,] 0.96653608 0.066927843 0.0334639215
[249,] 0.95626696 0.087466078 0.0437330390
[250,] 0.94118742 0.117625168 0.0588125842
[251,] 0.92734994 0.145300117 0.0726500583
[252,] 0.90530143 0.189397145 0.0946985724
[253,] 0.87999950 0.240000995 0.1200004975
[254,] 0.87763811 0.244723778 0.1223618888
[255,] 0.85118124 0.297637512 0.1488187561
[256,] 0.81618154 0.367636925 0.1838184626
[257,] 0.78859537 0.422809258 0.2114046289
[258,] 0.74708517 0.505829651 0.2529148256
[259,] 0.70299252 0.594014951 0.2970074753
[260,] 0.72553779 0.548924419 0.2744622095
[261,] 0.71694714 0.566105729 0.2830528644
[262,] 0.65443907 0.691121863 0.3455609315
[263,] 0.59612368 0.807752644 0.4038763218
[264,] 0.52109322 0.957813550 0.4789067750
[265,] 0.46283400 0.925668005 0.5371659976
[266,] 0.40744736 0.814894714 0.5925526432
[267,] 0.36620552 0.732411035 0.6337944826
[268,] 0.32203987 0.644079746 0.6779601271
[269,] 0.24881476 0.497629526 0.7511852368
[270,] 0.25933049 0.518660975 0.7406695125
[271,] 0.18841288 0.376825759 0.8115871203
[272,] 0.29406491 0.588129820 0.7059350901
[273,] 0.22682434 0.453648686 0.7731756572
[274,] 0.15825210 0.316504206 0.8417478970
[275,] 0.16878248 0.337564965 0.8312175175
[276,] 0.27360317 0.547206338 0.7263968312
> postscript(file="/var/www/rcomp/tmp/1y61c1323609326.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/www/rcomp/tmp/26fht1323609326.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/www/rcomp/tmp/37tom1323609326.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/www/rcomp/tmp/4wy2a1323609326.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/www/rcomp/tmp/5ijy81323609326.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
-30310.02521 -53377.26225 83795.32300 -32975.14319 73241.68123
6 7 8 9 10
25744.47287 -46175.16282 -41972.08854 -99349.22917 37804.46130
11 12 13 14 15
174465.52469 -9218.46859 -104865.90227 -98956.30502 -99322.27126
16 17 18 19 20
109983.68825 -29224.48999 -106093.58160 38838.84466 -39592.33575
21 22 23 24 25
-39668.59245 -26556.69427 -98494.23674 129428.12128 -30347.93440
26 27 28 29 30
165428.22378 231779.86037 16603.58768 296009.21812 -77231.73180
31 32 33 34 35
-14454.53497 -91110.21234 -90490.34584 -101148.68635 47718.61191
36 37 38 39 40
91414.53572 -20580.13118 -37783.97348 307750.53348 -5607.98830
41 42 43 44 45
-37431.17312 -13110.78747 -23411.94633 -78203.94011 -40118.32276
46 47 48 49 50
160468.35145 159644.01170 257162.01170 19188.49871 13018.21748
51 52 53 54 55
-18627.01638 214078.83599 14045.35393 168407.87543 -2340.35633
56 57 58 59 60
-11680.04262 -47664.67634 -36300.23325 22786.32631 -37676.41986
61 62 63 64 65
105937.20583 -14477.14463 -24385.86258 30642.19849 -22029.31591
66 67 68 69 70
39714.48226 -45342.21721 292912.54570 -23536.66766 -96584.95572
71 72 73 74 75
-38244.38483 -50918.14886 -55520.95730 -10930.65271 -37610.37414
76 77 78 79 80
1065.38109 -95875.99225 127268.14098 17077.56546 -16447.95423
81 82 83 84 85
-8161.67445 166288.42369 -48677.64688 45376.45704 -26680.86341
86 87 88 89 90
-24820.06779 -50252.23582 120250.55257 -92.30620 -7046.44779
91 92 93 94 95
-58895.99052 43083.49223 -23048.27077 -31828.83184 -90752.74720
96 97 98 99 100
-64182.35801 10689.38162 159102.49871 -61470.50129 -67053.41084
101 102 103 104 105
-94011.87661 -46583.60743 -50422.87944 -3001.73196 -79007.79280
106 107 108 109 110
-74964.58507 -71292.12181 -72430.25665 -968.28391 -21631.33243
111 112 113 114 115
-37084.37159 -35818.09812 -43557.75606 -68451.84853 19835.24377
116 117 118 119 120
-40162.54564 236894.06240 20217.29997 51495.00463 -43127.56933
121 122 123 124 125
5927.00000 62408.49871 -62808.48031 232603.65618 46661.49222
126 127 128 129 130
881.27787 99774.72841 -54641.86740 199617.82877 -2639.82341
131 132 133 134 135
-12065.64769 -19133.81636 78451.08476 -33241.82031 -90234.13913
136 137 138 139 140
-98537.03978 -18552.29384 -50488.03241 100992.30242 187449.45521
141 142 143 144 145
-77209.85324 -54893.06641 45027.02892 68193.68573 -59234.62579
146 147 148 149 150
-4792.27550 -25977.06903 -53987.21638 -65713.78962 -88530.75865
151 152 153 154 155
-60635.66148 -15299.26729 -49747.18941 -91237.99490 -71564.95432
156 157 158 159 160
-13504.34831 -50031.99338 -53545.56079 -92081.29535 -53556.98277
161 162 163 164 165
-69279.21944 -26966.70513 -69947.22568 -7583.70343 -64835.06662
166 167 168 169 170
-57728.87003 -90587.84849 -75750.65659 -27850.15173 -2431.73727
171 172 173 174 175
-58831.80548 -57352.28148 -2970.76428 -48004.39352 -60111.56916
176 177 178 179 180
-69875.92030 -47929.64987 -65522.95797 -48454.84656 -48619.48006
181 182 183 184 185
-66162.95514 18543.83549 -58107.10346 -4158.24628 75062.51670
186 187 188 189 190
15201.89027 -76328.43892 -4437.10733 -71532.78066 -76274.68003
191 192 193 194 195
-27976.26582 -46475.58687 -27200.59864 -70516.54725 -52334.47343
196 197 198 199 200
-29068.13362 34900.23572 -52382.72476 12463.82439 31564.32758
201 202 203 204 205
853.70020 -51019.88364 -48215.66417 -89704.85787 -52109.17557
206 207 208 209 210
-73334.41862 -37593.63295 -7095.18007 -65803.28011 -97691.74651
211 212 213 214 215
84479.41528 -9532.43820 -66.20562 14478.77987 -44057.74592
216 217 218 219 220
-93797.16262 142384.07176 88917.49871 -28820.87672 23682.79303
221 222 223 224 225
286580.79890 146555.49871 152376.30520 51064.49871 319.02475
226 227 228 229 230
246337.35870 69526.75521 -28900.62448 -95413.31036 -95392.59516
231 232 233 234 235
125017.24353 40408.24222 8157.26983 72582.23644 24383.83717
236 237 238 239 240
33178.15396 -42233.47393 37752.47031 -81411.42534 64973.10569
241 242 243 244 245
12151.81819 181360.56170 185241.98572 -22149.37798 -10995.22892
246 247 248 249 250
-45195.92009 -55766.60077 59532.38410 -51507.12735 -95947.02597
251 252 253 254 255
48713.48705 -41109.49869 243335.31799 -57256.88273 641.61365
256 257 258 259 260
17491.69315 58208.47394 -41153.48701 -24559.08207 105599.35742
261 262 263 264 265
45641.29762 -23927.11617 -9115.67914 -33996.32481 -39730.84260
266 267 268 269 270
-93430.06521 91459.26707 -34715.57767 -22317.43172 -2996.73897
271 272 273 274 275
-41448.74500 -47531.86432 -13732.11177 83272.48142 -27770.84878
276 277 278 279 280
-94000.01904 52688.55018 146324.84479 -3454.98830 -52917.20719
281 282 283 284 285
-92635.10735 -91499.82161 138614.40592 -46329.48920 150178.24998
286 287 288 289
55936.07469 7664.74828 -22065.55107 -42662.74937
> postscript(file="/var/www/rcomp/tmp/6xho61323609326.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 -30310.02521 NA
1 -53377.26225 -30310.02521
2 83795.32300 -53377.26225
3 -32975.14319 83795.32300
4 73241.68123 -32975.14319
5 25744.47287 73241.68123
6 -46175.16282 25744.47287
7 -41972.08854 -46175.16282
8 -99349.22917 -41972.08854
9 37804.46130 -99349.22917
10 174465.52469 37804.46130
11 -9218.46859 174465.52469
12 -104865.90227 -9218.46859
13 -98956.30502 -104865.90227
14 -99322.27126 -98956.30502
15 109983.68825 -99322.27126
16 -29224.48999 109983.68825
17 -106093.58160 -29224.48999
18 38838.84466 -106093.58160
19 -39592.33575 38838.84466
20 -39668.59245 -39592.33575
21 -26556.69427 -39668.59245
22 -98494.23674 -26556.69427
23 129428.12128 -98494.23674
24 -30347.93440 129428.12128
25 165428.22378 -30347.93440
26 231779.86037 165428.22378
27 16603.58768 231779.86037
28 296009.21812 16603.58768
29 -77231.73180 296009.21812
30 -14454.53497 -77231.73180
31 -91110.21234 -14454.53497
32 -90490.34584 -91110.21234
33 -101148.68635 -90490.34584
34 47718.61191 -101148.68635
35 91414.53572 47718.61191
36 -20580.13118 91414.53572
37 -37783.97348 -20580.13118
38 307750.53348 -37783.97348
39 -5607.98830 307750.53348
40 -37431.17312 -5607.98830
41 -13110.78747 -37431.17312
42 -23411.94633 -13110.78747
43 -78203.94011 -23411.94633
44 -40118.32276 -78203.94011
45 160468.35145 -40118.32276
46 159644.01170 160468.35145
47 257162.01170 159644.01170
48 19188.49871 257162.01170
49 13018.21748 19188.49871
50 -18627.01638 13018.21748
51 214078.83599 -18627.01638
52 14045.35393 214078.83599
53 168407.87543 14045.35393
54 -2340.35633 168407.87543
55 -11680.04262 -2340.35633
56 -47664.67634 -11680.04262
57 -36300.23325 -47664.67634
58 22786.32631 -36300.23325
59 -37676.41986 22786.32631
60 105937.20583 -37676.41986
61 -14477.14463 105937.20583
62 -24385.86258 -14477.14463
63 30642.19849 -24385.86258
64 -22029.31591 30642.19849
65 39714.48226 -22029.31591
66 -45342.21721 39714.48226
67 292912.54570 -45342.21721
68 -23536.66766 292912.54570
69 -96584.95572 -23536.66766
70 -38244.38483 -96584.95572
71 -50918.14886 -38244.38483
72 -55520.95730 -50918.14886
73 -10930.65271 -55520.95730
74 -37610.37414 -10930.65271
75 1065.38109 -37610.37414
76 -95875.99225 1065.38109
77 127268.14098 -95875.99225
78 17077.56546 127268.14098
79 -16447.95423 17077.56546
80 -8161.67445 -16447.95423
81 166288.42369 -8161.67445
82 -48677.64688 166288.42369
83 45376.45704 -48677.64688
84 -26680.86341 45376.45704
85 -24820.06779 -26680.86341
86 -50252.23582 -24820.06779
87 120250.55257 -50252.23582
88 -92.30620 120250.55257
89 -7046.44779 -92.30620
90 -58895.99052 -7046.44779
91 43083.49223 -58895.99052
92 -23048.27077 43083.49223
93 -31828.83184 -23048.27077
94 -90752.74720 -31828.83184
95 -64182.35801 -90752.74720
96 10689.38162 -64182.35801
97 159102.49871 10689.38162
98 -61470.50129 159102.49871
99 -67053.41084 -61470.50129
100 -94011.87661 -67053.41084
101 -46583.60743 -94011.87661
102 -50422.87944 -46583.60743
103 -3001.73196 -50422.87944
104 -79007.79280 -3001.73196
105 -74964.58507 -79007.79280
106 -71292.12181 -74964.58507
107 -72430.25665 -71292.12181
108 -968.28391 -72430.25665
109 -21631.33243 -968.28391
110 -37084.37159 -21631.33243
111 -35818.09812 -37084.37159
112 -43557.75606 -35818.09812
113 -68451.84853 -43557.75606
114 19835.24377 -68451.84853
115 -40162.54564 19835.24377
116 236894.06240 -40162.54564
117 20217.29997 236894.06240
118 51495.00463 20217.29997
119 -43127.56933 51495.00463
120 5927.00000 -43127.56933
121 62408.49871 5927.00000
122 -62808.48031 62408.49871
123 232603.65618 -62808.48031
124 46661.49222 232603.65618
125 881.27787 46661.49222
126 99774.72841 881.27787
127 -54641.86740 99774.72841
128 199617.82877 -54641.86740
129 -2639.82341 199617.82877
130 -12065.64769 -2639.82341
131 -19133.81636 -12065.64769
132 78451.08476 -19133.81636
133 -33241.82031 78451.08476
134 -90234.13913 -33241.82031
135 -98537.03978 -90234.13913
136 -18552.29384 -98537.03978
137 -50488.03241 -18552.29384
138 100992.30242 -50488.03241
139 187449.45521 100992.30242
140 -77209.85324 187449.45521
141 -54893.06641 -77209.85324
142 45027.02892 -54893.06641
143 68193.68573 45027.02892
144 -59234.62579 68193.68573
145 -4792.27550 -59234.62579
146 -25977.06903 -4792.27550
147 -53987.21638 -25977.06903
148 -65713.78962 -53987.21638
149 -88530.75865 -65713.78962
150 -60635.66148 -88530.75865
151 -15299.26729 -60635.66148
152 -49747.18941 -15299.26729
153 -91237.99490 -49747.18941
154 -71564.95432 -91237.99490
155 -13504.34831 -71564.95432
156 -50031.99338 -13504.34831
157 -53545.56079 -50031.99338
158 -92081.29535 -53545.56079
159 -53556.98277 -92081.29535
160 -69279.21944 -53556.98277
161 -26966.70513 -69279.21944
162 -69947.22568 -26966.70513
163 -7583.70343 -69947.22568
164 -64835.06662 -7583.70343
165 -57728.87003 -64835.06662
166 -90587.84849 -57728.87003
167 -75750.65659 -90587.84849
168 -27850.15173 -75750.65659
169 -2431.73727 -27850.15173
170 -58831.80548 -2431.73727
171 -57352.28148 -58831.80548
172 -2970.76428 -57352.28148
173 -48004.39352 -2970.76428
174 -60111.56916 -48004.39352
175 -69875.92030 -60111.56916
176 -47929.64987 -69875.92030
177 -65522.95797 -47929.64987
178 -48454.84656 -65522.95797
179 -48619.48006 -48454.84656
180 -66162.95514 -48619.48006
181 18543.83549 -66162.95514
182 -58107.10346 18543.83549
183 -4158.24628 -58107.10346
184 75062.51670 -4158.24628
185 15201.89027 75062.51670
186 -76328.43892 15201.89027
187 -4437.10733 -76328.43892
188 -71532.78066 -4437.10733
189 -76274.68003 -71532.78066
190 -27976.26582 -76274.68003
191 -46475.58687 -27976.26582
192 -27200.59864 -46475.58687
193 -70516.54725 -27200.59864
194 -52334.47343 -70516.54725
195 -29068.13362 -52334.47343
196 34900.23572 -29068.13362
197 -52382.72476 34900.23572
198 12463.82439 -52382.72476
199 31564.32758 12463.82439
200 853.70020 31564.32758
201 -51019.88364 853.70020
202 -48215.66417 -51019.88364
203 -89704.85787 -48215.66417
204 -52109.17557 -89704.85787
205 -73334.41862 -52109.17557
206 -37593.63295 -73334.41862
207 -7095.18007 -37593.63295
208 -65803.28011 -7095.18007
209 -97691.74651 -65803.28011
210 84479.41528 -97691.74651
211 -9532.43820 84479.41528
212 -66.20562 -9532.43820
213 14478.77987 -66.20562
214 -44057.74592 14478.77987
215 -93797.16262 -44057.74592
216 142384.07176 -93797.16262
217 88917.49871 142384.07176
218 -28820.87672 88917.49871
219 23682.79303 -28820.87672
220 286580.79890 23682.79303
221 146555.49871 286580.79890
222 152376.30520 146555.49871
223 51064.49871 152376.30520
224 319.02475 51064.49871
225 246337.35870 319.02475
226 69526.75521 246337.35870
227 -28900.62448 69526.75521
228 -95413.31036 -28900.62448
229 -95392.59516 -95413.31036
230 125017.24353 -95392.59516
231 40408.24222 125017.24353
232 8157.26983 40408.24222
233 72582.23644 8157.26983
234 24383.83717 72582.23644
235 33178.15396 24383.83717
236 -42233.47393 33178.15396
237 37752.47031 -42233.47393
238 -81411.42534 37752.47031
239 64973.10569 -81411.42534
240 12151.81819 64973.10569
241 181360.56170 12151.81819
242 185241.98572 181360.56170
243 -22149.37798 185241.98572
244 -10995.22892 -22149.37798
245 -45195.92009 -10995.22892
246 -55766.60077 -45195.92009
247 59532.38410 -55766.60077
248 -51507.12735 59532.38410
249 -95947.02597 -51507.12735
250 48713.48705 -95947.02597
251 -41109.49869 48713.48705
252 243335.31799 -41109.49869
253 -57256.88273 243335.31799
254 641.61365 -57256.88273
255 17491.69315 641.61365
256 58208.47394 17491.69315
257 -41153.48701 58208.47394
258 -24559.08207 -41153.48701
259 105599.35742 -24559.08207
260 45641.29762 105599.35742
261 -23927.11617 45641.29762
262 -9115.67914 -23927.11617
263 -33996.32481 -9115.67914
264 -39730.84260 -33996.32481
265 -93430.06521 -39730.84260
266 91459.26707 -93430.06521
267 -34715.57767 91459.26707
268 -22317.43172 -34715.57767
269 -2996.73897 -22317.43172
270 -41448.74500 -2996.73897
271 -47531.86432 -41448.74500
272 -13732.11177 -47531.86432
273 83272.48142 -13732.11177
274 -27770.84878 83272.48142
275 -94000.01904 -27770.84878
276 52688.55018 -94000.01904
277 146324.84479 52688.55018
278 -3454.98830 146324.84479
279 -52917.20719 -3454.98830
280 -92635.10735 -52917.20719
281 -91499.82161 -92635.10735
282 138614.40592 -91499.82161
283 -46329.48920 138614.40592
284 150178.24998 -46329.48920
285 55936.07469 150178.24998
286 7664.74828 55936.07469
287 -22065.55107 7664.74828
288 -42662.74937 -22065.55107
289 NA -42662.74937
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -53377.26225 -30310.02521
[2,] 83795.32300 -53377.26225
[3,] -32975.14319 83795.32300
[4,] 73241.68123 -32975.14319
[5,] 25744.47287 73241.68123
[6,] -46175.16282 25744.47287
[7,] -41972.08854 -46175.16282
[8,] -99349.22917 -41972.08854
[9,] 37804.46130 -99349.22917
[10,] 174465.52469 37804.46130
[11,] -9218.46859 174465.52469
[12,] -104865.90227 -9218.46859
[13,] -98956.30502 -104865.90227
[14,] -99322.27126 -98956.30502
[15,] 109983.68825 -99322.27126
[16,] -29224.48999 109983.68825
[17,] -106093.58160 -29224.48999
[18,] 38838.84466 -106093.58160
[19,] -39592.33575 38838.84466
[20,] -39668.59245 -39592.33575
[21,] -26556.69427 -39668.59245
[22,] -98494.23674 -26556.69427
[23,] 129428.12128 -98494.23674
[24,] -30347.93440 129428.12128
[25,] 165428.22378 -30347.93440
[26,] 231779.86037 165428.22378
[27,] 16603.58768 231779.86037
[28,] 296009.21812 16603.58768
[29,] -77231.73180 296009.21812
[30,] -14454.53497 -77231.73180
[31,] -91110.21234 -14454.53497
[32,] -90490.34584 -91110.21234
[33,] -101148.68635 -90490.34584
[34,] 47718.61191 -101148.68635
[35,] 91414.53572 47718.61191
[36,] -20580.13118 91414.53572
[37,] -37783.97348 -20580.13118
[38,] 307750.53348 -37783.97348
[39,] -5607.98830 307750.53348
[40,] -37431.17312 -5607.98830
[41,] -13110.78747 -37431.17312
[42,] -23411.94633 -13110.78747
[43,] -78203.94011 -23411.94633
[44,] -40118.32276 -78203.94011
[45,] 160468.35145 -40118.32276
[46,] 159644.01170 160468.35145
[47,] 257162.01170 159644.01170
[48,] 19188.49871 257162.01170
[49,] 13018.21748 19188.49871
[50,] -18627.01638 13018.21748
[51,] 214078.83599 -18627.01638
[52,] 14045.35393 214078.83599
[53,] 168407.87543 14045.35393
[54,] -2340.35633 168407.87543
[55,] -11680.04262 -2340.35633
[56,] -47664.67634 -11680.04262
[57,] -36300.23325 -47664.67634
[58,] 22786.32631 -36300.23325
[59,] -37676.41986 22786.32631
[60,] 105937.20583 -37676.41986
[61,] -14477.14463 105937.20583
[62,] -24385.86258 -14477.14463
[63,] 30642.19849 -24385.86258
[64,] -22029.31591 30642.19849
[65,] 39714.48226 -22029.31591
[66,] -45342.21721 39714.48226
[67,] 292912.54570 -45342.21721
[68,] -23536.66766 292912.54570
[69,] -96584.95572 -23536.66766
[70,] -38244.38483 -96584.95572
[71,] -50918.14886 -38244.38483
[72,] -55520.95730 -50918.14886
[73,] -10930.65271 -55520.95730
[74,] -37610.37414 -10930.65271
[75,] 1065.38109 -37610.37414
[76,] -95875.99225 1065.38109
[77,] 127268.14098 -95875.99225
[78,] 17077.56546 127268.14098
[79,] -16447.95423 17077.56546
[80,] -8161.67445 -16447.95423
[81,] 166288.42369 -8161.67445
[82,] -48677.64688 166288.42369
[83,] 45376.45704 -48677.64688
[84,] -26680.86341 45376.45704
[85,] -24820.06779 -26680.86341
[86,] -50252.23582 -24820.06779
[87,] 120250.55257 -50252.23582
[88,] -92.30620 120250.55257
[89,] -7046.44779 -92.30620
[90,] -58895.99052 -7046.44779
[91,] 43083.49223 -58895.99052
[92,] -23048.27077 43083.49223
[93,] -31828.83184 -23048.27077
[94,] -90752.74720 -31828.83184
[95,] -64182.35801 -90752.74720
[96,] 10689.38162 -64182.35801
[97,] 159102.49871 10689.38162
[98,] -61470.50129 159102.49871
[99,] -67053.41084 -61470.50129
[100,] -94011.87661 -67053.41084
[101,] -46583.60743 -94011.87661
[102,] -50422.87944 -46583.60743
[103,] -3001.73196 -50422.87944
[104,] -79007.79280 -3001.73196
[105,] -74964.58507 -79007.79280
[106,] -71292.12181 -74964.58507
[107,] -72430.25665 -71292.12181
[108,] -968.28391 -72430.25665
[109,] -21631.33243 -968.28391
[110,] -37084.37159 -21631.33243
[111,] -35818.09812 -37084.37159
[112,] -43557.75606 -35818.09812
[113,] -68451.84853 -43557.75606
[114,] 19835.24377 -68451.84853
[115,] -40162.54564 19835.24377
[116,] 236894.06240 -40162.54564
[117,] 20217.29997 236894.06240
[118,] 51495.00463 20217.29997
[119,] -43127.56933 51495.00463
[120,] 5927.00000 -43127.56933
[121,] 62408.49871 5927.00000
[122,] -62808.48031 62408.49871
[123,] 232603.65618 -62808.48031
[124,] 46661.49222 232603.65618
[125,] 881.27787 46661.49222
[126,] 99774.72841 881.27787
[127,] -54641.86740 99774.72841
[128,] 199617.82877 -54641.86740
[129,] -2639.82341 199617.82877
[130,] -12065.64769 -2639.82341
[131,] -19133.81636 -12065.64769
[132,] 78451.08476 -19133.81636
[133,] -33241.82031 78451.08476
[134,] -90234.13913 -33241.82031
[135,] -98537.03978 -90234.13913
[136,] -18552.29384 -98537.03978
[137,] -50488.03241 -18552.29384
[138,] 100992.30242 -50488.03241
[139,] 187449.45521 100992.30242
[140,] -77209.85324 187449.45521
[141,] -54893.06641 -77209.85324
[142,] 45027.02892 -54893.06641
[143,] 68193.68573 45027.02892
[144,] -59234.62579 68193.68573
[145,] -4792.27550 -59234.62579
[146,] -25977.06903 -4792.27550
[147,] -53987.21638 -25977.06903
[148,] -65713.78962 -53987.21638
[149,] -88530.75865 -65713.78962
[150,] -60635.66148 -88530.75865
[151,] -15299.26729 -60635.66148
[152,] -49747.18941 -15299.26729
[153,] -91237.99490 -49747.18941
[154,] -71564.95432 -91237.99490
[155,] -13504.34831 -71564.95432
[156,] -50031.99338 -13504.34831
[157,] -53545.56079 -50031.99338
[158,] -92081.29535 -53545.56079
[159,] -53556.98277 -92081.29535
[160,] -69279.21944 -53556.98277
[161,] -26966.70513 -69279.21944
[162,] -69947.22568 -26966.70513
[163,] -7583.70343 -69947.22568
[164,] -64835.06662 -7583.70343
[165,] -57728.87003 -64835.06662
[166,] -90587.84849 -57728.87003
[167,] -75750.65659 -90587.84849
[168,] -27850.15173 -75750.65659
[169,] -2431.73727 -27850.15173
[170,] -58831.80548 -2431.73727
[171,] -57352.28148 -58831.80548
[172,] -2970.76428 -57352.28148
[173,] -48004.39352 -2970.76428
[174,] -60111.56916 -48004.39352
[175,] -69875.92030 -60111.56916
[176,] -47929.64987 -69875.92030
[177,] -65522.95797 -47929.64987
[178,] -48454.84656 -65522.95797
[179,] -48619.48006 -48454.84656
[180,] -66162.95514 -48619.48006
[181,] 18543.83549 -66162.95514
[182,] -58107.10346 18543.83549
[183,] -4158.24628 -58107.10346
[184,] 75062.51670 -4158.24628
[185,] 15201.89027 75062.51670
[186,] -76328.43892 15201.89027
[187,] -4437.10733 -76328.43892
[188,] -71532.78066 -4437.10733
[189,] -76274.68003 -71532.78066
[190,] -27976.26582 -76274.68003
[191,] -46475.58687 -27976.26582
[192,] -27200.59864 -46475.58687
[193,] -70516.54725 -27200.59864
[194,] -52334.47343 -70516.54725
[195,] -29068.13362 -52334.47343
[196,] 34900.23572 -29068.13362
[197,] -52382.72476 34900.23572
[198,] 12463.82439 -52382.72476
[199,] 31564.32758 12463.82439
[200,] 853.70020 31564.32758
[201,] -51019.88364 853.70020
[202,] -48215.66417 -51019.88364
[203,] -89704.85787 -48215.66417
[204,] -52109.17557 -89704.85787
[205,] -73334.41862 -52109.17557
[206,] -37593.63295 -73334.41862
[207,] -7095.18007 -37593.63295
[208,] -65803.28011 -7095.18007
[209,] -97691.74651 -65803.28011
[210,] 84479.41528 -97691.74651
[211,] -9532.43820 84479.41528
[212,] -66.20562 -9532.43820
[213,] 14478.77987 -66.20562
[214,] -44057.74592 14478.77987
[215,] -93797.16262 -44057.74592
[216,] 142384.07176 -93797.16262
[217,] 88917.49871 142384.07176
[218,] -28820.87672 88917.49871
[219,] 23682.79303 -28820.87672
[220,] 286580.79890 23682.79303
[221,] 146555.49871 286580.79890
[222,] 152376.30520 146555.49871
[223,] 51064.49871 152376.30520
[224,] 319.02475 51064.49871
[225,] 246337.35870 319.02475
[226,] 69526.75521 246337.35870
[227,] -28900.62448 69526.75521
[228,] -95413.31036 -28900.62448
[229,] -95392.59516 -95413.31036
[230,] 125017.24353 -95392.59516
[231,] 40408.24222 125017.24353
[232,] 8157.26983 40408.24222
[233,] 72582.23644 8157.26983
[234,] 24383.83717 72582.23644
[235,] 33178.15396 24383.83717
[236,] -42233.47393 33178.15396
[237,] 37752.47031 -42233.47393
[238,] -81411.42534 37752.47031
[239,] 64973.10569 -81411.42534
[240,] 12151.81819 64973.10569
[241,] 181360.56170 12151.81819
[242,] 185241.98572 181360.56170
[243,] -22149.37798 185241.98572
[244,] -10995.22892 -22149.37798
[245,] -45195.92009 -10995.22892
[246,] -55766.60077 -45195.92009
[247,] 59532.38410 -55766.60077
[248,] -51507.12735 59532.38410
[249,] -95947.02597 -51507.12735
[250,] 48713.48705 -95947.02597
[251,] -41109.49869 48713.48705
[252,] 243335.31799 -41109.49869
[253,] -57256.88273 243335.31799
[254,] 641.61365 -57256.88273
[255,] 17491.69315 641.61365
[256,] 58208.47394 17491.69315
[257,] -41153.48701 58208.47394
[258,] -24559.08207 -41153.48701
[259,] 105599.35742 -24559.08207
[260,] 45641.29762 105599.35742
[261,] -23927.11617 45641.29762
[262,] -9115.67914 -23927.11617
[263,] -33996.32481 -9115.67914
[264,] -39730.84260 -33996.32481
[265,] -93430.06521 -39730.84260
[266,] 91459.26707 -93430.06521
[267,] -34715.57767 91459.26707
[268,] -22317.43172 -34715.57767
[269,] -2996.73897 -22317.43172
[270,] -41448.74500 -2996.73897
[271,] -47531.86432 -41448.74500
[272,] -13732.11177 -47531.86432
[273,] 83272.48142 -13732.11177
[274,] -27770.84878 83272.48142
[275,] -94000.01904 -27770.84878
[276,] 52688.55018 -94000.01904
[277,] 146324.84479 52688.55018
[278,] -3454.98830 146324.84479
[279,] -52917.20719 -3454.98830
[280,] -92635.10735 -52917.20719
[281,] -91499.82161 -92635.10735
[282,] 138614.40592 -91499.82161
[283,] -46329.48920 138614.40592
[284,] 150178.24998 -46329.48920
[285,] 55936.07469 150178.24998
[286,] 7664.74828 55936.07469
[287,] -22065.55107 7664.74828
[288,] -42662.74937 -22065.55107
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -53377.26225 -30310.02521
2 83795.32300 -53377.26225
3 -32975.14319 83795.32300
4 73241.68123 -32975.14319
5 25744.47287 73241.68123
6 -46175.16282 25744.47287
7 -41972.08854 -46175.16282
8 -99349.22917 -41972.08854
9 37804.46130 -99349.22917
10 174465.52469 37804.46130
11 -9218.46859 174465.52469
12 -104865.90227 -9218.46859
13 -98956.30502 -104865.90227
14 -99322.27126 -98956.30502
15 109983.68825 -99322.27126
16 -29224.48999 109983.68825
17 -106093.58160 -29224.48999
18 38838.84466 -106093.58160
19 -39592.33575 38838.84466
20 -39668.59245 -39592.33575
21 -26556.69427 -39668.59245
22 -98494.23674 -26556.69427
23 129428.12128 -98494.23674
24 -30347.93440 129428.12128
25 165428.22378 -30347.93440
26 231779.86037 165428.22378
27 16603.58768 231779.86037
28 296009.21812 16603.58768
29 -77231.73180 296009.21812
30 -14454.53497 -77231.73180
31 -91110.21234 -14454.53497
32 -90490.34584 -91110.21234
33 -101148.68635 -90490.34584
34 47718.61191 -101148.68635
35 91414.53572 47718.61191
36 -20580.13118 91414.53572
37 -37783.97348 -20580.13118
38 307750.53348 -37783.97348
39 -5607.98830 307750.53348
40 -37431.17312 -5607.98830
41 -13110.78747 -37431.17312
42 -23411.94633 -13110.78747
43 -78203.94011 -23411.94633
44 -40118.32276 -78203.94011
45 160468.35145 -40118.32276
46 159644.01170 160468.35145
47 257162.01170 159644.01170
48 19188.49871 257162.01170
49 13018.21748 19188.49871
50 -18627.01638 13018.21748
51 214078.83599 -18627.01638
52 14045.35393 214078.83599
53 168407.87543 14045.35393
54 -2340.35633 168407.87543
55 -11680.04262 -2340.35633
56 -47664.67634 -11680.04262
57 -36300.23325 -47664.67634
58 22786.32631 -36300.23325
59 -37676.41986 22786.32631
60 105937.20583 -37676.41986
61 -14477.14463 105937.20583
62 -24385.86258 -14477.14463
63 30642.19849 -24385.86258
64 -22029.31591 30642.19849
65 39714.48226 -22029.31591
66 -45342.21721 39714.48226
67 292912.54570 -45342.21721
68 -23536.66766 292912.54570
69 -96584.95572 -23536.66766
70 -38244.38483 -96584.95572
71 -50918.14886 -38244.38483
72 -55520.95730 -50918.14886
73 -10930.65271 -55520.95730
74 -37610.37414 -10930.65271
75 1065.38109 -37610.37414
76 -95875.99225 1065.38109
77 127268.14098 -95875.99225
78 17077.56546 127268.14098
79 -16447.95423 17077.56546
80 -8161.67445 -16447.95423
81 166288.42369 -8161.67445
82 -48677.64688 166288.42369
83 45376.45704 -48677.64688
84 -26680.86341 45376.45704
85 -24820.06779 -26680.86341
86 -50252.23582 -24820.06779
87 120250.55257 -50252.23582
88 -92.30620 120250.55257
89 -7046.44779 -92.30620
90 -58895.99052 -7046.44779
91 43083.49223 -58895.99052
92 -23048.27077 43083.49223
93 -31828.83184 -23048.27077
94 -90752.74720 -31828.83184
95 -64182.35801 -90752.74720
96 10689.38162 -64182.35801
97 159102.49871 10689.38162
98 -61470.50129 159102.49871
99 -67053.41084 -61470.50129
100 -94011.87661 -67053.41084
101 -46583.60743 -94011.87661
102 -50422.87944 -46583.60743
103 -3001.73196 -50422.87944
104 -79007.79280 -3001.73196
105 -74964.58507 -79007.79280
106 -71292.12181 -74964.58507
107 -72430.25665 -71292.12181
108 -968.28391 -72430.25665
109 -21631.33243 -968.28391
110 -37084.37159 -21631.33243
111 -35818.09812 -37084.37159
112 -43557.75606 -35818.09812
113 -68451.84853 -43557.75606
114 19835.24377 -68451.84853
115 -40162.54564 19835.24377
116 236894.06240 -40162.54564
117 20217.29997 236894.06240
118 51495.00463 20217.29997
119 -43127.56933 51495.00463
120 5927.00000 -43127.56933
121 62408.49871 5927.00000
122 -62808.48031 62408.49871
123 232603.65618 -62808.48031
124 46661.49222 232603.65618
125 881.27787 46661.49222
126 99774.72841 881.27787
127 -54641.86740 99774.72841
128 199617.82877 -54641.86740
129 -2639.82341 199617.82877
130 -12065.64769 -2639.82341
131 -19133.81636 -12065.64769
132 78451.08476 -19133.81636
133 -33241.82031 78451.08476
134 -90234.13913 -33241.82031
135 -98537.03978 -90234.13913
136 -18552.29384 -98537.03978
137 -50488.03241 -18552.29384
138 100992.30242 -50488.03241
139 187449.45521 100992.30242
140 -77209.85324 187449.45521
141 -54893.06641 -77209.85324
142 45027.02892 -54893.06641
143 68193.68573 45027.02892
144 -59234.62579 68193.68573
145 -4792.27550 -59234.62579
146 -25977.06903 -4792.27550
147 -53987.21638 -25977.06903
148 -65713.78962 -53987.21638
149 -88530.75865 -65713.78962
150 -60635.66148 -88530.75865
151 -15299.26729 -60635.66148
152 -49747.18941 -15299.26729
153 -91237.99490 -49747.18941
154 -71564.95432 -91237.99490
155 -13504.34831 -71564.95432
156 -50031.99338 -13504.34831
157 -53545.56079 -50031.99338
158 -92081.29535 -53545.56079
159 -53556.98277 -92081.29535
160 -69279.21944 -53556.98277
161 -26966.70513 -69279.21944
162 -69947.22568 -26966.70513
163 -7583.70343 -69947.22568
164 -64835.06662 -7583.70343
165 -57728.87003 -64835.06662
166 -90587.84849 -57728.87003
167 -75750.65659 -90587.84849
168 -27850.15173 -75750.65659
169 -2431.73727 -27850.15173
170 -58831.80548 -2431.73727
171 -57352.28148 -58831.80548
172 -2970.76428 -57352.28148
173 -48004.39352 -2970.76428
174 -60111.56916 -48004.39352
175 -69875.92030 -60111.56916
176 -47929.64987 -69875.92030
177 -65522.95797 -47929.64987
178 -48454.84656 -65522.95797
179 -48619.48006 -48454.84656
180 -66162.95514 -48619.48006
181 18543.83549 -66162.95514
182 -58107.10346 18543.83549
183 -4158.24628 -58107.10346
184 75062.51670 -4158.24628
185 15201.89027 75062.51670
186 -76328.43892 15201.89027
187 -4437.10733 -76328.43892
188 -71532.78066 -4437.10733
189 -76274.68003 -71532.78066
190 -27976.26582 -76274.68003
191 -46475.58687 -27976.26582
192 -27200.59864 -46475.58687
193 -70516.54725 -27200.59864
194 -52334.47343 -70516.54725
195 -29068.13362 -52334.47343
196 34900.23572 -29068.13362
197 -52382.72476 34900.23572
198 12463.82439 -52382.72476
199 31564.32758 12463.82439
200 853.70020 31564.32758
201 -51019.88364 853.70020
202 -48215.66417 -51019.88364
203 -89704.85787 -48215.66417
204 -52109.17557 -89704.85787
205 -73334.41862 -52109.17557
206 -37593.63295 -73334.41862
207 -7095.18007 -37593.63295
208 -65803.28011 -7095.18007
209 -97691.74651 -65803.28011
210 84479.41528 -97691.74651
211 -9532.43820 84479.41528
212 -66.20562 -9532.43820
213 14478.77987 -66.20562
214 -44057.74592 14478.77987
215 -93797.16262 -44057.74592
216 142384.07176 -93797.16262
217 88917.49871 142384.07176
218 -28820.87672 88917.49871
219 23682.79303 -28820.87672
220 286580.79890 23682.79303
221 146555.49871 286580.79890
222 152376.30520 146555.49871
223 51064.49871 152376.30520
224 319.02475 51064.49871
225 246337.35870 319.02475
226 69526.75521 246337.35870
227 -28900.62448 69526.75521
228 -95413.31036 -28900.62448
229 -95392.59516 -95413.31036
230 125017.24353 -95392.59516
231 40408.24222 125017.24353
232 8157.26983 40408.24222
233 72582.23644 8157.26983
234 24383.83717 72582.23644
235 33178.15396 24383.83717
236 -42233.47393 33178.15396
237 37752.47031 -42233.47393
238 -81411.42534 37752.47031
239 64973.10569 -81411.42534
240 12151.81819 64973.10569
241 181360.56170 12151.81819
242 185241.98572 181360.56170
243 -22149.37798 185241.98572
244 -10995.22892 -22149.37798
245 -45195.92009 -10995.22892
246 -55766.60077 -45195.92009
247 59532.38410 -55766.60077
248 -51507.12735 59532.38410
249 -95947.02597 -51507.12735
250 48713.48705 -95947.02597
251 -41109.49869 48713.48705
252 243335.31799 -41109.49869
253 -57256.88273 243335.31799
254 641.61365 -57256.88273
255 17491.69315 641.61365
256 58208.47394 17491.69315
257 -41153.48701 58208.47394
258 -24559.08207 -41153.48701
259 105599.35742 -24559.08207
260 45641.29762 105599.35742
261 -23927.11617 45641.29762
262 -9115.67914 -23927.11617
263 -33996.32481 -9115.67914
264 -39730.84260 -33996.32481
265 -93430.06521 -39730.84260
266 91459.26707 -93430.06521
267 -34715.57767 91459.26707
268 -22317.43172 -34715.57767
269 -2996.73897 -22317.43172
270 -41448.74500 -2996.73897
271 -47531.86432 -41448.74500
272 -13732.11177 -47531.86432
273 83272.48142 -13732.11177
274 -27770.84878 83272.48142
275 -94000.01904 -27770.84878
276 52688.55018 -94000.01904
277 146324.84479 52688.55018
278 -3454.98830 146324.84479
279 -52917.20719 -3454.98830
280 -92635.10735 -52917.20719
281 -91499.82161 -92635.10735
282 138614.40592 -91499.82161
283 -46329.48920 138614.40592
284 150178.24998 -46329.48920
285 55936.07469 150178.24998
286 7664.74828 55936.07469
287 -22065.55107 7664.74828
288 -42662.74937 -22065.55107
> 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/www/rcomp/tmp/7nrr81323609326.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/www/rcomp/tmp/8kmdj1323609326.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/www/rcomp/tmp/9tewz1323609326.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/www/rcomp/tmp/10uds11323609326.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/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/www/rcomp/tmp/117hn41323609326.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/www/rcomp/tmp/12fqey1323609326.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/www/rcomp/tmp/139c671323609326.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/www/rcomp/tmp/14uveh1323609326.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/www/rcomp/tmp/15m5p61323609326.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/www/rcomp/tmp/16s2pl1323609326.tab")
+ }
>
> try(system("convert tmp/1y61c1323609326.ps tmp/1y61c1323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/26fht1323609326.ps tmp/26fht1323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/37tom1323609326.ps tmp/37tom1323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/4wy2a1323609326.ps tmp/4wy2a1323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/5ijy81323609326.ps tmp/5ijy81323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xho61323609326.ps tmp/6xho61323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/7nrr81323609326.ps tmp/7nrr81323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/8kmdj1323609326.ps tmp/8kmdj1323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/9tewz1323609326.ps tmp/9tewz1323609326.png",intern=TRUE))
character(0)
> try(system("convert tmp/10uds11323609326.ps tmp/10uds11323609326.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.690 0.270 7.979