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(15836.8,89.1,17570.4,82.6,18252.1,102.7,16196.7,91.8,16643,94.1,17729,103.1,16446.1,93.2,15993.8,91,16373.5,94.3,17842.2,99.4,22321.5,115.7,22786.7,116.8,18274.1,99.8,22392.9,96,23899.3,115.9,21343.5,109.1,22952.3,117.3,21374.4,109.8,21164.1,112.8,20906.5,110.7,17877.4,100,20664.3,113.3,22160,122.4,19813.6,112.5,17735.4,104.2,19640.2,92.5,20844.4,117.2,19823.1,109.3,18594.6,106.1,21350.6,118.8,18574.1,105.3,18924.2,106,17343.4,102,19961.2,112.9,19932.1,116.5,19464.6,114.8,16165.4,100.5,17574.9,85.4,19795.4,114.6,19439.5,109.9,17170,100.7,21072.4,115.5,17751.8,100.7,17515.5,99,18040.3,102.3,19090.1,108.8,17746.5,105.9,19202.1,113.2,15141.6,95.7,16258.1,80.9,18586.5,113.9,17209.4,98.1,17838.7,102.8,19123.5,104.7,16583.6,95.9,15991.2,94.6,16704.4,101.6,17420.4,103.9,17872,110.3,17823.2,114.1),dim=c(2,60),dimnames=list(c('uitvoer','indproc'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('uitvoer','indproc'),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
uitvoer indproc
1 15836.8 89.1
2 17570.4 82.6
3 18252.1 102.7
4 16196.7 91.8
5 16643.0 94.1
6 17729.0 103.1
7 16446.1 93.2
8 15993.8 91.0
9 16373.5 94.3
10 17842.2 99.4
11 22321.5 115.7
12 22786.7 116.8
13 18274.1 99.8
14 22392.9 96.0
15 23899.3 115.9
16 21343.5 109.1
17 22952.3 117.3
18 21374.4 109.8
19 21164.1 112.8
20 20906.5 110.7
21 17877.4 100.0
22 20664.3 113.3
23 22160.0 122.4
24 19813.6 112.5
25 17735.4 104.2
26 19640.2 92.5
27 20844.4 117.2
28 19823.1 109.3
29 18594.6 106.1
30 21350.6 118.8
31 18574.1 105.3
32 18924.2 106.0
33 17343.4 102.0
34 19961.2 112.9
35 19932.1 116.5
36 19464.6 114.8
37 16165.4 100.5
38 17574.9 85.4
39 19795.4 114.6
40 19439.5 109.9
41 17170.0 100.7
42 21072.4 115.5
43 17751.8 100.7
44 17515.5 99.0
45 18040.3 102.3
46 19090.1 108.8
47 17746.5 105.9
48 19202.1 113.2
49 15141.6 95.7
50 16258.1 80.9
51 18586.5 113.9
52 17209.4 98.1
53 17838.7 102.8
54 19123.5 104.7
55 16583.6 95.9
56 15991.2 94.6
57 16704.4 101.6
58 17420.4 103.9
59 17872.0 110.3
60 17823.2 114.1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) indproc
2131.2 159.2
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-2468.1 -811.1 -365.0 512.2 4982.4
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2131.23 1998.51 1.066 0.291
indproc 159.16 19.04 8.360 1.53e-11 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1408 on 58 degrees of freedom
Multiple R-squared: 0.5465, Adjusted R-squared: 0.5386
F-statistic: 69.88 on 1 and 58 DF, p-value: 1.533e-11
> 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.35397193 0.707943867 0.646028066
[2,] 0.20440149 0.408802983 0.795598509
[3,] 0.12166462 0.243329241 0.878335379
[4,] 0.08234109 0.164682184 0.917658908
[5,] 0.04722922 0.094458440 0.952770780
[6,] 0.02868901 0.057378025 0.971310988
[7,] 0.17218433 0.344368669 0.827815666
[8,] 0.20163214 0.403264281 0.798367860
[9,] 0.13591445 0.271828891 0.864085554
[10,] 0.91645725 0.167085502 0.083542751
[11,] 0.96693421 0.066131578 0.033065789
[12,] 0.96634485 0.067310306 0.033655153
[13,] 0.97346675 0.053066498 0.026533249
[14,] 0.97666415 0.046671695 0.023335847
[15,] 0.97478371 0.050432588 0.025216294
[16,] 0.97391927 0.052161462 0.026080731
[17,] 0.96396666 0.072066676 0.036033338
[18,] 0.96040949 0.079181010 0.039590505
[19,] 0.96677697 0.066446069 0.033223035
[20,] 0.96280088 0.074398246 0.037199123
[21,] 0.96218335 0.075633307 0.037816654
[22,] 0.99566866 0.008662671 0.004331336
[23,] 0.99509464 0.009810724 0.004905362
[24,] 0.99409484 0.011810315 0.005905157
[25,] 0.99169760 0.016604805 0.008302402
[26,] 0.99289201 0.014215985 0.007107993
[27,] 0.98979094 0.020418128 0.010209064
[28,] 0.98614618 0.027707633 0.013853817
[29,] 0.98295113 0.034097736 0.017048868
[30,] 0.97998839 0.040023225 0.020011613
[31,] 0.97584669 0.048306611 0.024153305
[32,] 0.96957260 0.060854799 0.030427399
[33,] 0.98106292 0.037874164 0.018937082
[34,] 0.99177662 0.016446769 0.008223385
[35,] 0.98822686 0.023546281 0.011773140
[36,] 0.98504984 0.029900319 0.014950159
[37,] 0.97766660 0.044666804 0.022333402
[38,] 0.99372426 0.012551487 0.006275743
[39,] 0.98936778 0.021264437 0.010632219
[40,] 0.98197361 0.036052777 0.018026388
[41,] 0.97291064 0.054178730 0.027089365
[42,] 0.97176745 0.056465104 0.028232552
[43,] 0.95460164 0.090796714 0.045398357
[44,] 0.94710369 0.105792616 0.052896308
[45,] 0.98520931 0.029581383 0.014790691
[46,] 0.97793440 0.044131197 0.022065599
[47,] 0.95817978 0.083640438 0.041820219
[48,] 0.92001023 0.159979538 0.079989769
[49,] 0.86785478 0.264290438 0.132145219
[50,] 0.99629215 0.007415701 0.003707850
[51,] 0.98650247 0.026995057 0.013497528
> postscript(file="/var/www/html/rcomp/tmp/1rwdz1258478845.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/28dld1258478845.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/3f3kv1258478845.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/4yoe11258478845.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/5e3hc1258478845.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
-475.49000 2292.64327 -224.75190 -545.31920 -465.08481 -811.51549
7 8 9 10 11 12
-518.74175 -620.89203 -766.41661 -109.42732 1775.58157 2065.70671
13 14 15 16 17 18
258.80909 4982.41316 3321.54978 1848.03073 2151.72723 1767.51946
19 20 21 22 23 24
1079.74257 1156.37639 -169.72270 500.36309 547.71652 -223.00974
25 26 27 28 29 30
-980.19035 2786.76953 59.74313 295.79894 -423.39238 311.28879
31 32 33 34 35 36
-316.56521 -77.87648 -1022.04063 -139.07333 -741.14560 -938.07536
37 38 39 40 41 42
-1961.30218 1851.49817 -575.44357 -183.29644 -988.53397 558.31337
43 44 45 46 47 48
-406.73397 -372.46374 -372.88831 -357.62158 -1239.66058 -945.92102
49 50 51 52 53 54
-2221.13916 1250.91350 -1672.93229 -535.32067 -654.06780 328.33017
55 56 57 58 59 60
-810.97095 -1196.46430 -1597.37704 -1247.44266 -1814.46002 -2468.06408
> postscript(file="/var/www/html/rcomp/tmp/60lau1258478845.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 -475.49000 NA
1 2292.64327 -475.49000
2 -224.75190 2292.64327
3 -545.31920 -224.75190
4 -465.08481 -545.31920
5 -811.51549 -465.08481
6 -518.74175 -811.51549
7 -620.89203 -518.74175
8 -766.41661 -620.89203
9 -109.42732 -766.41661
10 1775.58157 -109.42732
11 2065.70671 1775.58157
12 258.80909 2065.70671
13 4982.41316 258.80909
14 3321.54978 4982.41316
15 1848.03073 3321.54978
16 2151.72723 1848.03073
17 1767.51946 2151.72723
18 1079.74257 1767.51946
19 1156.37639 1079.74257
20 -169.72270 1156.37639
21 500.36309 -169.72270
22 547.71652 500.36309
23 -223.00974 547.71652
24 -980.19035 -223.00974
25 2786.76953 -980.19035
26 59.74313 2786.76953
27 295.79894 59.74313
28 -423.39238 295.79894
29 311.28879 -423.39238
30 -316.56521 311.28879
31 -77.87648 -316.56521
32 -1022.04063 -77.87648
33 -139.07333 -1022.04063
34 -741.14560 -139.07333
35 -938.07536 -741.14560
36 -1961.30218 -938.07536
37 1851.49817 -1961.30218
38 -575.44357 1851.49817
39 -183.29644 -575.44357
40 -988.53397 -183.29644
41 558.31337 -988.53397
42 -406.73397 558.31337
43 -372.46374 -406.73397
44 -372.88831 -372.46374
45 -357.62158 -372.88831
46 -1239.66058 -357.62158
47 -945.92102 -1239.66058
48 -2221.13916 -945.92102
49 1250.91350 -2221.13916
50 -1672.93229 1250.91350
51 -535.32067 -1672.93229
52 -654.06780 -535.32067
53 328.33017 -654.06780
54 -810.97095 328.33017
55 -1196.46430 -810.97095
56 -1597.37704 -1196.46430
57 -1247.44266 -1597.37704
58 -1814.46002 -1247.44266
59 -2468.06408 -1814.46002
60 NA -2468.06408
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2292.64327 -475.49000
[2,] -224.75190 2292.64327
[3,] -545.31920 -224.75190
[4,] -465.08481 -545.31920
[5,] -811.51549 -465.08481
[6,] -518.74175 -811.51549
[7,] -620.89203 -518.74175
[8,] -766.41661 -620.89203
[9,] -109.42732 -766.41661
[10,] 1775.58157 -109.42732
[11,] 2065.70671 1775.58157
[12,] 258.80909 2065.70671
[13,] 4982.41316 258.80909
[14,] 3321.54978 4982.41316
[15,] 1848.03073 3321.54978
[16,] 2151.72723 1848.03073
[17,] 1767.51946 2151.72723
[18,] 1079.74257 1767.51946
[19,] 1156.37639 1079.74257
[20,] -169.72270 1156.37639
[21,] 500.36309 -169.72270
[22,] 547.71652 500.36309
[23,] -223.00974 547.71652
[24,] -980.19035 -223.00974
[25,] 2786.76953 -980.19035
[26,] 59.74313 2786.76953
[27,] 295.79894 59.74313
[28,] -423.39238 295.79894
[29,] 311.28879 -423.39238
[30,] -316.56521 311.28879
[31,] -77.87648 -316.56521
[32,] -1022.04063 -77.87648
[33,] -139.07333 -1022.04063
[34,] -741.14560 -139.07333
[35,] -938.07536 -741.14560
[36,] -1961.30218 -938.07536
[37,] 1851.49817 -1961.30218
[38,] -575.44357 1851.49817
[39,] -183.29644 -575.44357
[40,] -988.53397 -183.29644
[41,] 558.31337 -988.53397
[42,] -406.73397 558.31337
[43,] -372.46374 -406.73397
[44,] -372.88831 -372.46374
[45,] -357.62158 -372.88831
[46,] -1239.66058 -357.62158
[47,] -945.92102 -1239.66058
[48,] -2221.13916 -945.92102
[49,] 1250.91350 -2221.13916
[50,] -1672.93229 1250.91350
[51,] -535.32067 -1672.93229
[52,] -654.06780 -535.32067
[53,] 328.33017 -654.06780
[54,] -810.97095 328.33017
[55,] -1196.46430 -810.97095
[56,] -1597.37704 -1196.46430
[57,] -1247.44266 -1597.37704
[58,] -1814.46002 -1247.44266
[59,] -2468.06408 -1814.46002
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2292.64327 -475.49000
2 -224.75190 2292.64327
3 -545.31920 -224.75190
4 -465.08481 -545.31920
5 -811.51549 -465.08481
6 -518.74175 -811.51549
7 -620.89203 -518.74175
8 -766.41661 -620.89203
9 -109.42732 -766.41661
10 1775.58157 -109.42732
11 2065.70671 1775.58157
12 258.80909 2065.70671
13 4982.41316 258.80909
14 3321.54978 4982.41316
15 1848.03073 3321.54978
16 2151.72723 1848.03073
17 1767.51946 2151.72723
18 1079.74257 1767.51946
19 1156.37639 1079.74257
20 -169.72270 1156.37639
21 500.36309 -169.72270
22 547.71652 500.36309
23 -223.00974 547.71652
24 -980.19035 -223.00974
25 2786.76953 -980.19035
26 59.74313 2786.76953
27 295.79894 59.74313
28 -423.39238 295.79894
29 311.28879 -423.39238
30 -316.56521 311.28879
31 -77.87648 -316.56521
32 -1022.04063 -77.87648
33 -139.07333 -1022.04063
34 -741.14560 -139.07333
35 -938.07536 -741.14560
36 -1961.30218 -938.07536
37 1851.49817 -1961.30218
38 -575.44357 1851.49817
39 -183.29644 -575.44357
40 -988.53397 -183.29644
41 558.31337 -988.53397
42 -406.73397 558.31337
43 -372.46374 -406.73397
44 -372.88831 -372.46374
45 -357.62158 -372.88831
46 -1239.66058 -357.62158
47 -945.92102 -1239.66058
48 -2221.13916 -945.92102
49 1250.91350 -2221.13916
50 -1672.93229 1250.91350
51 -535.32067 -1672.93229
52 -654.06780 -535.32067
53 328.33017 -654.06780
54 -810.97095 328.33017
55 -1196.46430 -810.97095
56 -1597.37704 -1196.46430
57 -1247.44266 -1597.37704
58 -1814.46002 -1247.44266
59 -2468.06408 -1814.46002
> 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/7ia2w1258478845.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/8fg6v1258478845.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/93bh81258478845.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/104iwq1258478845.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/11mx6i1258478845.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/12s3zq1258478845.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/13on2g1258478845.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/14emo61258478845.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/155zc61258478845.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/16t7fy1258478846.tab")
+ }
>
> system("convert tmp/1rwdz1258478845.ps tmp/1rwdz1258478845.png")
> system("convert tmp/28dld1258478845.ps tmp/28dld1258478845.png")
> system("convert tmp/3f3kv1258478845.ps tmp/3f3kv1258478845.png")
> system("convert tmp/4yoe11258478845.ps tmp/4yoe11258478845.png")
> system("convert tmp/5e3hc1258478845.ps tmp/5e3hc1258478845.png")
> system("convert tmp/60lau1258478845.ps tmp/60lau1258478845.png")
> system("convert tmp/7ia2w1258478845.ps tmp/7ia2w1258478845.png")
> system("convert tmp/8fg6v1258478845.ps tmp/8fg6v1258478845.png")
> system("convert tmp/93bh81258478845.ps tmp/93bh81258478845.png")
> system("convert tmp/104iwq1258478845.ps tmp/104iwq1258478845.png")
>
>
> proc.time()
user system elapsed
2.607 1.640 4.917