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(3922,22782,3759,16169,4138,13807,4634,29743,3995,25591,4308,29096,4143,26482,4429,22404,5219,27044,4929,17970,5755,18730,5592,19684,4163,19785,4962,18479,5208,10698,4755,31956,4491,29506,5732,34506,5731,27165,5040,26736,6102,23691,4904,18157,5369,17328,5578,18205,4619,20995,4731,17382,5011,9367,5299,31124,4146,26551,4625,30651,4736,25859,4219,25100,5116,25778,4205,20418,4121,18688,5103,20424,4300,24776,4578,19814,3809,12738,5526,31566,4247,30111,3830,30019,4394,31934,4826,25826,4409,26835,4569,20205,4106,17789,4794,20520,3914,22518,3793,15572,4405,11509,4022,25447,4100,24090,4788,27786,3163,26195,3585,20516,3903,22759,4178,19028,3863,16971,4187,20036),dim=c(2,60),dimnames=list(c('bouwaanvragen','inschrijvingen_autos'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('bouwaanvragen','inschrijvingen_autos'),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
bouwaanvragen inschrijvingen_autos
1 3922 22782
2 3759 16169
3 4138 13807
4 4634 29743
5 3995 25591
6 4308 29096
7 4143 26482
8 4429 22404
9 5219 27044
10 4929 17970
11 5755 18730
12 5592 19684
13 4163 19785
14 4962 18479
15 5208 10698
16 4755 31956
17 4491 29506
18 5732 34506
19 5731 27165
20 5040 26736
21 6102 23691
22 4904 18157
23 5369 17328
24 5578 18205
25 4619 20995
26 4731 17382
27 5011 9367
28 5299 31124
29 4146 26551
30 4625 30651
31 4736 25859
32 4219 25100
33 5116 25778
34 4205 20418
35 4121 18688
36 5103 20424
37 4300 24776
38 4578 19814
39 3809 12738
40 5526 31566
41 4247 30111
42 3830 30019
43 4394 31934
44 4826 25826
45 4409 26835
46 4569 20205
47 4106 17789
48 4794 20520
49 3914 22518
50 3793 15572
51 4405 11509
52 4022 25447
53 4100 24090
54 4788 27786
55 3163 26195
56 3585 20516
57 3903 22759
58 4178 19028
59 3863 16971
60 4187 20036
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) inschrijvingen_autos
4.316e+03 1.108e-02
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1443.58 -421.71 -87.21 430.80 1523.17
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.316e+03 3.299e+02 13.083 <2e-16 ***
inschrijvingen_autos 1.108e-02 1.408e-02 0.787 0.435
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 627.8 on 58 degrees of freedom
Multiple R-squared: 0.01056, Adjusted R-squared: -0.006498
F-statistic: 0.6191 on 1 and 58 DF, p-value: 0.4346
> 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.12934921 0.25869842 0.87065079
[2,] 0.04972263 0.09944526 0.95027737
[3,] 0.01858018 0.03716036 0.98141982
[4,] 0.01266183 0.02532365 0.98733817
[5,] 0.09589254 0.19178507 0.90410746
[6,] 0.16291208 0.32582417 0.83708792
[7,] 0.56390528 0.87218944 0.43609472
[8,] 0.71262976 0.57474048 0.28737024
[9,] 0.65631173 0.68737655 0.34368827
[10,] 0.60025672 0.79948656 0.39974328
[11,] 0.58203524 0.83592952 0.41796476
[12,] 0.50976555 0.98046891 0.49023445
[13,] 0.42415404 0.84830809 0.57584596
[14,] 0.58882923 0.82234154 0.41117077
[15,] 0.71496202 0.57007596 0.28503798
[16,] 0.66682145 0.66635711 0.33317855
[17,] 0.89832220 0.20335561 0.10167780
[18,] 0.87231994 0.25536011 0.12768006
[19,] 0.89993179 0.20013641 0.10006821
[20,] 0.95241546 0.09516908 0.04758454
[21,] 0.93501044 0.12997912 0.06498956
[22,] 0.91837296 0.16325408 0.08162704
[23,] 0.94144048 0.11711905 0.05855952
[24,] 0.94741007 0.10517985 0.05258993
[25,] 0.94271170 0.11457661 0.05728830
[26,] 0.91962393 0.16075214 0.08037607
[27,] 0.89700489 0.20599023 0.10299511
[28,] 0.87689779 0.24620441 0.12310221
[29,] 0.89025156 0.21949688 0.10974844
[30,] 0.86662568 0.26674864 0.13337432
[31,] 0.84243343 0.31513315 0.15756657
[32,] 0.88577471 0.22845059 0.11422529
[33,] 0.85308783 0.29382434 0.14691217
[34,] 0.82853992 0.34292017 0.17146008
[35,] 0.81467906 0.37064187 0.18532094
[36,] 0.94209676 0.11580648 0.05790324
[37,] 0.92115353 0.15769295 0.07884647
[38,] 0.92355328 0.15289345 0.07644672
[39,] 0.89111677 0.21776647 0.10888323
[40,] 0.90594970 0.18810061 0.09405030
[41,] 0.87984243 0.24031515 0.12015757
[42,] 0.86764165 0.26471670 0.13235835
[43,] 0.81655049 0.36689902 0.18344951
[44,] 0.87389186 0.25221627 0.12610814
[45,] 0.82502920 0.34994161 0.17497080
[46,] 0.78068176 0.43863649 0.21931824
[47,] 0.73542430 0.52915140 0.26457570
[48,] 0.63403843 0.73192314 0.36596157
[49,] 0.51317856 0.97364288 0.48682144
[50,] 0.89560405 0.20879190 0.10439595
[51,] 0.88818722 0.22362557 0.11181278
> postscript(file="/var/www/html/rcomp/tmp/18xx21258707783.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/2r11l1258707783.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/3qfdz1258707783.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/4u4rb1258707783.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/5520q1258707783.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
-646.76241 -736.48934 -331.31801 -11.89137 -604.88656 -330.72251
7 8 9 10 11 12
-466.75898 -135.57411 603.01397 413.55530 1231.13438 1057.56392
13 14 15 16 17 18
-372.55518 440.91550 773.13019 84.58825 -152.26537 1033.33385
19 20 21 22 23 24
1113.67327 427.42666 1523.16573 386.48331 860.66876 1059.95146
25 26 27 28 29 30
70.03783 222.07043 590.87788 637.80694 -464.52351 -30.95215
31 32 33 34 35 36
133.14396 -375.44621 514.04145 -337.56892 -402.40025 560.36460
37 38 39 40 41 42
-290.85624 42.12349 -648.47333 859.90951 -402.96887 -818.94949
43 44 45 46 47 48
-276.16799 223.50960 -204.67028 28.79115 -407.43919 250.30091
49 50 51 52 53 54
-651.83725 -695.87449 -38.85581 -576.29102 -483.25525 163.79250
55 56 57 58 59 60
-1443.57898 -958.65477 -665.50756 -349.16750 -641.37562 -351.33630
> postscript(file="/var/www/html/rcomp/tmp/6szl01258707783.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 -646.76241 NA
1 -736.48934 -646.76241
2 -331.31801 -736.48934
3 -11.89137 -331.31801
4 -604.88656 -11.89137
5 -330.72251 -604.88656
6 -466.75898 -330.72251
7 -135.57411 -466.75898
8 603.01397 -135.57411
9 413.55530 603.01397
10 1231.13438 413.55530
11 1057.56392 1231.13438
12 -372.55518 1057.56392
13 440.91550 -372.55518
14 773.13019 440.91550
15 84.58825 773.13019
16 -152.26537 84.58825
17 1033.33385 -152.26537
18 1113.67327 1033.33385
19 427.42666 1113.67327
20 1523.16573 427.42666
21 386.48331 1523.16573
22 860.66876 386.48331
23 1059.95146 860.66876
24 70.03783 1059.95146
25 222.07043 70.03783
26 590.87788 222.07043
27 637.80694 590.87788
28 -464.52351 637.80694
29 -30.95215 -464.52351
30 133.14396 -30.95215
31 -375.44621 133.14396
32 514.04145 -375.44621
33 -337.56892 514.04145
34 -402.40025 -337.56892
35 560.36460 -402.40025
36 -290.85624 560.36460
37 42.12349 -290.85624
38 -648.47333 42.12349
39 859.90951 -648.47333
40 -402.96887 859.90951
41 -818.94949 -402.96887
42 -276.16799 -818.94949
43 223.50960 -276.16799
44 -204.67028 223.50960
45 28.79115 -204.67028
46 -407.43919 28.79115
47 250.30091 -407.43919
48 -651.83725 250.30091
49 -695.87449 -651.83725
50 -38.85581 -695.87449
51 -576.29102 -38.85581
52 -483.25525 -576.29102
53 163.79250 -483.25525
54 -1443.57898 163.79250
55 -958.65477 -1443.57898
56 -665.50756 -958.65477
57 -349.16750 -665.50756
58 -641.37562 -349.16750
59 -351.33630 -641.37562
60 NA -351.33630
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -736.48934 -646.76241
[2,] -331.31801 -736.48934
[3,] -11.89137 -331.31801
[4,] -604.88656 -11.89137
[5,] -330.72251 -604.88656
[6,] -466.75898 -330.72251
[7,] -135.57411 -466.75898
[8,] 603.01397 -135.57411
[9,] 413.55530 603.01397
[10,] 1231.13438 413.55530
[11,] 1057.56392 1231.13438
[12,] -372.55518 1057.56392
[13,] 440.91550 -372.55518
[14,] 773.13019 440.91550
[15,] 84.58825 773.13019
[16,] -152.26537 84.58825
[17,] 1033.33385 -152.26537
[18,] 1113.67327 1033.33385
[19,] 427.42666 1113.67327
[20,] 1523.16573 427.42666
[21,] 386.48331 1523.16573
[22,] 860.66876 386.48331
[23,] 1059.95146 860.66876
[24,] 70.03783 1059.95146
[25,] 222.07043 70.03783
[26,] 590.87788 222.07043
[27,] 637.80694 590.87788
[28,] -464.52351 637.80694
[29,] -30.95215 -464.52351
[30,] 133.14396 -30.95215
[31,] -375.44621 133.14396
[32,] 514.04145 -375.44621
[33,] -337.56892 514.04145
[34,] -402.40025 -337.56892
[35,] 560.36460 -402.40025
[36,] -290.85624 560.36460
[37,] 42.12349 -290.85624
[38,] -648.47333 42.12349
[39,] 859.90951 -648.47333
[40,] -402.96887 859.90951
[41,] -818.94949 -402.96887
[42,] -276.16799 -818.94949
[43,] 223.50960 -276.16799
[44,] -204.67028 223.50960
[45,] 28.79115 -204.67028
[46,] -407.43919 28.79115
[47,] 250.30091 -407.43919
[48,] -651.83725 250.30091
[49,] -695.87449 -651.83725
[50,] -38.85581 -695.87449
[51,] -576.29102 -38.85581
[52,] -483.25525 -576.29102
[53,] 163.79250 -483.25525
[54,] -1443.57898 163.79250
[55,] -958.65477 -1443.57898
[56,] -665.50756 -958.65477
[57,] -349.16750 -665.50756
[58,] -641.37562 -349.16750
[59,] -351.33630 -641.37562
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -736.48934 -646.76241
2 -331.31801 -736.48934
3 -11.89137 -331.31801
4 -604.88656 -11.89137
5 -330.72251 -604.88656
6 -466.75898 -330.72251
7 -135.57411 -466.75898
8 603.01397 -135.57411
9 413.55530 603.01397
10 1231.13438 413.55530
11 1057.56392 1231.13438
12 -372.55518 1057.56392
13 440.91550 -372.55518
14 773.13019 440.91550
15 84.58825 773.13019
16 -152.26537 84.58825
17 1033.33385 -152.26537
18 1113.67327 1033.33385
19 427.42666 1113.67327
20 1523.16573 427.42666
21 386.48331 1523.16573
22 860.66876 386.48331
23 1059.95146 860.66876
24 70.03783 1059.95146
25 222.07043 70.03783
26 590.87788 222.07043
27 637.80694 590.87788
28 -464.52351 637.80694
29 -30.95215 -464.52351
30 133.14396 -30.95215
31 -375.44621 133.14396
32 514.04145 -375.44621
33 -337.56892 514.04145
34 -402.40025 -337.56892
35 560.36460 -402.40025
36 -290.85624 560.36460
37 42.12349 -290.85624
38 -648.47333 42.12349
39 859.90951 -648.47333
40 -402.96887 859.90951
41 -818.94949 -402.96887
42 -276.16799 -818.94949
43 223.50960 -276.16799
44 -204.67028 223.50960
45 28.79115 -204.67028
46 -407.43919 28.79115
47 250.30091 -407.43919
48 -651.83725 250.30091
49 -695.87449 -651.83725
50 -38.85581 -695.87449
51 -576.29102 -38.85581
52 -483.25525 -576.29102
53 163.79250 -483.25525
54 -1443.57898 163.79250
55 -958.65477 -1443.57898
56 -665.50756 -958.65477
57 -349.16750 -665.50756
58 -641.37562 -349.16750
59 -351.33630 -641.37562
> 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/71h8j1258707783.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/8i0yo1258707783.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/9gtt31258707783.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/101ajc1258707783.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/110pm61258707783.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/12fo6l1258707783.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/133ygp1258707783.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/14haek1258707783.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/15y6jo1258707783.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/160teq1258707783.tab")
+ }
>
> system("convert tmp/18xx21258707783.ps tmp/18xx21258707783.png")
> system("convert tmp/2r11l1258707783.ps tmp/2r11l1258707783.png")
> system("convert tmp/3qfdz1258707783.ps tmp/3qfdz1258707783.png")
> system("convert tmp/4u4rb1258707783.ps tmp/4u4rb1258707783.png")
> system("convert tmp/5520q1258707783.ps tmp/5520q1258707783.png")
> system("convert tmp/6szl01258707783.ps tmp/6szl01258707783.png")
> system("convert tmp/71h8j1258707783.ps tmp/71h8j1258707783.png")
> system("convert tmp/8i0yo1258707783.ps tmp/8i0yo1258707783.png")
> system("convert tmp/9gtt31258707783.ps tmp/9gtt31258707783.png")
> system("convert tmp/101ajc1258707783.ps tmp/101ajc1258707783.png")
>
>
> proc.time()
user system elapsed
2.467 1.556 3.222