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(476000
+ ,113000
+ ,363000
+ ,475000
+ ,110000
+ ,364000
+ ,470000
+ ,107000
+ ,363000
+ ,461000
+ ,103000
+ ,358000
+ ,455000
+ ,98000
+ ,357000
+ ,456000
+ ,98000
+ ,357000
+ ,517000
+ ,137000
+ ,380000
+ ,525000
+ ,148000
+ ,378000
+ ,523000
+ ,147000
+ ,376000
+ ,519000
+ ,139000
+ ,380000
+ ,509000
+ ,130000
+ ,379000
+ ,512000
+ ,128000
+ ,384000
+ ,519000
+ ,127000
+ ,392000
+ ,517000
+ ,123000
+ ,394000
+ ,510000
+ ,118000
+ ,392000
+ ,509000
+ ,114000
+ ,396000
+ ,501000
+ ,108000
+ ,392000
+ ,507000
+ ,111000
+ ,396000
+ ,569000
+ ,151000
+ ,419000
+ ,580000
+ ,159000
+ ,421000
+ ,578000
+ ,158000
+ ,420000
+ ,565000
+ ,148000
+ ,418000
+ ,547000
+ ,138000
+ ,410000
+ ,555000
+ ,137000
+ ,418000
+ ,562000
+ ,136000
+ ,426000
+ ,561000
+ ,133000
+ ,428000
+ ,555000
+ ,126000
+ ,430000
+ ,544000
+ ,120000
+ ,424000
+ ,537000
+ ,114000
+ ,423000
+ ,543000
+ ,116000
+ ,427000
+ ,594000
+ ,153000
+ ,441000
+ ,611000
+ ,162000
+ ,449000
+ ,613000
+ ,161000
+ ,452000
+ ,611000
+ ,149000
+ ,462000
+ ,594000
+ ,139000
+ ,455000
+ ,595000
+ ,135000
+ ,461000
+ ,591000
+ ,130000
+ ,461000
+ ,589000
+ ,127000
+ ,463000
+ ,584000
+ ,122000
+ ,462000
+ ,573000
+ ,117000
+ ,456000
+ ,567000
+ ,112000
+ ,455000
+ ,569000
+ ,113000
+ ,456000
+ ,621000
+ ,149000
+ ,472000
+ ,629000
+ ,157000
+ ,472000
+ ,628000
+ ,157000
+ ,471000
+ ,612000
+ ,147000
+ ,465000
+ ,595000
+ ,137000
+ ,459000
+ ,597000
+ ,132000
+ ,465000
+ ,593000
+ ,125000
+ ,468000
+ ,590000
+ ,123000
+ ,467000
+ ,580000
+ ,117000
+ ,463000
+ ,574000
+ ,114000
+ ,460000
+ ,573000
+ ,111000
+ ,462000
+ ,573000
+ ,112000
+ ,461000
+ ,620000
+ ,144000
+ ,476000
+ ,626000
+ ,150000
+ ,476000
+ ,620000
+ ,149000
+ ,471000
+ ,588000
+ ,134000
+ ,453000
+ ,566000
+ ,123000
+ ,443000
+ ,557000
+ ,116000
+ ,442000
+ ,561000
+ ,117000
+ ,444000
+ ,549000
+ ,111000
+ ,438000
+ ,532000
+ ,105000
+ ,427000
+ ,526000
+ ,102000
+ ,424000
+ ,511000
+ ,95000
+ ,416000
+ ,499000
+ ,93000
+ ,406000
+ ,555000
+ ,124000
+ ,431000
+ ,565000
+ ,130000
+ ,434000
+ ,542000
+ ,124000
+ ,418000
+ ,527000
+ ,115000
+ ,412000
+ ,510000
+ ,106000
+ ,404000
+ ,514000
+ ,105000
+ ,409000
+ ,517000
+ ,105000
+ ,412000
+ ,508000
+ ,101000
+ ,406000
+ ,493000
+ ,95000
+ ,398000
+ ,490000
+ ,93000
+ ,397000
+ ,469000
+ ,84000
+ ,385000
+ ,478000
+ ,87000
+ ,390000
+ ,528000
+ ,116000
+ ,413000
+ ,534000
+ ,120000
+ ,413000
+ ,518000
+ ,117000
+ ,401000
+ ,506000
+ ,109000
+ ,397000
+ ,502000
+ ,105000
+ ,397000
+ ,516000
+ ,107000
+ ,409000
+ ,528000
+ ,109000
+ ,419000
+ ,533000
+ ,109000
+ ,424000
+ ,536000
+ ,108000
+ ,428000
+ ,537000
+ ,107000
+ ,430000
+ ,524000
+ ,99000
+ ,424000
+ ,536000
+ ,103000
+ ,433000
+ ,587000
+ ,131000
+ ,456000
+ ,597000
+ ,137000
+ ,459000
+ ,581000
+ ,135000
+ ,446000
+ ,564000
+ ,124000
+ ,441000
+ ,558000
+ ,118000
+ ,439000
+ ,575000
+ ,121000
+ ,454000
+ ,580000
+ ,121000
+ ,460000
+ ,575000
+ ,118000
+ ,457000
+ ,563000
+ ,113000
+ ,451000
+ ,552000
+ ,107000
+ ,444000
+ ,537000
+ ,100000
+ ,437000
+ ,545000
+ ,102000
+ ,443000
+ ,601000
+ ,130000
+ ,471000
+ ,604000
+ ,136000
+ ,469000
+ ,586000
+ ,133000
+ ,454000
+ ,564000
+ ,120000
+ ,444000
+ ,549000
+ ,112000
+ ,436000
+ ,551000
+ ,109000
+ ,442000
+ ,556000
+ ,110000
+ ,446000
+ ,548000
+ ,106000
+ ,442000
+ ,540000
+ ,102000
+ ,438000
+ ,531000
+ ,98000
+ ,433000
+ ,521000
+ ,92000
+ ,428000
+ ,519000
+ ,92000
+ ,426000
+ ,572000
+ ,120000
+ ,452000
+ ,581000
+ ,127000
+ ,455000
+ ,563000
+ ,124000
+ ,439000
+ ,548000
+ ,114000
+ ,434000
+ ,539000
+ ,108000
+ ,431000
+ ,541000
+ ,106000
+ ,435000
+ ,562000
+ ,111000
+ ,450000
+ ,559000
+ ,110000
+ ,449000
+ ,546000
+ ,104000
+ ,442000
+ ,536000
+ ,100000
+ ,437000
+ ,528000
+ ,96000
+ ,431000
+ ,530000
+ ,98000
+ ,433000
+ ,582000
+ ,122000
+ ,460000
+ ,599000
+ ,134000
+ ,465000
+ ,584000
+ ,133000
+ ,451000
+ ,571000
+ ,125000
+ ,447000)
+ ,dim=c(3
+ ,130)
+ ,dimnames=list(c('Totaal'
+ ,'jongerdan25jaar'
+ ,'vanaf25jaar')
+ ,1:130))
> y <- array(NA,dim=c(3,130),dimnames=list(c('Totaal','jongerdan25jaar','vanaf25jaar'),1:130))
> 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'
> 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 jongerdan25jaar vanaf25jaar
1 476000 113000 363000
2 475000 110000 364000
3 470000 107000 363000
4 461000 103000 358000
5 455000 98000 357000
6 456000 98000 357000
7 517000 137000 380000
8 525000 148000 378000
9 523000 147000 376000
10 519000 139000 380000
11 509000 130000 379000
12 512000 128000 384000
13 519000 127000 392000
14 517000 123000 394000
15 510000 118000 392000
16 509000 114000 396000
17 501000 108000 392000
18 507000 111000 396000
19 569000 151000 419000
20 580000 159000 421000
21 578000 158000 420000
22 565000 148000 418000
23 547000 138000 410000
24 555000 137000 418000
25 562000 136000 426000
26 561000 133000 428000
27 555000 126000 430000
28 544000 120000 424000
29 537000 114000 423000
30 543000 116000 427000
31 594000 153000 441000
32 611000 162000 449000
33 613000 161000 452000
34 611000 149000 462000
35 594000 139000 455000
36 595000 135000 461000
37 591000 130000 461000
38 589000 127000 463000
39 584000 122000 462000
40 573000 117000 456000
41 567000 112000 455000
42 569000 113000 456000
43 621000 149000 472000
44 629000 157000 472000
45 628000 157000 471000
46 612000 147000 465000
47 595000 137000 459000
48 597000 132000 465000
49 593000 125000 468000
50 590000 123000 467000
51 580000 117000 463000
52 574000 114000 460000
53 573000 111000 462000
54 573000 112000 461000
55 620000 144000 476000
56 626000 150000 476000
57 620000 149000 471000
58 588000 134000 453000
59 566000 123000 443000
60 557000 116000 442000
61 561000 117000 444000
62 549000 111000 438000
63 532000 105000 427000
64 526000 102000 424000
65 511000 95000 416000
66 499000 93000 406000
67 555000 124000 431000
68 565000 130000 434000
69 542000 124000 418000
70 527000 115000 412000
71 510000 106000 404000
72 514000 105000 409000
73 517000 105000 412000
74 508000 101000 406000
75 493000 95000 398000
76 490000 93000 397000
77 469000 84000 385000
78 478000 87000 390000
79 528000 116000 413000
80 534000 120000 413000
81 518000 117000 401000
82 506000 109000 397000
83 502000 105000 397000
84 516000 107000 409000
85 528000 109000 419000
86 533000 109000 424000
87 536000 108000 428000
88 537000 107000 430000
89 524000 99000 424000
90 536000 103000 433000
91 587000 131000 456000
92 597000 137000 459000
93 581000 135000 446000
94 564000 124000 441000
95 558000 118000 439000
96 575000 121000 454000
97 580000 121000 460000
98 575000 118000 457000
99 563000 113000 451000
100 552000 107000 444000
101 537000 100000 437000
102 545000 102000 443000
103 601000 130000 471000
104 604000 136000 469000
105 586000 133000 454000
106 564000 120000 444000
107 549000 112000 436000
108 551000 109000 442000
109 556000 110000 446000
110 548000 106000 442000
111 540000 102000 438000
112 531000 98000 433000
113 521000 92000 428000
114 519000 92000 426000
115 572000 120000 452000
116 581000 127000 455000
117 563000 124000 439000
118 548000 114000 434000
119 539000 108000 431000
120 541000 106000 435000
121 562000 111000 450000
122 559000 110000 449000
123 546000 104000 442000
124 536000 100000 437000
125 528000 96000 431000
126 530000 98000 433000
127 582000 122000 460000
128 599000 134000 465000
129 584000 133000 451000
130 571000 125000 447000
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) jongerdan25jaar vanaf25jaar
1346.8859 0.9927 0.9989
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1135.41 -111.29 1.63 155.64 1179.38
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.347e+03 6.733e+02 2.0 0.0476 *
jongerdan25jaar 9.927e-01 2.759e-03 359.8 <2e-16 ***
vanaf25jaar 9.989e-01 1.650e-03 605.3 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 519.3 on 127 degrees of freedom
Multiple R-squared: 0.9998, Adjusted R-squared: 0.9998
F-statistic: 3.673e+05 on 2 and 127 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.757665802 0.484668396 0.2423342
[2,] 0.637551052 0.724897897 0.3624489
[3,] 0.507123017 0.985753965 0.4928770
[4,] 0.634686213 0.730627574 0.3653138
[5,] 0.519935186 0.960129628 0.4800648
[6,] 0.422250653 0.844501307 0.5777493
[7,] 0.340335126 0.680670251 0.6596649
[8,] 0.262137621 0.524275242 0.7378624
[9,] 0.193767469 0.387534939 0.8062325
[10,] 0.139788523 0.279577045 0.8602115
[11,] 0.336651304 0.673302608 0.6633487
[12,] 0.540274729 0.919450542 0.4597253
[13,] 0.461823176 0.923646353 0.5381768
[14,] 0.431600168 0.863200335 0.5683998
[15,] 0.488942355 0.977884710 0.5110576
[16,] 0.479501682 0.959003364 0.5204983
[17,] 0.515810237 0.968379525 0.4841898
[18,] 0.578966874 0.842066252 0.4210331
[19,] 0.541583628 0.916832743 0.4584164
[20,] 0.499092992 0.998185984 0.5009070
[21,] 0.445960508 0.891921015 0.5540395
[22,] 0.540210609 0.919578783 0.4597894
[23,] 0.484344422 0.968688844 0.5156556
[24,] 0.423661613 0.847323225 0.5763384
[25,] 0.366090053 0.732180105 0.6339099
[26,] 0.364471467 0.728942933 0.6355285
[27,] 0.367391460 0.734782920 0.6326085
[28,] 0.352460770 0.704921539 0.6475392
[29,] 0.317231385 0.634462770 0.6827686
[30,] 0.272391466 0.544782931 0.7276085
[31,] 0.346772604 0.693545207 0.6532274
[32,] 0.302006686 0.604013371 0.6979933
[33,] 0.374064212 0.748128424 0.6259358
[34,] 0.330193125 0.660386249 0.6698069
[35,] 0.284101930 0.568203861 0.7158981
[36,] 0.239618101 0.479236203 0.7603819
[37,] 0.199373210 0.398746419 0.8006268
[38,] 0.179867218 0.359734436 0.8201328
[39,] 0.163909741 0.327819483 0.8360903
[40,] 0.146462642 0.292925284 0.8535374
[41,] 0.124558191 0.249116381 0.8754418
[42,] 0.170506945 0.341013890 0.8294931
[43,] 0.142426687 0.284853375 0.8575733
[44,] 0.116278112 0.232556224 0.8837219
[45,] 0.093327140 0.186654280 0.9066729
[46,] 0.073293409 0.146586818 0.9267066
[47,] 0.056591570 0.113183140 0.9434084
[48,] 0.043025554 0.086051107 0.9569744
[49,] 0.032252335 0.064504671 0.9677477
[50,] 0.025733657 0.051467314 0.9742663
[51,] 0.020819707 0.041639414 0.9791803
[52,] 0.016554368 0.033108737 0.9834456
[53,] 0.055407536 0.110815073 0.9445925
[54,] 0.042500637 0.085001273 0.9574994
[55,] 0.083554404 0.167108809 0.9164456
[56,] 0.065517116 0.131034231 0.9344829
[57,] 0.050619604 0.101239208 0.9493804
[58,] 0.038787754 0.077575508 0.9612122
[59,] 0.029468122 0.058936244 0.9705319
[60,] 0.022518694 0.045037388 0.9774813
[61,] 0.017286355 0.034572709 0.9827136
[62,] 0.012558824 0.025117649 0.9874412
[63,] 0.039002735 0.078005470 0.9609973
[64,] 0.029520277 0.059040554 0.9704797
[65,] 0.021906499 0.043812998 0.9780935
[66,] 0.016242150 0.032484300 0.9837579
[67,] 0.011903788 0.023807576 0.9880962
[68,] 0.008606127 0.017212253 0.9913939
[69,] 0.015343011 0.030686021 0.9846570
[70,] 0.011707589 0.023415178 0.9882924
[71,] 0.009025055 0.018050111 0.9909749
[72,] 0.007763851 0.015527703 0.9922361
[73,] 0.009921763 0.019843525 0.9900782
[74,] 0.025622230 0.051244461 0.9743778
[75,] 0.051941765 0.103883530 0.9480582
[76,] 0.039529305 0.079058611 0.9604707
[77,] 0.030191473 0.060382946 0.9698085
[78,] 0.023608180 0.047216359 0.9763918
[79,] 0.018268445 0.036536890 0.9817316
[80,] 0.013787837 0.027575675 0.9862122
[81,] 0.010242922 0.020485843 0.9897571
[82,] 0.007478518 0.014957035 0.9925215
[83,] 0.005386963 0.010773927 0.9946130
[84,] 0.007824156 0.015648311 0.9921758
[85,] 0.005551929 0.011103859 0.9944481
[86,] 0.003957932 0.007915863 0.9960421
[87,] 0.022825440 0.045650881 0.9771746
[88,] 0.018085423 0.036170845 0.9819146
[89,] 0.032833256 0.065666512 0.9671667
[90,] 0.069989864 0.139979728 0.9300101
[91,] 0.055151951 0.110303902 0.9448480
[92,] 0.079024787 0.158049574 0.9209752
[93,] 0.061046598 0.122093196 0.9389534
[94,] 0.110958165 0.221916329 0.8890418
[95,] 0.174495316 0.348990631 0.8255047
[96,] 0.142542385 0.285084769 0.8574576
[97,] 0.113376484 0.226752968 0.8866235
[98,] 0.100733091 0.201466183 0.8992669
[99,] 0.102091077 0.204182155 0.8979089
[100,] 0.120033193 0.240066386 0.8799668
[101,] 0.091055843 0.182111686 0.9089442
[102,] 0.167096961 0.334193922 0.8329030
[103,] 0.128053422 0.256106844 0.8719466
[104,] 0.095405415 0.190810829 0.9045946
[105,] 0.069518162 0.139036325 0.9304818
[106,] 0.050026620 0.100053240 0.9499734
[107,] 0.036083284 0.072166569 0.9639167
[108,] 0.044561118 0.089122235 0.9554389
[109,] 0.072547225 0.145094450 0.9274528
[110,] 0.049556081 0.099112163 0.9504439
[111,] 0.082167720 0.164335441 0.9178323
[112,] 0.058467200 0.116934401 0.9415328
[113,] 0.041091096 0.082182191 0.9589089
[114,] 0.029798323 0.059596646 0.9702017
[115,] 0.019377611 0.038755222 0.9806224
[116,] 0.044501932 0.089003865 0.9554981
[117,] 0.024156118 0.048312237 0.9758439
[118,] 0.012303106 0.024606212 0.9876969
[119,] 0.019977812 0.039955623 0.9800222
> postscript(file="/var/fisher/rcomp/tmp/1szn21353447490.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/2v1ck1353447490.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/3sxo61353447490.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/48erj1353447490.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/5cuh41353447490.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 = 130
Frequency = 1
1 2 3 4 5
-105.8241095 873.3922938 -149.6785558 -184.6329856 -222.3219839
6 7 8 9 10
777.6780161 89.0353253 -832.8521093 157.5515634 103.6534741
11 12 13 14 15
36.7281782 27.8281616 29.6680988 2.7190541 -36.1135707
16 17 18 19 20
-1060.7753624 890.7956855 -82.7025856 -764.0362019 296.7236460
21 22 23 24 25
288.2709452 -787.1070516 -869.3468070 132.4931302 134.3330674
26 27 28 29 30
114.6930971 -934.1831707 15.1006243 -29.8974485 -10.7047939
31 32 33 34 35
275.7417286 350.6724096 346.7942146 270.5215864 189.4254574
36 37 38 39 40
-832.9490815 130.5055466 -889.1344237 73.1765779 29.7694473
41 42 43 44 45
-7.9195510 0.5331498 281.9578508 340.4304459 339.2868195
46 47 48 49 50
259.3343169 -820.6181856 149.6982011 101.9655598 86.2037845
51 52 53 54 55
37.7748325 12.4167300 -7.2232403 -1.0577924 249.9869847
56 57 58 59 60
293.8414310 280.8142244 1150.5928326 58.7567499 -993.5503973
61 62 63 64 65
16.0459300 -34.6702750 -91.1046122 -116.4627147 -176.7752469
66 67 68 69 70
-202.8296601 52.3423070 1099.6276326 37.4751632 -35.1682650
71 72 73 74 75
-110.0989460 -111.6898882 -108.2590088 855.6429350 -197.3605229
76 77 78 79 80
-213.1222981 -292.6274849 735.0178705 -1026.7155641 1002.5207334
81 82 83 84 85
-33.1300071 -96.1771079 -125.4134055 -97.0717394 -71.0173262
86 87 88 89 90
-65.2991939 -68.0337626 -73.0555841 861.6100622 -98.8610023
91 92 93 94 95
132.0964888 1179.3818144 149.8965219 -936.2214286 1017.6368722
96 97 98 99 100
56.7184920 -936.4197493 38.2221482 -1005.1849824 942.9551862
101 102 103 104 105
-116.2137197 -94.7338122 141.9418110 -816.4909955 -855.5726154
106 107 108 109 110
37.9731532 970.3515465 -44.7139180 -32.8303378 -66.6411411
111 112 113 114 115
-100.4519444 -135.4063742 815.0210473 812.7337944 47.1221647
116 117 118 119 120
-898.2834352 61.4913185 -17.3175576 -64.6028832 -74.6465262
121 122 123 124 125
979.0532424 -29.3994585 -81.2592899 -1116.2137197 847.6882241
126 127 128 129 130
-1135.4063742 70.8893251 164.3163499 140.9965053 -922.0505956
> postscript(file="/var/fisher/rcomp/tmp/6wy6i1353447490.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 = 130
Frequency = 1
lag(myerror, k = 1) myerror
0 -105.8241095 NA
1 873.3922938 -105.8241095
2 -149.6785558 873.3922938
3 -184.6329856 -149.6785558
4 -222.3219839 -184.6329856
5 777.6780161 -222.3219839
6 89.0353253 777.6780161
7 -832.8521093 89.0353253
8 157.5515634 -832.8521093
9 103.6534741 157.5515634
10 36.7281782 103.6534741
11 27.8281616 36.7281782
12 29.6680988 27.8281616
13 2.7190541 29.6680988
14 -36.1135707 2.7190541
15 -1060.7753624 -36.1135707
16 890.7956855 -1060.7753624
17 -82.7025856 890.7956855
18 -764.0362019 -82.7025856
19 296.7236460 -764.0362019
20 288.2709452 296.7236460
21 -787.1070516 288.2709452
22 -869.3468070 -787.1070516
23 132.4931302 -869.3468070
24 134.3330674 132.4931302
25 114.6930971 134.3330674
26 -934.1831707 114.6930971
27 15.1006243 -934.1831707
28 -29.8974485 15.1006243
29 -10.7047939 -29.8974485
30 275.7417286 -10.7047939
31 350.6724096 275.7417286
32 346.7942146 350.6724096
33 270.5215864 346.7942146
34 189.4254574 270.5215864
35 -832.9490815 189.4254574
36 130.5055466 -832.9490815
37 -889.1344237 130.5055466
38 73.1765779 -889.1344237
39 29.7694473 73.1765779
40 -7.9195510 29.7694473
41 0.5331498 -7.9195510
42 281.9578508 0.5331498
43 340.4304459 281.9578508
44 339.2868195 340.4304459
45 259.3343169 339.2868195
46 -820.6181856 259.3343169
47 149.6982011 -820.6181856
48 101.9655598 149.6982011
49 86.2037845 101.9655598
50 37.7748325 86.2037845
51 12.4167300 37.7748325
52 -7.2232403 12.4167300
53 -1.0577924 -7.2232403
54 249.9869847 -1.0577924
55 293.8414310 249.9869847
56 280.8142244 293.8414310
57 1150.5928326 280.8142244
58 58.7567499 1150.5928326
59 -993.5503973 58.7567499
60 16.0459300 -993.5503973
61 -34.6702750 16.0459300
62 -91.1046122 -34.6702750
63 -116.4627147 -91.1046122
64 -176.7752469 -116.4627147
65 -202.8296601 -176.7752469
66 52.3423070 -202.8296601
67 1099.6276326 52.3423070
68 37.4751632 1099.6276326
69 -35.1682650 37.4751632
70 -110.0989460 -35.1682650
71 -111.6898882 -110.0989460
72 -108.2590088 -111.6898882
73 855.6429350 -108.2590088
74 -197.3605229 855.6429350
75 -213.1222981 -197.3605229
76 -292.6274849 -213.1222981
77 735.0178705 -292.6274849
78 -1026.7155641 735.0178705
79 1002.5207334 -1026.7155641
80 -33.1300071 1002.5207334
81 -96.1771079 -33.1300071
82 -125.4134055 -96.1771079
83 -97.0717394 -125.4134055
84 -71.0173262 -97.0717394
85 -65.2991939 -71.0173262
86 -68.0337626 -65.2991939
87 -73.0555841 -68.0337626
88 861.6100622 -73.0555841
89 -98.8610023 861.6100622
90 132.0964888 -98.8610023
91 1179.3818144 132.0964888
92 149.8965219 1179.3818144
93 -936.2214286 149.8965219
94 1017.6368722 -936.2214286
95 56.7184920 1017.6368722
96 -936.4197493 56.7184920
97 38.2221482 -936.4197493
98 -1005.1849824 38.2221482
99 942.9551862 -1005.1849824
100 -116.2137197 942.9551862
101 -94.7338122 -116.2137197
102 141.9418110 -94.7338122
103 -816.4909955 141.9418110
104 -855.5726154 -816.4909955
105 37.9731532 -855.5726154
106 970.3515465 37.9731532
107 -44.7139180 970.3515465
108 -32.8303378 -44.7139180
109 -66.6411411 -32.8303378
110 -100.4519444 -66.6411411
111 -135.4063742 -100.4519444
112 815.0210473 -135.4063742
113 812.7337944 815.0210473
114 47.1221647 812.7337944
115 -898.2834352 47.1221647
116 61.4913185 -898.2834352
117 -17.3175576 61.4913185
118 -64.6028832 -17.3175576
119 -74.6465262 -64.6028832
120 979.0532424 -74.6465262
121 -29.3994585 979.0532424
122 -81.2592899 -29.3994585
123 -1116.2137197 -81.2592899
124 847.6882241 -1116.2137197
125 -1135.4063742 847.6882241
126 70.8893251 -1135.4063742
127 164.3163499 70.8893251
128 140.9965053 164.3163499
129 -922.0505956 140.9965053
130 NA -922.0505956
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 873.3922938 -105.8241095
[2,] -149.6785558 873.3922938
[3,] -184.6329856 -149.6785558
[4,] -222.3219839 -184.6329856
[5,] 777.6780161 -222.3219839
[6,] 89.0353253 777.6780161
[7,] -832.8521093 89.0353253
[8,] 157.5515634 -832.8521093
[9,] 103.6534741 157.5515634
[10,] 36.7281782 103.6534741
[11,] 27.8281616 36.7281782
[12,] 29.6680988 27.8281616
[13,] 2.7190541 29.6680988
[14,] -36.1135707 2.7190541
[15,] -1060.7753624 -36.1135707
[16,] 890.7956855 -1060.7753624
[17,] -82.7025856 890.7956855
[18,] -764.0362019 -82.7025856
[19,] 296.7236460 -764.0362019
[20,] 288.2709452 296.7236460
[21,] -787.1070516 288.2709452
[22,] -869.3468070 -787.1070516
[23,] 132.4931302 -869.3468070
[24,] 134.3330674 132.4931302
[25,] 114.6930971 134.3330674
[26,] -934.1831707 114.6930971
[27,] 15.1006243 -934.1831707
[28,] -29.8974485 15.1006243
[29,] -10.7047939 -29.8974485
[30,] 275.7417286 -10.7047939
[31,] 350.6724096 275.7417286
[32,] 346.7942146 350.6724096
[33,] 270.5215864 346.7942146
[34,] 189.4254574 270.5215864
[35,] -832.9490815 189.4254574
[36,] 130.5055466 -832.9490815
[37,] -889.1344237 130.5055466
[38,] 73.1765779 -889.1344237
[39,] 29.7694473 73.1765779
[40,] -7.9195510 29.7694473
[41,] 0.5331498 -7.9195510
[42,] 281.9578508 0.5331498
[43,] 340.4304459 281.9578508
[44,] 339.2868195 340.4304459
[45,] 259.3343169 339.2868195
[46,] -820.6181856 259.3343169
[47,] 149.6982011 -820.6181856
[48,] 101.9655598 149.6982011
[49,] 86.2037845 101.9655598
[50,] 37.7748325 86.2037845
[51,] 12.4167300 37.7748325
[52,] -7.2232403 12.4167300
[53,] -1.0577924 -7.2232403
[54,] 249.9869847 -1.0577924
[55,] 293.8414310 249.9869847
[56,] 280.8142244 293.8414310
[57,] 1150.5928326 280.8142244
[58,] 58.7567499 1150.5928326
[59,] -993.5503973 58.7567499
[60,] 16.0459300 -993.5503973
[61,] -34.6702750 16.0459300
[62,] -91.1046122 -34.6702750
[63,] -116.4627147 -91.1046122
[64,] -176.7752469 -116.4627147
[65,] -202.8296601 -176.7752469
[66,] 52.3423070 -202.8296601
[67,] 1099.6276326 52.3423070
[68,] 37.4751632 1099.6276326
[69,] -35.1682650 37.4751632
[70,] -110.0989460 -35.1682650
[71,] -111.6898882 -110.0989460
[72,] -108.2590088 -111.6898882
[73,] 855.6429350 -108.2590088
[74,] -197.3605229 855.6429350
[75,] -213.1222981 -197.3605229
[76,] -292.6274849 -213.1222981
[77,] 735.0178705 -292.6274849
[78,] -1026.7155641 735.0178705
[79,] 1002.5207334 -1026.7155641
[80,] -33.1300071 1002.5207334
[81,] -96.1771079 -33.1300071
[82,] -125.4134055 -96.1771079
[83,] -97.0717394 -125.4134055
[84,] -71.0173262 -97.0717394
[85,] -65.2991939 -71.0173262
[86,] -68.0337626 -65.2991939
[87,] -73.0555841 -68.0337626
[88,] 861.6100622 -73.0555841
[89,] -98.8610023 861.6100622
[90,] 132.0964888 -98.8610023
[91,] 1179.3818144 132.0964888
[92,] 149.8965219 1179.3818144
[93,] -936.2214286 149.8965219
[94,] 1017.6368722 -936.2214286
[95,] 56.7184920 1017.6368722
[96,] -936.4197493 56.7184920
[97,] 38.2221482 -936.4197493
[98,] -1005.1849824 38.2221482
[99,] 942.9551862 -1005.1849824
[100,] -116.2137197 942.9551862
[101,] -94.7338122 -116.2137197
[102,] 141.9418110 -94.7338122
[103,] -816.4909955 141.9418110
[104,] -855.5726154 -816.4909955
[105,] 37.9731532 -855.5726154
[106,] 970.3515465 37.9731532
[107,] -44.7139180 970.3515465
[108,] -32.8303378 -44.7139180
[109,] -66.6411411 -32.8303378
[110,] -100.4519444 -66.6411411
[111,] -135.4063742 -100.4519444
[112,] 815.0210473 -135.4063742
[113,] 812.7337944 815.0210473
[114,] 47.1221647 812.7337944
[115,] -898.2834352 47.1221647
[116,] 61.4913185 -898.2834352
[117,] -17.3175576 61.4913185
[118,] -64.6028832 -17.3175576
[119,] -74.6465262 -64.6028832
[120,] 979.0532424 -74.6465262
[121,] -29.3994585 979.0532424
[122,] -81.2592899 -29.3994585
[123,] -1116.2137197 -81.2592899
[124,] 847.6882241 -1116.2137197
[125,] -1135.4063742 847.6882241
[126,] 70.8893251 -1135.4063742
[127,] 164.3163499 70.8893251
[128,] 140.9965053 164.3163499
[129,] -922.0505956 140.9965053
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 873.3922938 -105.8241095
2 -149.6785558 873.3922938
3 -184.6329856 -149.6785558
4 -222.3219839 -184.6329856
5 777.6780161 -222.3219839
6 89.0353253 777.6780161
7 -832.8521093 89.0353253
8 157.5515634 -832.8521093
9 103.6534741 157.5515634
10 36.7281782 103.6534741
11 27.8281616 36.7281782
12 29.6680988 27.8281616
13 2.7190541 29.6680988
14 -36.1135707 2.7190541
15 -1060.7753624 -36.1135707
16 890.7956855 -1060.7753624
17 -82.7025856 890.7956855
18 -764.0362019 -82.7025856
19 296.7236460 -764.0362019
20 288.2709452 296.7236460
21 -787.1070516 288.2709452
22 -869.3468070 -787.1070516
23 132.4931302 -869.3468070
24 134.3330674 132.4931302
25 114.6930971 134.3330674
26 -934.1831707 114.6930971
27 15.1006243 -934.1831707
28 -29.8974485 15.1006243
29 -10.7047939 -29.8974485
30 275.7417286 -10.7047939
31 350.6724096 275.7417286
32 346.7942146 350.6724096
33 270.5215864 346.7942146
34 189.4254574 270.5215864
35 -832.9490815 189.4254574
36 130.5055466 -832.9490815
37 -889.1344237 130.5055466
38 73.1765779 -889.1344237
39 29.7694473 73.1765779
40 -7.9195510 29.7694473
41 0.5331498 -7.9195510
42 281.9578508 0.5331498
43 340.4304459 281.9578508
44 339.2868195 340.4304459
45 259.3343169 339.2868195
46 -820.6181856 259.3343169
47 149.6982011 -820.6181856
48 101.9655598 149.6982011
49 86.2037845 101.9655598
50 37.7748325 86.2037845
51 12.4167300 37.7748325
52 -7.2232403 12.4167300
53 -1.0577924 -7.2232403
54 249.9869847 -1.0577924
55 293.8414310 249.9869847
56 280.8142244 293.8414310
57 1150.5928326 280.8142244
58 58.7567499 1150.5928326
59 -993.5503973 58.7567499
60 16.0459300 -993.5503973
61 -34.6702750 16.0459300
62 -91.1046122 -34.6702750
63 -116.4627147 -91.1046122
64 -176.7752469 -116.4627147
65 -202.8296601 -176.7752469
66 52.3423070 -202.8296601
67 1099.6276326 52.3423070
68 37.4751632 1099.6276326
69 -35.1682650 37.4751632
70 -110.0989460 -35.1682650
71 -111.6898882 -110.0989460
72 -108.2590088 -111.6898882
73 855.6429350 -108.2590088
74 -197.3605229 855.6429350
75 -213.1222981 -197.3605229
76 -292.6274849 -213.1222981
77 735.0178705 -292.6274849
78 -1026.7155641 735.0178705
79 1002.5207334 -1026.7155641
80 -33.1300071 1002.5207334
81 -96.1771079 -33.1300071
82 -125.4134055 -96.1771079
83 -97.0717394 -125.4134055
84 -71.0173262 -97.0717394
85 -65.2991939 -71.0173262
86 -68.0337626 -65.2991939
87 -73.0555841 -68.0337626
88 861.6100622 -73.0555841
89 -98.8610023 861.6100622
90 132.0964888 -98.8610023
91 1179.3818144 132.0964888
92 149.8965219 1179.3818144
93 -936.2214286 149.8965219
94 1017.6368722 -936.2214286
95 56.7184920 1017.6368722
96 -936.4197493 56.7184920
97 38.2221482 -936.4197493
98 -1005.1849824 38.2221482
99 942.9551862 -1005.1849824
100 -116.2137197 942.9551862
101 -94.7338122 -116.2137197
102 141.9418110 -94.7338122
103 -816.4909955 141.9418110
104 -855.5726154 -816.4909955
105 37.9731532 -855.5726154
106 970.3515465 37.9731532
107 -44.7139180 970.3515465
108 -32.8303378 -44.7139180
109 -66.6411411 -32.8303378
110 -100.4519444 -66.6411411
111 -135.4063742 -100.4519444
112 815.0210473 -135.4063742
113 812.7337944 815.0210473
114 47.1221647 812.7337944
115 -898.2834352 47.1221647
116 61.4913185 -898.2834352
117 -17.3175576 61.4913185
118 -64.6028832 -17.3175576
119 -74.6465262 -64.6028832
120 979.0532424 -74.6465262
121 -29.3994585 979.0532424
122 -81.2592899 -29.3994585
123 -1116.2137197 -81.2592899
124 847.6882241 -1116.2137197
125 -1135.4063742 847.6882241
126 70.8893251 -1135.4063742
127 164.3163499 70.8893251
128 140.9965053 164.3163499
129 -922.0505956 140.9965053
> 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/7pb6y1353447490.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/8301a1353447490.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/944z61353447490.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/10kq0j1353447490.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/11bvoo1353447490.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/123pk31353447490.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/13cfpe1353447490.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/14jeam1353447490.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/15nqh81353447490.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/16bojg1353447490.tab")
+ }
>
> try(system("convert tmp/1szn21353447490.ps tmp/1szn21353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/2v1ck1353447490.ps tmp/2v1ck1353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/3sxo61353447490.ps tmp/3sxo61353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/48erj1353447490.ps tmp/48erj1353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/5cuh41353447490.ps tmp/5cuh41353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/6wy6i1353447490.ps tmp/6wy6i1353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/7pb6y1353447490.ps tmp/7pb6y1353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/8301a1353447490.ps tmp/8301a1353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/944z61353447490.ps tmp/944z61353447490.png",intern=TRUE))
character(0)
> try(system("convert tmp/10kq0j1353447490.ps tmp/10kq0j1353447490.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.020 1.342 8.360