R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
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(1901,10436,1395,9314,1639,9717,1643,8997,1751,9062,1797,8885,1373,9058,1558,9095,1555,9149,2061,9857,2010,9848,2119,10269,1985,10341,1963,9690,2017,10125,1975,9349,1589,9224,1679,9224,1392,9454,1511,9347,1449,9430,1767,9933,1899,10148,2179,10677,2217,10735,2049,9760,2343,10567,2175,9333,1607,9409,1702,9502,1764,9348,1766,9319,1615,9594,1953,10160,2091,10182,2411,10810,2550,11105,2351,9874,2786,10958,2525,9311,2474,9610,2332,9398,1978,9784,1789,9425,1904,9557,1997,10166,2207,10337,2453,10770,1948,11265,1384,10183,1989,10941,2140,9628,2100,9709,2045,9637,2083,9579,2022,9741,1950,9754,1422,10508,1859,10749,2147,11079),dim=c(2,60),dimnames=list(c('aanbod','invoer'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('aanbod','invoer'),1:60))
> 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'
> #'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.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
aanbod invoer
1 1901 10436
2 1395 9314
3 1639 9717
4 1643 8997
5 1751 9062
6 1797 8885
7 1373 9058
8 1558 9095
9 1555 9149
10 2061 9857
11 2010 9848
12 2119 10269
13 1985 10341
14 1963 9690
15 2017 10125
16 1975 9349
17 1589 9224
18 1679 9224
19 1392 9454
20 1511 9347
21 1449 9430
22 1767 9933
23 1899 10148
24 2179 10677
25 2217 10735
26 2049 9760
27 2343 10567
28 2175 9333
29 1607 9409
30 1702 9502
31 1764 9348
32 1766 9319
33 1615 9594
34 1953 10160
35 2091 10182
36 2411 10810
37 2550 11105
38 2351 9874
39 2786 10958
40 2525 9311
41 2474 9610
42 2332 9398
43 1978 9784
44 1789 9425
45 1904 9557
46 1997 10166
47 2207 10337
48 2453 10770
49 1948 11265
50 1384 10183
51 1989 10941
52 2140 9628
53 2100 9709
54 2045 9637
55 2083 9579
56 2022 9741
57 1950 9754
58 1422 10508
59 1859 10749
60 2147 11079
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) invoer
-694.5390 0.2667
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-686.12 -187.80 18.42 150.66 736.14
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -694.53899 595.02901 -1.167 0.248
invoer 0.26672 0.06015 4.434 4.18e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 283.4 on 58 degrees of freedom
Multiple R-squared: 0.2532, Adjusted R-squared: 0.2403
F-statistic: 19.66 on 1 and 58 DF, p-value: 4.176e-05
> 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.2388091830 0.477618366 0.7611908
[2,] 0.1924551402 0.384910280 0.8075449
[3,] 0.2093910528 0.418782106 0.7906089
[4,] 0.1240142606 0.248028521 0.8759857
[5,] 0.0707616998 0.141523400 0.9292383
[6,] 0.1077027325 0.215405465 0.8922973
[7,] 0.0912024488 0.182404898 0.9087976
[8,] 0.0651811019 0.130362204 0.9348189
[9,] 0.0373231188 0.074646238 0.9626769
[10,] 0.0262192943 0.052438589 0.9737807
[11,] 0.0145122553 0.029024511 0.9854877
[12,] 0.0160497495 0.032099499 0.9839503
[13,] 0.0099724830 0.019944966 0.9900275
[14,] 0.0053218948 0.010643790 0.9946781
[15,] 0.0139850470 0.027970094 0.9860150
[16,] 0.0130927012 0.026185402 0.9869073
[17,] 0.0190542281 0.038108456 0.9809458
[18,] 0.0136514284 0.027302857 0.9863486
[19,] 0.0083288289 0.016657658 0.9916712
[20,] 0.0047947260 0.009589452 0.9952053
[21,] 0.0027073625 0.005414725 0.9972926
[22,] 0.0023829378 0.004765876 0.9976171
[23,] 0.0021658402 0.004331680 0.9978342
[24,] 0.0083327969 0.016665594 0.9916672
[25,] 0.0069290147 0.013858029 0.9930710
[26,] 0.0049357151 0.009871430 0.9950643
[27,] 0.0032745426 0.006549085 0.9967255
[28,] 0.0022177009 0.004435402 0.9977823
[29,] 0.0026776972 0.005355394 0.9973223
[30,] 0.0015797324 0.003159465 0.9984203
[31,] 0.0008905506 0.001781101 0.9991094
[32,] 0.0007438089 0.001487618 0.9992562
[33,] 0.0009953659 0.001990732 0.9990046
[34,] 0.0025176589 0.005035318 0.9974823
[35,] 0.0306243735 0.061248747 0.9693756
[36,] 0.2152784277 0.430556855 0.7847216
[37,] 0.4230615642 0.846123128 0.5769384
[38,] 0.5486636149 0.902672770 0.4513364
[39,] 0.4634340825 0.926868165 0.5365659
[40,] 0.4036070537 0.807214107 0.5963929
[41,] 0.3261597192 0.652319438 0.6738403
[42,] 0.2509967339 0.501993468 0.7490033
[43,] 0.2171119124 0.434223825 0.7828881
[44,] 0.3834916029 0.766983206 0.6165084
[45,] 0.3768649844 0.753729969 0.6231350
[46,] 0.7668515371 0.466296926 0.2331485
[47,] 0.6988924594 0.602215081 0.3011075
[48,] 0.6144804057 0.771039189 0.3855196
[49,] 0.5067835779 0.986432844 0.4932164
[50,] 0.3736615156 0.747323031 0.6263385
[51,] 0.2671027419 0.534205484 0.7328973
> postscript(file="/var/www/html/rcomp/tmp/1d6nq1258559327.ps",horizontal=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/html/rcomp/tmp/2rgji1258559327.ps",horizontal=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/html/rcomp/tmp/3dp891258559327.ps",horizontal=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/html/rcomp/tmp/4j7fd1258559327.ps",horizontal=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/html/rcomp/tmp/5hqhq1258559327.ps",horizontal=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 = 60
Frequency = 1
1 2 3 4 5 6 7
-187.91823 -394.66191 -258.14881 -62.11266 28.55074 121.75963 -348.38239
8 9 10 11 12 13 14
-173.25091 -190.65362 126.51083 77.91129 74.62348 -78.58013 73.05255
15 16 17 18 19 20 21
11.03071 176.00300 -176.65739 -86.65739 -435.00227 -287.46356 -371.60106
22 23 24 25 26 27 28
-187.75965 -113.10377 25.80300 48.33342 140.38237 219.14186 380.27047
29 30 31 32 33 34 35
-208.00001 -137.80468 -34.73028 -24.99549 -249.34263 -62.30438 69.82785
36 37 38 39 40 41 42
222.32966 282.64818 411.97665 557.85556 736.13824 605.38990 519.93388
43 44 45 46 47 48 49
62.98116 -30.26748 49.52589 -19.90468 144.48674 274.99833 -362.02652
50 51 52 53 54 55 56
-637.43887 -234.61025 266.58900 204.98493 169.18854 222.65812 118.44999
57 58 59 60
42.98267 -686.12185 -313.40061 -113.41718
> postscript(file="/var/www/html/rcomp/tmp/65fa01258559327.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 60
Frequency = 1
lag(myerror, k = 1) myerror
0 -187.91823 NA
1 -394.66191 -187.91823
2 -258.14881 -394.66191
3 -62.11266 -258.14881
4 28.55074 -62.11266
5 121.75963 28.55074
6 -348.38239 121.75963
7 -173.25091 -348.38239
8 -190.65362 -173.25091
9 126.51083 -190.65362
10 77.91129 126.51083
11 74.62348 77.91129
12 -78.58013 74.62348
13 73.05255 -78.58013
14 11.03071 73.05255
15 176.00300 11.03071
16 -176.65739 176.00300
17 -86.65739 -176.65739
18 -435.00227 -86.65739
19 -287.46356 -435.00227
20 -371.60106 -287.46356
21 -187.75965 -371.60106
22 -113.10377 -187.75965
23 25.80300 -113.10377
24 48.33342 25.80300
25 140.38237 48.33342
26 219.14186 140.38237
27 380.27047 219.14186
28 -208.00001 380.27047
29 -137.80468 -208.00001
30 -34.73028 -137.80468
31 -24.99549 -34.73028
32 -249.34263 -24.99549
33 -62.30438 -249.34263
34 69.82785 -62.30438
35 222.32966 69.82785
36 282.64818 222.32966
37 411.97665 282.64818
38 557.85556 411.97665
39 736.13824 557.85556
40 605.38990 736.13824
41 519.93388 605.38990
42 62.98116 519.93388
43 -30.26748 62.98116
44 49.52589 -30.26748
45 -19.90468 49.52589
46 144.48674 -19.90468
47 274.99833 144.48674
48 -362.02652 274.99833
49 -637.43887 -362.02652
50 -234.61025 -637.43887
51 266.58900 -234.61025
52 204.98493 266.58900
53 169.18854 204.98493
54 222.65812 169.18854
55 118.44999 222.65812
56 42.98267 118.44999
57 -686.12185 42.98267
58 -313.40061 -686.12185
59 -113.41718 -313.40061
60 NA -113.41718
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -394.66191 -187.91823
[2,] -258.14881 -394.66191
[3,] -62.11266 -258.14881
[4,] 28.55074 -62.11266
[5,] 121.75963 28.55074
[6,] -348.38239 121.75963
[7,] -173.25091 -348.38239
[8,] -190.65362 -173.25091
[9,] 126.51083 -190.65362
[10,] 77.91129 126.51083
[11,] 74.62348 77.91129
[12,] -78.58013 74.62348
[13,] 73.05255 -78.58013
[14,] 11.03071 73.05255
[15,] 176.00300 11.03071
[16,] -176.65739 176.00300
[17,] -86.65739 -176.65739
[18,] -435.00227 -86.65739
[19,] -287.46356 -435.00227
[20,] -371.60106 -287.46356
[21,] -187.75965 -371.60106
[22,] -113.10377 -187.75965
[23,] 25.80300 -113.10377
[24,] 48.33342 25.80300
[25,] 140.38237 48.33342
[26,] 219.14186 140.38237
[27,] 380.27047 219.14186
[28,] -208.00001 380.27047
[29,] -137.80468 -208.00001
[30,] -34.73028 -137.80468
[31,] -24.99549 -34.73028
[32,] -249.34263 -24.99549
[33,] -62.30438 -249.34263
[34,] 69.82785 -62.30438
[35,] 222.32966 69.82785
[36,] 282.64818 222.32966
[37,] 411.97665 282.64818
[38,] 557.85556 411.97665
[39,] 736.13824 557.85556
[40,] 605.38990 736.13824
[41,] 519.93388 605.38990
[42,] 62.98116 519.93388
[43,] -30.26748 62.98116
[44,] 49.52589 -30.26748
[45,] -19.90468 49.52589
[46,] 144.48674 -19.90468
[47,] 274.99833 144.48674
[48,] -362.02652 274.99833
[49,] -637.43887 -362.02652
[50,] -234.61025 -637.43887
[51,] 266.58900 -234.61025
[52,] 204.98493 266.58900
[53,] 169.18854 204.98493
[54,] 222.65812 169.18854
[55,] 118.44999 222.65812
[56,] 42.98267 118.44999
[57,] -686.12185 42.98267
[58,] -313.40061 -686.12185
[59,] -113.41718 -313.40061
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -394.66191 -187.91823
2 -258.14881 -394.66191
3 -62.11266 -258.14881
4 28.55074 -62.11266
5 121.75963 28.55074
6 -348.38239 121.75963
7 -173.25091 -348.38239
8 -190.65362 -173.25091
9 126.51083 -190.65362
10 77.91129 126.51083
11 74.62348 77.91129
12 -78.58013 74.62348
13 73.05255 -78.58013
14 11.03071 73.05255
15 176.00300 11.03071
16 -176.65739 176.00300
17 -86.65739 -176.65739
18 -435.00227 -86.65739
19 -287.46356 -435.00227
20 -371.60106 -287.46356
21 -187.75965 -371.60106
22 -113.10377 -187.75965
23 25.80300 -113.10377
24 48.33342 25.80300
25 140.38237 48.33342
26 219.14186 140.38237
27 380.27047 219.14186
28 -208.00001 380.27047
29 -137.80468 -208.00001
30 -34.73028 -137.80468
31 -24.99549 -34.73028
32 -249.34263 -24.99549
33 -62.30438 -249.34263
34 69.82785 -62.30438
35 222.32966 69.82785
36 282.64818 222.32966
37 411.97665 282.64818
38 557.85556 411.97665
39 736.13824 557.85556
40 605.38990 736.13824
41 519.93388 605.38990
42 62.98116 519.93388
43 -30.26748 62.98116
44 49.52589 -30.26748
45 -19.90468 49.52589
46 144.48674 -19.90468
47 274.99833 144.48674
48 -362.02652 274.99833
49 -637.43887 -362.02652
50 -234.61025 -637.43887
51 266.58900 -234.61025
52 204.98493 266.58900
53 169.18854 204.98493
54 222.65812 169.18854
55 118.44999 222.65812
56 42.98267 118.44999
57 -686.12185 42.98267
58 -313.40061 -686.12185
59 -113.41718 -313.40061
> 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/html/rcomp/tmp/7v7gc1258559327.ps",horizontal=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/html/rcomp/tmp/8herx1258559327.ps",horizontal=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/html/rcomp/tmp/95snk1258559327.ps",horizontal=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/html/rcomp/tmp/10bggb1258559327.ps",horizontal=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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/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/html/rcomp/tmp/11em1z1258559327.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/html/rcomp/tmp/12cmii1258559328.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/html/rcomp/tmp/13obvl1258559328.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/html/rcomp/tmp/148aec1258559328.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/html/rcomp/tmp/15ekl01258559328.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/html/rcomp/tmp/16s9ph1258559328.tab")
+ }
>
> system("convert tmp/1d6nq1258559327.ps tmp/1d6nq1258559327.png")
> system("convert tmp/2rgji1258559327.ps tmp/2rgji1258559327.png")
> system("convert tmp/3dp891258559327.ps tmp/3dp891258559327.png")
> system("convert tmp/4j7fd1258559327.ps tmp/4j7fd1258559327.png")
> system("convert tmp/5hqhq1258559327.ps tmp/5hqhq1258559327.png")
> system("convert tmp/65fa01258559327.ps tmp/65fa01258559327.png")
> system("convert tmp/7v7gc1258559327.ps tmp/7v7gc1258559327.png")
> system("convert tmp/8herx1258559327.ps tmp/8herx1258559327.png")
> system("convert tmp/95snk1258559327.ps tmp/95snk1258559327.png")
> system("convert tmp/10bggb1258559327.ps tmp/10bggb1258559327.png")
>
>
> proc.time()
user system elapsed
2.430 1.605 3.411