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(493
+ ,116
+ ,377
+ ,7.4
+ ,9.1
+ ,9
+ ,481
+ ,111
+ ,370
+ ,7.2
+ ,9.1
+ ,9
+ ,462
+ ,104
+ ,358
+ ,7
+ ,9
+ ,9
+ ,457
+ ,100
+ ,357
+ ,7
+ ,8.9
+ ,8.9
+ ,442
+ ,93
+ ,349
+ ,6.8
+ ,8.8
+ ,8.9
+ ,439
+ ,91
+ ,348
+ ,6.8
+ ,8.7
+ ,8.8
+ ,488
+ ,119
+ ,369
+ ,6.7
+ ,8.7
+ ,8.8
+ ,521
+ ,139
+ ,381
+ ,6.7
+ ,8.6
+ ,8.7
+ ,501
+ ,134
+ ,368
+ ,6.7
+ ,8.5
+ ,8.7
+ ,485
+ ,124
+ ,361
+ ,6.8
+ ,8.4
+ ,8.6
+ ,464
+ ,113
+ ,351
+ ,6.7
+ ,8.4
+ ,8.6
+ ,460
+ ,109
+ ,351
+ ,6.6
+ ,8.3
+ ,8.5
+ ,467
+ ,109
+ ,358
+ ,6.4
+ ,8.2
+ ,8.5
+ ,460
+ ,106
+ ,354
+ ,6.3
+ ,8.2
+ ,8.5
+ ,448
+ ,101
+ ,347
+ ,6.3
+ ,8.1
+ ,8.5
+ ,443
+ ,98
+ ,345
+ ,6.5
+ ,8.1
+ ,8.5
+ ,436
+ ,93
+ ,343
+ ,6.5
+ ,8.1
+ ,8.5
+ ,431
+ ,91
+ ,340
+ ,6.4
+ ,8.1
+ ,8.5
+ ,484
+ ,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9
+ ,539
+ ,108
+ ,431
+ ,7.2
+ ,10.6
+ ,10
+ ,541
+ ,106
+ ,435
+ ,7.1
+ ,10.7
+ ,10
+ ,562
+ ,111
+ ,450
+ ,7.1
+ ,10.8
+ ,10.1)
+ ,dim=c(6
+ ,145)
+ ,dimnames=list(c('Totaal_werklozen'
+ ,'Jonger_dan_25_jaar'
+ ,'Vanaf_25_jaar'
+ ,'Belgie'
+ ,'Eurogebied'
+ ,'EU_27')
+ ,1:145))
> y <- array(NA,dim=c(6,145),dimnames=list(c('Totaal_werklozen','Jonger_dan_25_jaar','Vanaf_25_jaar','Belgie','Eurogebied','EU_27'),1:145))
> 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 = '1'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '1'
> #'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
Totaal_werklozen Jonger_dan_25_jaar Vanaf_25_jaar Belgie Eurogebied EU_27
1 493 116 377 7.4 9.1 9.0
2 481 111 370 7.2 9.1 9.0
3 462 104 358 7.0 9.0 9.0
4 457 100 357 7.0 8.9 8.9
5 442 93 349 6.8 8.8 8.9
6 439 91 348 6.8 8.7 8.8
7 488 119 369 6.7 8.7 8.8
8 521 139 381 6.7 8.6 8.7
9 501 134 368 6.7 8.5 8.7
10 485 124 361 6.8 8.4 8.6
11 464 113 351 6.7 8.4 8.6
12 460 109 351 6.6 8.3 8.5
13 467 109 358 6.4 8.2 8.5
14 460 106 354 6.3 8.2 8.5
15 448 101 347 6.3 8.1 8.5
16 443 98 345 6.5 8.1 8.5
17 436 93 343 6.5 8.1 8.5
18 431 91 340 6.4 8.1 8.5
19 484 122 362 6.2 8.1 8.5
20 510 139 370 6.2 8.1 8.6
21 513 140 373 6.5 8.1 8.6
22 503 132 371 7.0 8.2 8.6
23 471 117 354 7.2 8.2 8.7
24 471 114 357 7.3 8.3 8.7
25 476 113 363 7.4 8.2 8.7
26 475 110 364 7.4 8.3 8.8
27 470 107 363 7.4 8.3 8.8
28 461 103 358 7.3 8.4 8.9
29 455 98 357 7.4 8.5 8.9
30 456 98 357 7.4 8.5 8.9
31 517 137 380 7.6 8.6 9.0
32 525 148 378 7.6 8.6 9.0
33 523 147 376 7.7 8.7 9.0
34 519 139 380 7.7 8.7 9.0
35 509 130 379 7.8 8.8 9.0
36 512 128 384 7.8 8.8 9.0
37 519 127 392 8.0 8.9 9.1
38 517 123 394 8.1 9.0 9.1
39 510 118 392 8.1 9.0 9.1
40 509 114 396 8.2 9.0 9.1
41 501 108 392 8.1 9.0 9.1
42 507 111 396 8.1 9.1 9.1
43 569 151 419 8.1 9.1 9.1
44 580 159 421 8.1 9.0 9.1
45 578 158 420 8.2 9.1 9.1
46 565 148 418 8.2 9.0 9.1
47 547 138 410 8.3 9.1 9.1
48 555 137 418 8.4 9.1 9.2
49 562 136 426 8.6 9.2 9.3
50 561 133 428 8.6 9.2 9.3
51 555 126 430 8.4 9.2 9.3
52 544 120 424 8.0 9.2 9.2
53 537 114 423 7.9 9.2 9.2
54 543 116 427 8.1 9.3 9.2
55 594 153 441 8.5 9.3 9.2
56 611 162 449 8.8 9.3 9.2
57 613 161 452 8.8 9.3 9.2
58 611 149 462 8.5 9.3 9.2
59 594 139 455 8.3 9.4 9.2
60 595 135 461 8.3 9.4 9.2
61 591 130 461 8.3 9.3 9.2
62 589 127 463 8.4 9.3 9.2
63 584 122 462 8.5 9.3 9.2
64 573 117 456 8.5 9.3 9.2
65 567 112 455 8.6 9.2 9.1
66 569 113 456 8.5 9.2 9.1
67 621 149 472 8.6 9.2 9.0
68 629 157 472 8.6 9.1 8.9
69 628 157 471 8.6 9.1 8.9
70 612 147 465 8.5 9.1 9.0
71 595 137 459 8.4 9.1 8.9
72 597 132 465 8.4 9.0 8.8
73 593 125 468 8.5 8.9 8.7
74 590 123 467 8.5 8.8 8.6
75 580 117 463 8.5 8.7 8.5
76 574 114 460 8.6 8.6 8.5
77 573 111 462 8.6 8.6 8.4
78 573 112 461 8.4 8.5 8.3
79 620 144 476 8.2 8.4 8.2
80 626 150 476 8.0 8.4 8.2
81 620 149 471 8.0 8.3 8.1
82 588 134 453 8.0 8.2 8.0
83 566 123 443 8.0 8.2 7.9
84 557 116 442 7.9 8.0 7.8
85 561 117 444 7.9 7.9 7.6
86 549 111 438 7.9 7.8 7.5
87 532 105 427 7.9 7.7 7.4
88 526 102 424 8.0 7.6 7.3
89 511 95 416 7.9 7.6 7.3
90 499 93 406 7.4 7.6 7.2
91 555 124 431 7.2 7.6 7.2
92 565 130 434 7.0 7.6 7.2
93 542 124 418 6.9 7.5 7.1
94 527 115 412 7.1 7.5 7.0
95 510 106 404 7.2 7.4 7.0
96 514 105 409 7.2 7.4 6.9
97 517 105 412 7.1 7.4 6.9
98 508 101 406 6.9 7.3 6.8
99 493 95 398 6.8 7.3 6.8
100 490 93 397 6.8 7.4 6.8
101 469 84 385 6.8 7.5 6.9
102 478 87 390 6.9 7.6 7.0
103 528 116 413 7.1 7.6 7.0
104 534 120 413 7.2 7.7 7.1
105 518 117 401 7.2 7.7 7.2
106 506 109 397 7.1 7.9 7.3
107 502 105 397 7.1 8.1 7.5
108 516 107 409 7.2 8.4 7.7
109 528 109 419 7.5 8.7 8.1
110 533 109 424 7.7 9.0 8.4
111 536 108 428 7.8 9.3 8.6
112 537 107 430 7.7 9.4 8.8
113 524 99 424 7.7 9.5 8.9
114 536 103 433 7.8 9.6 9.1
115 587 131 456 8.0 9.8 9.2
116 597 137 459 8.1 9.8 9.3
117 581 135 446 8.1 9.9 9.4
118 564 124 441 8.0 10.0 9.4
119 558 118 439 8.1 10.0 9.5
120 575 121 454 8.2 10.1 9.5
121 580 121 460 8.4 10.1 9.7
122 575 118 457 8.5 10.1 9.7
123 563 113 451 8.5 10.1 9.7
124 552 107 444 8.5 10.2 9.7
125 537 100 437 8.5 10.2 9.7
126 545 102 443 8.5 10.1 9.6
127 601 130 471 8.4 10.1 9.6
128 604 136 469 8.3 10.1 9.6
129 586 133 454 8.2 10.1 9.6
130 564 120 444 8.1 10.1 9.6
131 549 112 436 7.9 10.1 9.6
132 551 109 442 7.6 10.1 9.6
133 556 110 446 7.3 10.0 9.5
134 548 106 442 7.1 9.9 9.5
135 540 102 438 7.0 9.9 9.4
136 531 98 433 7.1 9.9 9.4
137 521 92 428 7.1 9.9 9.5
138 519 92 426 7.1 10.0 9.5
139 572 120 452 7.3 10.1 9.6
140 581 127 455 7.3 10.2 9.7
141 563 124 439 7.3 10.3 9.8
142 548 114 434 7.2 10.5 9.9
143 539 108 431 7.2 10.6 10.0
144 541 106 435 7.1 10.7 10.0
145 562 111 450 7.1 10.8 10.1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Jonger_dan_25_jaar Vanaf_25_jaar Belgie
1.25805 0.99466 1.00172 -0.15975
Eurogebied EU_27
-0.03024 0.01761
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.11014 -0.14525 -0.00381 0.13089 1.10842
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.258053 0.610511 2.061 0.0412 *
Jonger_dan_25_jaar 0.994662 0.003107 320.141 <2e-16 ***
Vanaf_25_jaar 1.001724 0.002610 383.864 <2e-16 ***
Belgie -0.159748 0.105403 -1.516 0.1319
Eurogebied -0.030239 0.211592 -0.143 0.8866
EU_27 0.017610 0.208159 0.085 0.9327
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.4881 on 139 degrees of freedom
Multiple R-squared: 0.9999, Adjusted R-squared: 0.9999
F-statistic: 2.756e+05 on 5 and 139 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.572375094 0.855249812 0.4276249
[2,] 0.545404617 0.909190765 0.4545954
[3,] 0.398605783 0.797211565 0.6013942
[4,] 0.398941328 0.797882656 0.6010587
[5,] 0.296012022 0.592024045 0.7039880
[6,] 0.215444112 0.430888225 0.7845559
[7,] 0.204924273 0.409848546 0.7950757
[8,] 0.177158194 0.354316387 0.8228418
[9,] 0.126194652 0.252389305 0.8738053
[10,] 0.086170040 0.172340079 0.9138300
[11,] 0.055310092 0.110620185 0.9446899
[12,] 0.176192719 0.352385438 0.8238073
[13,] 0.147934317 0.295868634 0.8520657
[14,] 0.105931735 0.211863469 0.8940683
[15,] 0.083704497 0.167408994 0.9162955
[16,] 0.059078818 0.118157636 0.9409212
[17,] 0.039915591 0.079831182 0.9600844
[18,] 0.073862307 0.147724614 0.9261377
[19,] 0.068376701 0.136753402 0.9316233
[20,] 0.054582036 0.109164073 0.9454180
[21,] 0.039390671 0.078781341 0.9606093
[22,] 0.087177830 0.174355659 0.9128222
[23,] 0.071746451 0.143492902 0.9282535
[24,] 0.120436658 0.240873315 0.8795633
[25,] 0.121195040 0.242390079 0.8788050
[26,] 0.092650360 0.185300720 0.9073496
[27,] 0.069559671 0.139119342 0.9304403
[28,] 0.055966738 0.111933477 0.9440333
[29,] 0.050426765 0.100853530 0.9495732
[30,] 0.041197542 0.082395084 0.9588025
[31,] 0.032086403 0.064172806 0.9679136
[32,] 0.113807468 0.227614936 0.8861925
[33,] 0.217805550 0.435611101 0.7821944
[34,] 0.181571724 0.363143448 0.8184283
[35,] 0.267441840 0.534883681 0.7325582
[36,] 0.233613836 0.467227672 0.7663862
[37,] 0.208964465 0.417928930 0.7910355
[38,] 0.286517278 0.573034556 0.7134827
[39,] 0.338092716 0.676185432 0.6619073
[40,] 0.294849022 0.589698044 0.7051510
[41,] 0.252555462 0.505110924 0.7474445
[42,] 0.213889903 0.427779807 0.7861101
[43,] 0.348308579 0.696617158 0.6516914
[44,] 0.303211170 0.606422341 0.6967888
[45,] 0.260168761 0.520337521 0.7398312
[46,] 0.222794650 0.445589299 0.7772054
[47,] 0.206308252 0.412616505 0.7936917
[48,] 0.195660894 0.391321788 0.8043391
[49,] 0.179297772 0.358595543 0.8207022
[50,] 0.152682414 0.305364829 0.8473176
[51,] 0.126966979 0.253933959 0.8730330
[52,] 0.189805641 0.379611282 0.8101944
[53,] 0.159454293 0.318908585 0.8405457
[54,] 0.227578711 0.455157422 0.7724213
[55,] 0.197222808 0.394445615 0.8027772
[56,] 0.167615754 0.335231509 0.8323842
[57,] 0.140637993 0.281275986 0.8593620
[58,] 0.115996437 0.231992874 0.8840036
[59,] 0.099952746 0.199905492 0.9000473
[60,] 0.085535134 0.171070268 0.9144649
[61,] 0.072504274 0.145008548 0.9274957
[62,] 0.059864742 0.119729485 0.9401353
[63,] 0.092053222 0.184106444 0.9079468
[64,] 0.074744720 0.149489439 0.9252553
[65,] 0.059307308 0.118614616 0.9406927
[66,] 0.046275969 0.092551938 0.9537240
[67,] 0.035518689 0.071037378 0.9644813
[68,] 0.026903517 0.053807034 0.9730965
[69,] 0.020105689 0.040211377 0.9798943
[70,] 0.014821604 0.029643208 0.9851784
[71,] 0.011000420 0.022000841 0.9889996
[72,] 0.008142526 0.016285052 0.9918575
[73,] 0.006035096 0.012070192 0.9939649
[74,] 0.020688748 0.041377496 0.9793113
[75,] 0.016302978 0.032605956 0.9836970
[76,] 0.042411030 0.084822059 0.9575890
[77,] 0.032528009 0.065056018 0.9674720
[78,] 0.024524058 0.049048115 0.9754759
[79,] 0.018211645 0.036423290 0.9817884
[80,] 0.013338032 0.026676064 0.9866620
[81,] 0.009770970 0.019541940 0.9902290
[82,] 0.007365449 0.014730899 0.9926346
[83,] 0.005171576 0.010343152 0.9948284
[84,] 0.018081382 0.036162764 0.9819186
[85,] 0.013915032 0.027830064 0.9860850
[86,] 0.010109719 0.020219437 0.9898903
[87,] 0.007211533 0.014423067 0.9927885
[88,] 0.005058069 0.010116139 0.9949419
[89,] 0.003494529 0.006989058 0.9965055
[90,] 0.007929983 0.015859965 0.9920700
[91,] 0.005731993 0.011463985 0.9942680
[92,] 0.004196581 0.008393163 0.9958034
[93,] 0.003808882 0.007617764 0.9961911
[94,] 0.005165639 0.010331278 0.9948344
[95,] 0.015219646 0.030439291 0.9847804
[96,] 0.041493127 0.082986254 0.9585069
[97,] 0.031601191 0.063202382 0.9683988
[98,] 0.023083322 0.046166645 0.9769167
[99,] 0.017026214 0.034052428 0.9829738
[100,] 0.012686372 0.025372745 0.9873136
[101,] 0.009248332 0.018496663 0.9907517
[102,] 0.006960572 0.013921144 0.9930394
[103,] 0.006216975 0.012433950 0.9937830
[104,] 0.006184193 0.012368386 0.9938158
[105,] 0.007094437 0.014188873 0.9929056
[106,] 0.006420601 0.012841201 0.9935794
[107,] 0.004210678 0.008421355 0.9957893
[108,] 0.039869272 0.079738543 0.9601307
[109,] 0.038435060 0.076870120 0.9615649
[110,] 0.097665399 0.195330798 0.9023346
[111,] 0.202350467 0.404700934 0.7976495
[112,] 0.158085530 0.316171061 0.8419145
[113,] 0.185153499 0.370306998 0.8148465
[114,] 0.155052887 0.310105775 0.8449471
[115,] 0.326634384 0.653268768 0.6733656
[116,] 0.417835146 0.835670293 0.5821649
[117,] 0.440153266 0.880306531 0.5598467
[118,] 0.646335638 0.707328724 0.3536644
[119,] 0.583587707 0.832824586 0.4164123
[120,] 0.559120519 0.881758961 0.4408795
[121,] 0.586021109 0.827957782 0.4139789
[122,] 0.537159527 0.925680946 0.4628405
[123,] 0.642121867 0.715756266 0.3578781
[124,] 0.565403339 0.869193321 0.4345967
[125,] 0.455348838 0.910697675 0.5446512
[126,] 0.386583997 0.773167995 0.6134160
[127,] 0.262091917 0.524183834 0.7379081
[128,] 0.193339029 0.386678058 0.8066610
> postscript(file="/var/fisher/rcomp/tmp/15r5u1353431409.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/fisher/rcomp/tmp/23roa1353431409.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/fisher/rcomp/tmp/3mndm1353431409.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/fisher/rcomp/tmp/4apfo1353431409.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/fisher/rcomp/tmp/5obii1353431409.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 = 145
Frequency = 1
1 2 3 4 5
0.0099942330 -0.0365768746 -0.0882274908 -0.1091186275 -0.1676657137
6 7 8 9 10
-0.1778806960 -0.0805957745 1.0042134138 -1.0030873861 -0.0296875088
11 12 13 14 15
-0.0871399549 -0.1257299813 -0.1727722899 -0.1978648236 -0.2155103286
16 17 18 19 20
-0.1961267809 -0.2193689319 -0.2408475058 -0.1452472424 0.9299461336
21 22 23 24 25
-0.0219638253 0.0216775945 0.0011049823 -0.0010828880 -0.0038148399
26 27 28 29 30
0.9797097564 -0.0345803576 -0.0620239055 -0.0679914602 0.9320085398
31 32 33 34 35
0.1337513374 -0.8040815784 0.2130272933 0.1634262056 0.1361063422
36 37 38 39 40
0.1168096002 0.1308910725 0.1250892425 0.1018470916 -0.9104269152
41 42 43 44 45
1.0484663196 0.0606080228 -0.7655235922 0.2707088487 0.2860936028
46 47 48 49 50
-0.7668628758 -0.7874519938 0.2076307647 0.2217122371 0.2022497704
51 52 53 54 55
-0.8705145493 0.0456636004 -0.0006155174 0.0381376529 0.2754079525
56 57 58 59 60
0.3575820235 0.3470715938 0.2178491758 0.1476116239 -0.8840853900
61 62 63 64 65
0.0862002823 -0.9172874123 0.0737210914 0.0573754105 0.0471209687
66 67 68 69 70
0.0347601563 0.2170808235 0.2585224957 0.2602466132 0.1994747779
71 72 73 74 75
-0.8577750648 0.1039268986 0.0760998323 0.0658848500 0.0394899114
76 77 78 79 80
0.0415988628 0.0238973924 -0.0022529026 0.1094913153 0.1095702343
81 82 83 84 85
0.1115897992 1.0612898111 0.0215731334 -1.0343309488 -0.0319430558
86 87 88 89 90
-0.0548897594 -0.0692158753 -0.0653459277 -0.1048943000 -0.1764421436
91 92 93 94 95
-0.0860142327 0.9088923337 -0.1127879668 -0.1167754160 -0.1380743402
96 97 98 99 100
-0.1502720087 -0.1714191334 0.7843607732 -0.2498495220 -0.2557776171
101 102 103 104 105
-0.2818679563 0.7427634053 -1.1101375146 0.9284525118 -0.0686333058
106 107 108 109 110
-0.1161293383 -0.1349557562 -0.1234444073 -0.0800572716 -0.0529394786
111 112 113 114 115
-0.0436494211 -0.0689085563 0.8999944767 -0.0786935509 0.0673543392
116 117 118 119 120
1.1084242257 0.1214245445 -0.9416245475 1.0440090002 0.0531601828
121 122 123 124 125
-0.9287569705 0.0763759226 -0.9399697583 1.0430945428 0.0177968251
126 127 128 129 130
0.0168653289 0.1020814278 -0.8784166461 -0.8845438870 0.0473275124
131 132 133 134 135
0.9864662907 -0.0878169624 -0.1385626171 -0.1879919418 -0.2166615564
136 137 138 139 140
-0.2134185055 0.7614126227 0.7678847994 -0.0942636048 -1.0608064715
141 142 143 144 145
-0.0479718773 -0.1044199467 -0.1300131119 -0.1605365668 0.8415550019
> postscript(file="/var/fisher/rcomp/tmp/6sjv61353431409.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 = 145
Frequency = 1
lag(myerror, k = 1) myerror
0 0.0099942330 NA
1 -0.0365768746 0.0099942330
2 -0.0882274908 -0.0365768746
3 -0.1091186275 -0.0882274908
4 -0.1676657137 -0.1091186275
5 -0.1778806960 -0.1676657137
6 -0.0805957745 -0.1778806960
7 1.0042134138 -0.0805957745
8 -1.0030873861 1.0042134138
9 -0.0296875088 -1.0030873861
10 -0.0871399549 -0.0296875088
11 -0.1257299813 -0.0871399549
12 -0.1727722899 -0.1257299813
13 -0.1978648236 -0.1727722899
14 -0.2155103286 -0.1978648236
15 -0.1961267809 -0.2155103286
16 -0.2193689319 -0.1961267809
17 -0.2408475058 -0.2193689319
18 -0.1452472424 -0.2408475058
19 0.9299461336 -0.1452472424
20 -0.0219638253 0.9299461336
21 0.0216775945 -0.0219638253
22 0.0011049823 0.0216775945
23 -0.0010828880 0.0011049823
24 -0.0038148399 -0.0010828880
25 0.9797097564 -0.0038148399
26 -0.0345803576 0.9797097564
27 -0.0620239055 -0.0345803576
28 -0.0679914602 -0.0620239055
29 0.9320085398 -0.0679914602
30 0.1337513374 0.9320085398
31 -0.8040815784 0.1337513374
32 0.2130272933 -0.8040815784
33 0.1634262056 0.2130272933
34 0.1361063422 0.1634262056
35 0.1168096002 0.1361063422
36 0.1308910725 0.1168096002
37 0.1250892425 0.1308910725
38 0.1018470916 0.1250892425
39 -0.9104269152 0.1018470916
40 1.0484663196 -0.9104269152
41 0.0606080228 1.0484663196
42 -0.7655235922 0.0606080228
43 0.2707088487 -0.7655235922
44 0.2860936028 0.2707088487
45 -0.7668628758 0.2860936028
46 -0.7874519938 -0.7668628758
47 0.2076307647 -0.7874519938
48 0.2217122371 0.2076307647
49 0.2022497704 0.2217122371
50 -0.8705145493 0.2022497704
51 0.0456636004 -0.8705145493
52 -0.0006155174 0.0456636004
53 0.0381376529 -0.0006155174
54 0.2754079525 0.0381376529
55 0.3575820235 0.2754079525
56 0.3470715938 0.3575820235
57 0.2178491758 0.3470715938
58 0.1476116239 0.2178491758
59 -0.8840853900 0.1476116239
60 0.0862002823 -0.8840853900
61 -0.9172874123 0.0862002823
62 0.0737210914 -0.9172874123
63 0.0573754105 0.0737210914
64 0.0471209687 0.0573754105
65 0.0347601563 0.0471209687
66 0.2170808235 0.0347601563
67 0.2585224957 0.2170808235
68 0.2602466132 0.2585224957
69 0.1994747779 0.2602466132
70 -0.8577750648 0.1994747779
71 0.1039268986 -0.8577750648
72 0.0760998323 0.1039268986
73 0.0658848500 0.0760998323
74 0.0394899114 0.0658848500
75 0.0415988628 0.0394899114
76 0.0238973924 0.0415988628
77 -0.0022529026 0.0238973924
78 0.1094913153 -0.0022529026
79 0.1095702343 0.1094913153
80 0.1115897992 0.1095702343
81 1.0612898111 0.1115897992
82 0.0215731334 1.0612898111
83 -1.0343309488 0.0215731334
84 -0.0319430558 -1.0343309488
85 -0.0548897594 -0.0319430558
86 -0.0692158753 -0.0548897594
87 -0.0653459277 -0.0692158753
88 -0.1048943000 -0.0653459277
89 -0.1764421436 -0.1048943000
90 -0.0860142327 -0.1764421436
91 0.9088923337 -0.0860142327
92 -0.1127879668 0.9088923337
93 -0.1167754160 -0.1127879668
94 -0.1380743402 -0.1167754160
95 -0.1502720087 -0.1380743402
96 -0.1714191334 -0.1502720087
97 0.7843607732 -0.1714191334
98 -0.2498495220 0.7843607732
99 -0.2557776171 -0.2498495220
100 -0.2818679563 -0.2557776171
101 0.7427634053 -0.2818679563
102 -1.1101375146 0.7427634053
103 0.9284525118 -1.1101375146
104 -0.0686333058 0.9284525118
105 -0.1161293383 -0.0686333058
106 -0.1349557562 -0.1161293383
107 -0.1234444073 -0.1349557562
108 -0.0800572716 -0.1234444073
109 -0.0529394786 -0.0800572716
110 -0.0436494211 -0.0529394786
111 -0.0689085563 -0.0436494211
112 0.8999944767 -0.0689085563
113 -0.0786935509 0.8999944767
114 0.0673543392 -0.0786935509
115 1.1084242257 0.0673543392
116 0.1214245445 1.1084242257
117 -0.9416245475 0.1214245445
118 1.0440090002 -0.9416245475
119 0.0531601828 1.0440090002
120 -0.9287569705 0.0531601828
121 0.0763759226 -0.9287569705
122 -0.9399697583 0.0763759226
123 1.0430945428 -0.9399697583
124 0.0177968251 1.0430945428
125 0.0168653289 0.0177968251
126 0.1020814278 0.0168653289
127 -0.8784166461 0.1020814278
128 -0.8845438870 -0.8784166461
129 0.0473275124 -0.8845438870
130 0.9864662907 0.0473275124
131 -0.0878169624 0.9864662907
132 -0.1385626171 -0.0878169624
133 -0.1879919418 -0.1385626171
134 -0.2166615564 -0.1879919418
135 -0.2134185055 -0.2166615564
136 0.7614126227 -0.2134185055
137 0.7678847994 0.7614126227
138 -0.0942636048 0.7678847994
139 -1.0608064715 -0.0942636048
140 -0.0479718773 -1.0608064715
141 -0.1044199467 -0.0479718773
142 -0.1300131119 -0.1044199467
143 -0.1605365668 -0.1300131119
144 0.8415550019 -0.1605365668
145 NA 0.8415550019
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.0365768746 0.0099942330
[2,] -0.0882274908 -0.0365768746
[3,] -0.1091186275 -0.0882274908
[4,] -0.1676657137 -0.1091186275
[5,] -0.1778806960 -0.1676657137
[6,] -0.0805957745 -0.1778806960
[7,] 1.0042134138 -0.0805957745
[8,] -1.0030873861 1.0042134138
[9,] -0.0296875088 -1.0030873861
[10,] -0.0871399549 -0.0296875088
[11,] -0.1257299813 -0.0871399549
[12,] -0.1727722899 -0.1257299813
[13,] -0.1978648236 -0.1727722899
[14,] -0.2155103286 -0.1978648236
[15,] -0.1961267809 -0.2155103286
[16,] -0.2193689319 -0.1961267809
[17,] -0.2408475058 -0.2193689319
[18,] -0.1452472424 -0.2408475058
[19,] 0.9299461336 -0.1452472424
[20,] -0.0219638253 0.9299461336
[21,] 0.0216775945 -0.0219638253
[22,] 0.0011049823 0.0216775945
[23,] -0.0010828880 0.0011049823
[24,] -0.0038148399 -0.0010828880
[25,] 0.9797097564 -0.0038148399
[26,] -0.0345803576 0.9797097564
[27,] -0.0620239055 -0.0345803576
[28,] -0.0679914602 -0.0620239055
[29,] 0.9320085398 -0.0679914602
[30,] 0.1337513374 0.9320085398
[31,] -0.8040815784 0.1337513374
[32,] 0.2130272933 -0.8040815784
[33,] 0.1634262056 0.2130272933
[34,] 0.1361063422 0.1634262056
[35,] 0.1168096002 0.1361063422
[36,] 0.1308910725 0.1168096002
[37,] 0.1250892425 0.1308910725
[38,] 0.1018470916 0.1250892425
[39,] -0.9104269152 0.1018470916
[40,] 1.0484663196 -0.9104269152
[41,] 0.0606080228 1.0484663196
[42,] -0.7655235922 0.0606080228
[43,] 0.2707088487 -0.7655235922
[44,] 0.2860936028 0.2707088487
[45,] -0.7668628758 0.2860936028
[46,] -0.7874519938 -0.7668628758
[47,] 0.2076307647 -0.7874519938
[48,] 0.2217122371 0.2076307647
[49,] 0.2022497704 0.2217122371
[50,] -0.8705145493 0.2022497704
[51,] 0.0456636004 -0.8705145493
[52,] -0.0006155174 0.0456636004
[53,] 0.0381376529 -0.0006155174
[54,] 0.2754079525 0.0381376529
[55,] 0.3575820235 0.2754079525
[56,] 0.3470715938 0.3575820235
[57,] 0.2178491758 0.3470715938
[58,] 0.1476116239 0.2178491758
[59,] -0.8840853900 0.1476116239
[60,] 0.0862002823 -0.8840853900
[61,] -0.9172874123 0.0862002823
[62,] 0.0737210914 -0.9172874123
[63,] 0.0573754105 0.0737210914
[64,] 0.0471209687 0.0573754105
[65,] 0.0347601563 0.0471209687
[66,] 0.2170808235 0.0347601563
[67,] 0.2585224957 0.2170808235
[68,] 0.2602466132 0.2585224957
[69,] 0.1994747779 0.2602466132
[70,] -0.8577750648 0.1994747779
[71,] 0.1039268986 -0.8577750648
[72,] 0.0760998323 0.1039268986
[73,] 0.0658848500 0.0760998323
[74,] 0.0394899114 0.0658848500
[75,] 0.0415988628 0.0394899114
[76,] 0.0238973924 0.0415988628
[77,] -0.0022529026 0.0238973924
[78,] 0.1094913153 -0.0022529026
[79,] 0.1095702343 0.1094913153
[80,] 0.1115897992 0.1095702343
[81,] 1.0612898111 0.1115897992
[82,] 0.0215731334 1.0612898111
[83,] -1.0343309488 0.0215731334
[84,] -0.0319430558 -1.0343309488
[85,] -0.0548897594 -0.0319430558
[86,] -0.0692158753 -0.0548897594
[87,] -0.0653459277 -0.0692158753
[88,] -0.1048943000 -0.0653459277
[89,] -0.1764421436 -0.1048943000
[90,] -0.0860142327 -0.1764421436
[91,] 0.9088923337 -0.0860142327
[92,] -0.1127879668 0.9088923337
[93,] -0.1167754160 -0.1127879668
[94,] -0.1380743402 -0.1167754160
[95,] -0.1502720087 -0.1380743402
[96,] -0.1714191334 -0.1502720087
[97,] 0.7843607732 -0.1714191334
[98,] -0.2498495220 0.7843607732
[99,] -0.2557776171 -0.2498495220
[100,] -0.2818679563 -0.2557776171
[101,] 0.7427634053 -0.2818679563
[102,] -1.1101375146 0.7427634053
[103,] 0.9284525118 -1.1101375146
[104,] -0.0686333058 0.9284525118
[105,] -0.1161293383 -0.0686333058
[106,] -0.1349557562 -0.1161293383
[107,] -0.1234444073 -0.1349557562
[108,] -0.0800572716 -0.1234444073
[109,] -0.0529394786 -0.0800572716
[110,] -0.0436494211 -0.0529394786
[111,] -0.0689085563 -0.0436494211
[112,] 0.8999944767 -0.0689085563
[113,] -0.0786935509 0.8999944767
[114,] 0.0673543392 -0.0786935509
[115,] 1.1084242257 0.0673543392
[116,] 0.1214245445 1.1084242257
[117,] -0.9416245475 0.1214245445
[118,] 1.0440090002 -0.9416245475
[119,] 0.0531601828 1.0440090002
[120,] -0.9287569705 0.0531601828
[121,] 0.0763759226 -0.9287569705
[122,] -0.9399697583 0.0763759226
[123,] 1.0430945428 -0.9399697583
[124,] 0.0177968251 1.0430945428
[125,] 0.0168653289 0.0177968251
[126,] 0.1020814278 0.0168653289
[127,] -0.8784166461 0.1020814278
[128,] -0.8845438870 -0.8784166461
[129,] 0.0473275124 -0.8845438870
[130,] 0.9864662907 0.0473275124
[131,] -0.0878169624 0.9864662907
[132,] -0.1385626171 -0.0878169624
[133,] -0.1879919418 -0.1385626171
[134,] -0.2166615564 -0.1879919418
[135,] -0.2134185055 -0.2166615564
[136,] 0.7614126227 -0.2134185055
[137,] 0.7678847994 0.7614126227
[138,] -0.0942636048 0.7678847994
[139,] -1.0608064715 -0.0942636048
[140,] -0.0479718773 -1.0608064715
[141,] -0.1044199467 -0.0479718773
[142,] -0.1300131119 -0.1044199467
[143,] -0.1605365668 -0.1300131119
[144,] 0.8415550019 -0.1605365668
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.0365768746 0.0099942330
2 -0.0882274908 -0.0365768746
3 -0.1091186275 -0.0882274908
4 -0.1676657137 -0.1091186275
5 -0.1778806960 -0.1676657137
6 -0.0805957745 -0.1778806960
7 1.0042134138 -0.0805957745
8 -1.0030873861 1.0042134138
9 -0.0296875088 -1.0030873861
10 -0.0871399549 -0.0296875088
11 -0.1257299813 -0.0871399549
12 -0.1727722899 -0.1257299813
13 -0.1978648236 -0.1727722899
14 -0.2155103286 -0.1978648236
15 -0.1961267809 -0.2155103286
16 -0.2193689319 -0.1961267809
17 -0.2408475058 -0.2193689319
18 -0.1452472424 -0.2408475058
19 0.9299461336 -0.1452472424
20 -0.0219638253 0.9299461336
21 0.0216775945 -0.0219638253
22 0.0011049823 0.0216775945
23 -0.0010828880 0.0011049823
24 -0.0038148399 -0.0010828880
25 0.9797097564 -0.0038148399
26 -0.0345803576 0.9797097564
27 -0.0620239055 -0.0345803576
28 -0.0679914602 -0.0620239055
29 0.9320085398 -0.0679914602
30 0.1337513374 0.9320085398
31 -0.8040815784 0.1337513374
32 0.2130272933 -0.8040815784
33 0.1634262056 0.2130272933
34 0.1361063422 0.1634262056
35 0.1168096002 0.1361063422
36 0.1308910725 0.1168096002
37 0.1250892425 0.1308910725
38 0.1018470916 0.1250892425
39 -0.9104269152 0.1018470916
40 1.0484663196 -0.9104269152
41 0.0606080228 1.0484663196
42 -0.7655235922 0.0606080228
43 0.2707088487 -0.7655235922
44 0.2860936028 0.2707088487
45 -0.7668628758 0.2860936028
46 -0.7874519938 -0.7668628758
47 0.2076307647 -0.7874519938
48 0.2217122371 0.2076307647
49 0.2022497704 0.2217122371
50 -0.8705145493 0.2022497704
51 0.0456636004 -0.8705145493
52 -0.0006155174 0.0456636004
53 0.0381376529 -0.0006155174
54 0.2754079525 0.0381376529
55 0.3575820235 0.2754079525
56 0.3470715938 0.3575820235
57 0.2178491758 0.3470715938
58 0.1476116239 0.2178491758
59 -0.8840853900 0.1476116239
60 0.0862002823 -0.8840853900
61 -0.9172874123 0.0862002823
62 0.0737210914 -0.9172874123
63 0.0573754105 0.0737210914
64 0.0471209687 0.0573754105
65 0.0347601563 0.0471209687
66 0.2170808235 0.0347601563
67 0.2585224957 0.2170808235
68 0.2602466132 0.2585224957
69 0.1994747779 0.2602466132
70 -0.8577750648 0.1994747779
71 0.1039268986 -0.8577750648
72 0.0760998323 0.1039268986
73 0.0658848500 0.0760998323
74 0.0394899114 0.0658848500
75 0.0415988628 0.0394899114
76 0.0238973924 0.0415988628
77 -0.0022529026 0.0238973924
78 0.1094913153 -0.0022529026
79 0.1095702343 0.1094913153
80 0.1115897992 0.1095702343
81 1.0612898111 0.1115897992
82 0.0215731334 1.0612898111
83 -1.0343309488 0.0215731334
84 -0.0319430558 -1.0343309488
85 -0.0548897594 -0.0319430558
86 -0.0692158753 -0.0548897594
87 -0.0653459277 -0.0692158753
88 -0.1048943000 -0.0653459277
89 -0.1764421436 -0.1048943000
90 -0.0860142327 -0.1764421436
91 0.9088923337 -0.0860142327
92 -0.1127879668 0.9088923337
93 -0.1167754160 -0.1127879668
94 -0.1380743402 -0.1167754160
95 -0.1502720087 -0.1380743402
96 -0.1714191334 -0.1502720087
97 0.7843607732 -0.1714191334
98 -0.2498495220 0.7843607732
99 -0.2557776171 -0.2498495220
100 -0.2818679563 -0.2557776171
101 0.7427634053 -0.2818679563
102 -1.1101375146 0.7427634053
103 0.9284525118 -1.1101375146
104 -0.0686333058 0.9284525118
105 -0.1161293383 -0.0686333058
106 -0.1349557562 -0.1161293383
107 -0.1234444073 -0.1349557562
108 -0.0800572716 -0.1234444073
109 -0.0529394786 -0.0800572716
110 -0.0436494211 -0.0529394786
111 -0.0689085563 -0.0436494211
112 0.8999944767 -0.0689085563
113 -0.0786935509 0.8999944767
114 0.0673543392 -0.0786935509
115 1.1084242257 0.0673543392
116 0.1214245445 1.1084242257
117 -0.9416245475 0.1214245445
118 1.0440090002 -0.9416245475
119 0.0531601828 1.0440090002
120 -0.9287569705 0.0531601828
121 0.0763759226 -0.9287569705
122 -0.9399697583 0.0763759226
123 1.0430945428 -0.9399697583
124 0.0177968251 1.0430945428
125 0.0168653289 0.0177968251
126 0.1020814278 0.0168653289
127 -0.8784166461 0.1020814278
128 -0.8845438870 -0.8784166461
129 0.0473275124 -0.8845438870
130 0.9864662907 0.0473275124
131 -0.0878169624 0.9864662907
132 -0.1385626171 -0.0878169624
133 -0.1879919418 -0.1385626171
134 -0.2166615564 -0.1879919418
135 -0.2134185055 -0.2166615564
136 0.7614126227 -0.2134185055
137 0.7678847994 0.7614126227
138 -0.0942636048 0.7678847994
139 -1.0608064715 -0.0942636048
140 -0.0479718773 -1.0608064715
141 -0.1044199467 -0.0479718773
142 -0.1300131119 -0.1044199467
143 -0.1605365668 -0.1300131119
144 0.8415550019 -0.1605365668
> 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/fisher/rcomp/tmp/7h8l71353431409.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/fisher/rcomp/tmp/8xl841353431409.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/fisher/rcomp/tmp/9orsg1353431409.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/fisher/rcomp/tmp/10cvqb1353431409.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/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/fisher/rcomp/tmp/11z6el1353431409.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/fisher/rcomp/tmp/12gssd1353431409.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/fisher/rcomp/tmp/13t0ru1353431410.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/fisher/rcomp/tmp/14wghb1353431410.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/fisher/rcomp/tmp/15l8t71353431410.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/fisher/rcomp/tmp/162pxb1353431410.tab")
+ }
>
> try(system("convert tmp/15r5u1353431409.ps tmp/15r5u1353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/23roa1353431409.ps tmp/23roa1353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/3mndm1353431409.ps tmp/3mndm1353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/4apfo1353431409.ps tmp/4apfo1353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/5obii1353431409.ps tmp/5obii1353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/6sjv61353431409.ps tmp/6sjv61353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/7h8l71353431409.ps tmp/7h8l71353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/8xl841353431409.ps tmp/8xl841353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/9orsg1353431409.ps tmp/9orsg1353431409.png",intern=TRUE))
character(0)
> try(system("convert tmp/10cvqb1353431409.ps tmp/10cvqb1353431409.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
8.608 1.471 10.088