R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(88888
+ ,14354
+ ,5050
+ ,16846
+ ,88534
+ ,14002
+ ,4123
+ ,16264
+ ,87770
+ ,13688
+ ,5135
+ ,16610
+ ,87324
+ ,13024
+ ,4273
+ ,15827
+ ,86963
+ ,13103
+ ,4805
+ ,16096
+ ,86030
+ ,12676
+ ,3786
+ ,15468
+ ,85968
+ ,12614
+ ,4884
+ ,16095
+ ,85497
+ ,12169
+ ,4208
+ ,15312
+ ,84530
+ ,12540
+ ,4749
+ ,15353
+ ,84387
+ ,12718
+ ,3908
+ ,14764
+ ,85964
+ ,13636
+ ,4860
+ ,15934
+ ,87675
+ ,13634
+ ,4217
+ ,15969
+ ,88204
+ ,14131
+ ,4790
+ ,16376
+ ,87843
+ ,13968
+ ,4128
+ ,15812
+ ,87184
+ ,14089
+ ,4664
+ ,16127
+ ,86918
+ ,13599
+ ,3812
+ ,15392
+ ,86386
+ ,14140
+ ,4418
+ ,15576
+ ,86247
+ ,14048
+ ,3743
+ ,15071
+ ,85330
+ ,13906
+ ,4446
+ ,15096
+ ,84531
+ ,13115
+ ,3626
+ ,14500
+ ,83811
+ ,13622
+ ,3995
+ ,14628
+ ,83498
+ ,13408
+ ,3256
+ ,14332
+ ,82854
+ ,13448
+ ,3895
+ ,14904
+ ,82252
+ ,12658
+ ,3291
+ ,14018
+ ,81787
+ ,13127
+ ,3606
+ ,14034
+ ,81394
+ ,12955
+ ,2915
+ ,13516
+ ,81078
+ ,13243
+ ,3597
+ ,13919
+ ,80921
+ ,12657
+ ,3137
+ ,13256
+ ,80312
+ ,12838
+ ,3476
+ ,13483
+ ,79740
+ ,12507
+ ,2982
+ ,13016
+ ,78616
+ ,12419
+ ,3458
+ ,13361
+ ,78158
+ ,11979
+ ,2927
+ ,12630
+ ,77905
+ ,12343
+ ,3266
+ ,12703
+ ,77805
+ ,12490
+ ,2801
+ ,12093
+ ,78030
+ ,12708
+ ,3422
+ ,12366
+ ,77743
+ ,12277
+ ,2844
+ ,11829
+ ,77374
+ ,12430
+ ,3178
+ ,11781
+ ,76875
+ ,12211
+ ,2694
+ ,11426
+ ,76219
+ ,12176
+ ,3267
+ ,11732
+ ,76404
+ ,11914
+ ,2781
+ ,11331
+ ,76622
+ ,12382
+ ,3321
+ ,11494
+ ,76537
+ ,12594
+ ,2704
+ ,11006
+ ,76748
+ ,12572
+ ,3199
+ ,11392
+ ,76011
+ ,12373
+ ,2771
+ ,10652
+ ,75657
+ ,12182
+ ,3117
+ ,10750
+ ,75208
+ ,12145
+ ,2708
+ ,10478
+ ,74712
+ ,11918
+ ,3132
+ ,10985
+ ,73677
+ ,11568
+ ,2720
+ ,10438
+ ,72587
+ ,11571
+ ,2962
+ ,10446)
+ ,dim=c(4
+ ,49)
+ ,dimnames=list(c('Bbp'
+ ,'Industrie'
+ ,'Bouw'
+ ,'Diensten')
+ ,1:49))
> y <- array(NA,dim=c(4,49),dimnames=list(c('Bbp','Industrie','Bouw','Diensten'),1:49))
> 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
> 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
Bbp Industrie Bouw Diensten
1 88888 14354 5050 16846
2 88534 14002 4123 16264
3 87770 13688 5135 16610
4 87324 13024 4273 15827
5 86963 13103 4805 16096
6 86030 12676 3786 15468
7 85968 12614 4884 16095
8 85497 12169 4208 15312
9 84530 12540 4749 15353
10 84387 12718 3908 14764
11 85964 13636 4860 15934
12 87675 13634 4217 15969
13 88204 14131 4790 16376
14 87843 13968 4128 15812
15 87184 14089 4664 16127
16 86918 13599 3812 15392
17 86386 14140 4418 15576
18 86247 14048 3743 15071
19 85330 13906 4446 15096
20 84531 13115 3626 14500
21 83811 13622 3995 14628
22 83498 13408 3256 14332
23 82854 13448 3895 14904
24 82252 12658 3291 14018
25 81787 13127 3606 14034
26 81394 12955 2915 13516
27 81078 13243 3597 13919
28 80921 12657 3137 13256
29 80312 12838 3476 13483
30 79740 12507 2982 13016
31 78616 12419 3458 13361
32 78158 11979 2927 12630
33 77905 12343 3266 12703
34 77805 12490 2801 12093
35 78030 12708 3422 12366
36 77743 12277 2844 11829
37 77374 12430 3178 11781
38 76875 12211 2694 11426
39 76219 12176 3267 11732
40 76404 11914 2781 11331
41 76622 12382 3321 11494
42 76537 12594 2704 11006
43 76748 12572 3199 11392
44 76011 12373 2771 10652
45 75657 12182 3117 10750
46 75208 12145 2708 10478
47 74712 11918 3132 10985
48 73677 11568 2720 10438
49 72587 11571 2962 10446
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Industrie Bouw Diensten
41838.1624 0.8341 -0.6639 2.2966
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1970.6 -364.9 124.7 563.6 1228.2
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 41838.1624 2389.3940 17.510 < 2e-16 ***
Industrie 0.8341 0.2562 3.255 0.00215 **
Bouw -0.6639 0.3459 -1.919 0.06128 .
Diensten 2.2966 0.1489 15.419 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 774 on 45 degrees of freedom
Multiple R-squared: 0.9754, Adjusted R-squared: 0.9738
F-statistic: 595.6 on 3 and 45 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.069236898 0.138473796 0.93076310
[2,] 0.029449955 0.058899909 0.97055005
[3,] 0.079951001 0.159902003 0.92004900
[4,] 0.054468245 0.108936489 0.94553176
[5,] 0.042673175 0.085346351 0.95732682
[6,] 0.029116499 0.058232998 0.97088350
[7,] 0.020500901 0.041001802 0.97949910
[8,] 0.018626284 0.037252567 0.98137372
[9,] 0.012313614 0.024627229 0.98768639
[10,] 0.014090810 0.028181620 0.98590919
[11,] 0.007233920 0.014467839 0.99276608
[12,] 0.003686810 0.007373619 0.99631319
[13,] 0.003898092 0.007796184 0.99610191
[14,] 0.023010301 0.046020601 0.97698970
[15,] 0.060029530 0.120059061 0.93997047
[16,] 0.228349798 0.456699595 0.77165020
[17,] 0.856239553 0.287520893 0.14376045
[18,] 0.936235882 0.127528236 0.06376412
[19,] 0.925463329 0.149073342 0.07453667
[20,] 0.896155636 0.207688727 0.10384436
[21,] 0.917716365 0.164567270 0.08228363
[22,] 0.956954649 0.086090702 0.04304535
[23,] 0.933743043 0.132513914 0.06625696
[24,] 0.905350668 0.189298665 0.09464933
[25,] 0.938093354 0.123813292 0.06190665
[26,] 0.921603182 0.156793635 0.07839682
[27,] 0.887037796 0.225924407 0.11296220
[28,] 0.920244231 0.159511538 0.07975577
[29,] 0.936588187 0.126823625 0.06341181
[30,] 0.931988301 0.136023398 0.06801170
[31,] 0.912358994 0.175282012 0.08764101
[32,] 0.871531294 0.256937413 0.12846871
[33,] 0.814127769 0.371744461 0.18587223
[34,] 0.878636431 0.242727138 0.12136357
[35,] 0.815925810 0.368148381 0.18407419
[36,] 0.752165608 0.495668784 0.24783439
> postscript(file="/var/www/rcomp/tmp/1572c1322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/2h8l11322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/35n4y1322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/47u9i1322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/5wwpl1322161753.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 = 49
Frequency = 1
1 2 3 4 5 6
-259.39941 401.38985 -223.43147 1110.38349 418.90426 607.81668
7 8 9 10 11 12
-113.45965 1136.17166 124.73311 627.60813 -616.11689 589.26367
13 14 15 16 17 18
149.40494 780.14543 -347.35636 917.72130 -85.78159 563.60366
19 20 21 22 23 24
174.37574 859.54077 -332.34155 -277.67906 -1844.46503 -153.70374
25 26 27 28 29 30
-837.51901 -356.17012 -1385.14119 163.91550 -892.32467 -443.68342
31 32 33 34 35 36
-1970.58673 -735.28113 -1234.48632 -364.88717 -536.40726 385.64086
37 38 39 40 41 42
221.00918 398.64499 -550.49768 451.32268 263.12114 712.39630
43 44 45 46 47 48
383.89337 1228.22809 1038.19638 973.19522 -216.34203 23.31996
49
-926.88486
> postscript(file="/var/www/rcomp/tmp/68e7t1322161753.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 = 49
Frequency = 1
lag(myerror, k = 1) myerror
0 -259.39941 NA
1 401.38985 -259.39941
2 -223.43147 401.38985
3 1110.38349 -223.43147
4 418.90426 1110.38349
5 607.81668 418.90426
6 -113.45965 607.81668
7 1136.17166 -113.45965
8 124.73311 1136.17166
9 627.60813 124.73311
10 -616.11689 627.60813
11 589.26367 -616.11689
12 149.40494 589.26367
13 780.14543 149.40494
14 -347.35636 780.14543
15 917.72130 -347.35636
16 -85.78159 917.72130
17 563.60366 -85.78159
18 174.37574 563.60366
19 859.54077 174.37574
20 -332.34155 859.54077
21 -277.67906 -332.34155
22 -1844.46503 -277.67906
23 -153.70374 -1844.46503
24 -837.51901 -153.70374
25 -356.17012 -837.51901
26 -1385.14119 -356.17012
27 163.91550 -1385.14119
28 -892.32467 163.91550
29 -443.68342 -892.32467
30 -1970.58673 -443.68342
31 -735.28113 -1970.58673
32 -1234.48632 -735.28113
33 -364.88717 -1234.48632
34 -536.40726 -364.88717
35 385.64086 -536.40726
36 221.00918 385.64086
37 398.64499 221.00918
38 -550.49768 398.64499
39 451.32268 -550.49768
40 263.12114 451.32268
41 712.39630 263.12114
42 383.89337 712.39630
43 1228.22809 383.89337
44 1038.19638 1228.22809
45 973.19522 1038.19638
46 -216.34203 973.19522
47 23.31996 -216.34203
48 -926.88486 23.31996
49 NA -926.88486
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 401.38985 -259.39941
[2,] -223.43147 401.38985
[3,] 1110.38349 -223.43147
[4,] 418.90426 1110.38349
[5,] 607.81668 418.90426
[6,] -113.45965 607.81668
[7,] 1136.17166 -113.45965
[8,] 124.73311 1136.17166
[9,] 627.60813 124.73311
[10,] -616.11689 627.60813
[11,] 589.26367 -616.11689
[12,] 149.40494 589.26367
[13,] 780.14543 149.40494
[14,] -347.35636 780.14543
[15,] 917.72130 -347.35636
[16,] -85.78159 917.72130
[17,] 563.60366 -85.78159
[18,] 174.37574 563.60366
[19,] 859.54077 174.37574
[20,] -332.34155 859.54077
[21,] -277.67906 -332.34155
[22,] -1844.46503 -277.67906
[23,] -153.70374 -1844.46503
[24,] -837.51901 -153.70374
[25,] -356.17012 -837.51901
[26,] -1385.14119 -356.17012
[27,] 163.91550 -1385.14119
[28,] -892.32467 163.91550
[29,] -443.68342 -892.32467
[30,] -1970.58673 -443.68342
[31,] -735.28113 -1970.58673
[32,] -1234.48632 -735.28113
[33,] -364.88717 -1234.48632
[34,] -536.40726 -364.88717
[35,] 385.64086 -536.40726
[36,] 221.00918 385.64086
[37,] 398.64499 221.00918
[38,] -550.49768 398.64499
[39,] 451.32268 -550.49768
[40,] 263.12114 451.32268
[41,] 712.39630 263.12114
[42,] 383.89337 712.39630
[43,] 1228.22809 383.89337
[44,] 1038.19638 1228.22809
[45,] 973.19522 1038.19638
[46,] -216.34203 973.19522
[47,] 23.31996 -216.34203
[48,] -926.88486 23.31996
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 401.38985 -259.39941
2 -223.43147 401.38985
3 1110.38349 -223.43147
4 418.90426 1110.38349
5 607.81668 418.90426
6 -113.45965 607.81668
7 1136.17166 -113.45965
8 124.73311 1136.17166
9 627.60813 124.73311
10 -616.11689 627.60813
11 589.26367 -616.11689
12 149.40494 589.26367
13 780.14543 149.40494
14 -347.35636 780.14543
15 917.72130 -347.35636
16 -85.78159 917.72130
17 563.60366 -85.78159
18 174.37574 563.60366
19 859.54077 174.37574
20 -332.34155 859.54077
21 -277.67906 -332.34155
22 -1844.46503 -277.67906
23 -153.70374 -1844.46503
24 -837.51901 -153.70374
25 -356.17012 -837.51901
26 -1385.14119 -356.17012
27 163.91550 -1385.14119
28 -892.32467 163.91550
29 -443.68342 -892.32467
30 -1970.58673 -443.68342
31 -735.28113 -1970.58673
32 -1234.48632 -735.28113
33 -364.88717 -1234.48632
34 -536.40726 -364.88717
35 385.64086 -536.40726
36 221.00918 385.64086
37 398.64499 221.00918
38 -550.49768 398.64499
39 451.32268 -550.49768
40 263.12114 451.32268
41 712.39630 263.12114
42 383.89337 712.39630
43 1228.22809 383.89337
44 1038.19638 1228.22809
45 973.19522 1038.19638
46 -216.34203 973.19522
47 23.31996 -216.34203
48 -926.88486 23.31996
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/743041322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/82tr71322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/90uji1322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/rcomp/tmp/1034j81322161753.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/11so7z1322161753.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/12igif1322161753.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/13c71k1322161753.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/14m8er1322161753.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/15cevf1322161753.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/168mm81322161753.tab")
+ }
>
> try(system("convert tmp/1572c1322161753.ps tmp/1572c1322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/2h8l11322161753.ps tmp/2h8l11322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/35n4y1322161753.ps tmp/35n4y1322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/47u9i1322161753.ps tmp/47u9i1322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/5wwpl1322161753.ps tmp/5wwpl1322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/68e7t1322161753.ps tmp/68e7t1322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/743041322161753.ps tmp/743041322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/82tr71322161753.ps tmp/82tr71322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/90uji1322161753.ps tmp/90uji1322161753.png",intern=TRUE))
character(0)
> try(system("convert tmp/1034j81322161753.ps tmp/1034j81322161753.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.500 0.320 4.804