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(114.08,136.49,112.95,142.62,135.31,141.71,134.31,149.51,133.03,147.39,140.11,131.96,124.69,136.38,131.68,127.34,150.95,133.85,137.26,125.14,130.51,141.25,143.15,149.32,118.01,120.92,122.56,134.85,147.97,131.93,135.74,134.22,151.62,143.07,154.82,145.37,145.59,134.32,147.12,126.31,175.86,162.21,140.66,124.09,152.69,153.91,154.38,154.34,132.45,138.70,136.44,150.98,153.24,146.39,154.11,178.30,155.93,168.23,142.53,162.52,148.73,158.86,147.73,152.17,166.79,171.01,144.30,171.49,156.07,189.62,161.70,177.46,152.10,179.98,140.45,156.96,155.56,167.89,174.53,194.78,167.16,192.78,159.48,165.06,173.22,196.60,176.13,151.64,180.31,187.02,185.84,210.99,169.43,219.08,195.25,235.68,174.99,241.44,156.42,187.46,182.08,229.57,182.00,208.44,153.28,215.09,136.72,217.00,130.19,171.08,132.04,178.41,143.89,196.34,133.38,172.11,127.98,154.93,150.45,182.26,133.55,181.74),dim=c(2,61),dimnames=list(c('InvoerEU','InvoerAM'),1:61))
> y <- array(NA,dim=c(2,61),dimnames=list(c('InvoerEU','InvoerAM'),1:61))
> 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
InvoerEU InvoerAM
1 114.08 136.49
2 112.95 142.62
3 135.31 141.71
4 134.31 149.51
5 133.03 147.39
6 140.11 131.96
7 124.69 136.38
8 131.68 127.34
9 150.95 133.85
10 137.26 125.14
11 130.51 141.25
12 143.15 149.32
13 118.01 120.92
14 122.56 134.85
15 147.97 131.93
16 135.74 134.22
17 151.62 143.07
18 154.82 145.37
19 145.59 134.32
20 147.12 126.31
21 175.86 162.21
22 140.66 124.09
23 152.69 153.91
24 154.38 154.34
25 132.45 138.70
26 136.44 150.98
27 153.24 146.39
28 154.11 178.30
29 155.93 168.23
30 142.53 162.52
31 148.73 158.86
32 147.73 152.17
33 166.79 171.01
34 144.30 171.49
35 156.07 189.62
36 161.70 177.46
37 152.10 179.98
38 140.45 156.96
39 155.56 167.89
40 174.53 194.78
41 167.16 192.78
42 159.48 165.06
43 173.22 196.60
44 176.13 151.64
45 180.31 187.02
46 185.84 210.99
47 169.43 219.08
48 195.25 235.68
49 174.99 241.44
50 156.42 187.46
51 182.08 229.57
52 182.00 208.44
53 153.28 215.09
54 136.72 217.00
55 130.19 171.08
56 132.04 178.41
57 143.89 196.34
58 133.38 172.11
59 127.98 154.93
60 150.45 182.26
61 133.55 181.74
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) InvoerAM
82.0824 0.4059
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-33.433 -8.451 -0.336 10.407 32.504
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 82.08238 10.05044 8.167 2.86e-11 ***
InvoerAM 0.40585 0.05979 6.788 6.19e-09 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 14.01 on 59 degrees of freedom
Multiple R-squared: 0.4385, Adjusted R-squared: 0.429
F-statistic: 46.07 on 1 and 59 DF, p-value: 6.187e-09
> 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.326189404 0.652378808 0.6738106
[2,] 0.533955551 0.932088898 0.4660444
[3,] 0.401683345 0.803366690 0.5983167
[4,] 0.287483874 0.574967748 0.7125161
[5,] 0.444946977 0.889893954 0.5550530
[6,] 0.334427757 0.668855514 0.6655722
[7,] 0.245667223 0.491334447 0.7543328
[8,] 0.245455456 0.490910913 0.7545445
[9,] 0.255882171 0.511764342 0.7441178
[10,] 0.228607012 0.457214024 0.7713930
[11,] 0.270652801 0.541305602 0.7293472
[12,] 0.207173549 0.414347099 0.7928265
[13,] 0.247299306 0.494598612 0.7527007
[14,] 0.293979929 0.587959858 0.7060201
[15,] 0.264975353 0.529950705 0.7350246
[16,] 0.260498327 0.520996654 0.7395017
[17,] 0.489071673 0.978143346 0.5109283
[18,] 0.446792938 0.893585875 0.5532071
[19,] 0.384135820 0.768271641 0.6158642
[20,] 0.330852285 0.661704569 0.6691477
[21,] 0.275546628 0.551093256 0.7244534
[22,] 0.237520477 0.475040955 0.7624795
[23,] 0.212467742 0.424935484 0.7875323
[24,] 0.168750033 0.337500067 0.8312500
[25,] 0.127837378 0.255674756 0.8721626
[26,] 0.101138416 0.202276832 0.8988616
[27,] 0.071653413 0.143306826 0.9283466
[28,] 0.050235733 0.100471466 0.9497643
[29,] 0.048542524 0.097085048 0.9514575
[30,] 0.039652647 0.079305294 0.9603474
[31,] 0.028018814 0.056037627 0.9719812
[32,] 0.019770785 0.039541570 0.9802292
[33,] 0.012962587 0.025925173 0.9870374
[34,] 0.008385779 0.016771559 0.9916142
[35,] 0.005282974 0.010565948 0.9947170
[36,] 0.004417987 0.008835973 0.9955820
[37,] 0.002730570 0.005461139 0.9972694
[38,] 0.002193128 0.004386256 0.9978069
[39,] 0.001636190 0.003272380 0.9983638
[40,] 0.055003772 0.110007545 0.9449962
[41,] 0.181538892 0.363077784 0.8184611
[42,] 0.273131858 0.546263716 0.7268681
[43,] 0.226360010 0.452720020 0.7736400
[44,] 0.282069579 0.564139157 0.7179304
[45,] 0.240464626 0.480929251 0.7595354
[46,] 0.224293787 0.448587574 0.7757062
[47,] 0.236474794 0.472949587 0.7635252
[48,] 0.895195185 0.209609629 0.1048048
[49,] 0.901283299 0.197433401 0.0987167
[50,] 0.943303301 0.113393399 0.0566967
[51,] 0.896730496 0.206539007 0.1032695
[52,] 0.835865027 0.328269947 0.1641350
> postscript(file="/var/www/html/rcomp/tmp/1z7661259087054.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/2uzh51259087054.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/39yrk1259087054.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/4dpm01259087054.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/5tc4d1259087054.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 = 61
Frequency = 1
1 2 3 4 5 6
-23.3972903 -27.0151705 -4.2858441 -8.4514992 -8.8710903 4.4712248
7 8 9 10 11 12
-12.7426464 -2.0837333 14.5441622 4.3891438 -8.8991516 0.4656129
13 14 15 16 17 18
-13.1481556 -14.2516910 12.3434004 -0.8160034 11.4721956 13.7387332
19 20 21 22 23 24
8.9934112 13.7742955 27.9441649 8.2152897 8.1427467 9.6582298
25 26 27 28 29 30
-5.9242259 -6.9181034 11.7447629 -0.3360134 5.5709286 -5.5116496
31 32 33 34 35 36
2.1737732 3.8889313 15.3026566 -7.3821529 -2.9702718 7.5949033
37 38 39 40 41 42
-3.0278468 -5.3351057 5.3389187 13.3955256 6.8372320 10.4074833
43 44 45 46 47 48
11.3468727 32.5040335 22.3249466 18.1266449 -1.5667077 17.5161289
49 50 51 52 53 54
-5.0815857 -1.7436289 6.8258921 15.3215706 -16.0973533 -33.4325330
55 56 57 58 59 60
-21.3257531 -22.4506572 -17.8776054 -18.5537819 -16.9812236 -5.6031921
61
-22.2921484
> postscript(file="/var/www/html/rcomp/tmp/6vmlp1259087054.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 = 61
Frequency = 1
lag(myerror, k = 1) myerror
0 -23.3972903 NA
1 -27.0151705 -23.3972903
2 -4.2858441 -27.0151705
3 -8.4514992 -4.2858441
4 -8.8710903 -8.4514992
5 4.4712248 -8.8710903
6 -12.7426464 4.4712248
7 -2.0837333 -12.7426464
8 14.5441622 -2.0837333
9 4.3891438 14.5441622
10 -8.8991516 4.3891438
11 0.4656129 -8.8991516
12 -13.1481556 0.4656129
13 -14.2516910 -13.1481556
14 12.3434004 -14.2516910
15 -0.8160034 12.3434004
16 11.4721956 -0.8160034
17 13.7387332 11.4721956
18 8.9934112 13.7387332
19 13.7742955 8.9934112
20 27.9441649 13.7742955
21 8.2152897 27.9441649
22 8.1427467 8.2152897
23 9.6582298 8.1427467
24 -5.9242259 9.6582298
25 -6.9181034 -5.9242259
26 11.7447629 -6.9181034
27 -0.3360134 11.7447629
28 5.5709286 -0.3360134
29 -5.5116496 5.5709286
30 2.1737732 -5.5116496
31 3.8889313 2.1737732
32 15.3026566 3.8889313
33 -7.3821529 15.3026566
34 -2.9702718 -7.3821529
35 7.5949033 -2.9702718
36 -3.0278468 7.5949033
37 -5.3351057 -3.0278468
38 5.3389187 -5.3351057
39 13.3955256 5.3389187
40 6.8372320 13.3955256
41 10.4074833 6.8372320
42 11.3468727 10.4074833
43 32.5040335 11.3468727
44 22.3249466 32.5040335
45 18.1266449 22.3249466
46 -1.5667077 18.1266449
47 17.5161289 -1.5667077
48 -5.0815857 17.5161289
49 -1.7436289 -5.0815857
50 6.8258921 -1.7436289
51 15.3215706 6.8258921
52 -16.0973533 15.3215706
53 -33.4325330 -16.0973533
54 -21.3257531 -33.4325330
55 -22.4506572 -21.3257531
56 -17.8776054 -22.4506572
57 -18.5537819 -17.8776054
58 -16.9812236 -18.5537819
59 -5.6031921 -16.9812236
60 -22.2921484 -5.6031921
61 NA -22.2921484
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -27.0151705 -23.3972903
[2,] -4.2858441 -27.0151705
[3,] -8.4514992 -4.2858441
[4,] -8.8710903 -8.4514992
[5,] 4.4712248 -8.8710903
[6,] -12.7426464 4.4712248
[7,] -2.0837333 -12.7426464
[8,] 14.5441622 -2.0837333
[9,] 4.3891438 14.5441622
[10,] -8.8991516 4.3891438
[11,] 0.4656129 -8.8991516
[12,] -13.1481556 0.4656129
[13,] -14.2516910 -13.1481556
[14,] 12.3434004 -14.2516910
[15,] -0.8160034 12.3434004
[16,] 11.4721956 -0.8160034
[17,] 13.7387332 11.4721956
[18,] 8.9934112 13.7387332
[19,] 13.7742955 8.9934112
[20,] 27.9441649 13.7742955
[21,] 8.2152897 27.9441649
[22,] 8.1427467 8.2152897
[23,] 9.6582298 8.1427467
[24,] -5.9242259 9.6582298
[25,] -6.9181034 -5.9242259
[26,] 11.7447629 -6.9181034
[27,] -0.3360134 11.7447629
[28,] 5.5709286 -0.3360134
[29,] -5.5116496 5.5709286
[30,] 2.1737732 -5.5116496
[31,] 3.8889313 2.1737732
[32,] 15.3026566 3.8889313
[33,] -7.3821529 15.3026566
[34,] -2.9702718 -7.3821529
[35,] 7.5949033 -2.9702718
[36,] -3.0278468 7.5949033
[37,] -5.3351057 -3.0278468
[38,] 5.3389187 -5.3351057
[39,] 13.3955256 5.3389187
[40,] 6.8372320 13.3955256
[41,] 10.4074833 6.8372320
[42,] 11.3468727 10.4074833
[43,] 32.5040335 11.3468727
[44,] 22.3249466 32.5040335
[45,] 18.1266449 22.3249466
[46,] -1.5667077 18.1266449
[47,] 17.5161289 -1.5667077
[48,] -5.0815857 17.5161289
[49,] -1.7436289 -5.0815857
[50,] 6.8258921 -1.7436289
[51,] 15.3215706 6.8258921
[52,] -16.0973533 15.3215706
[53,] -33.4325330 -16.0973533
[54,] -21.3257531 -33.4325330
[55,] -22.4506572 -21.3257531
[56,] -17.8776054 -22.4506572
[57,] -18.5537819 -17.8776054
[58,] -16.9812236 -18.5537819
[59,] -5.6031921 -16.9812236
[60,] -22.2921484 -5.6031921
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -27.0151705 -23.3972903
2 -4.2858441 -27.0151705
3 -8.4514992 -4.2858441
4 -8.8710903 -8.4514992
5 4.4712248 -8.8710903
6 -12.7426464 4.4712248
7 -2.0837333 -12.7426464
8 14.5441622 -2.0837333
9 4.3891438 14.5441622
10 -8.8991516 4.3891438
11 0.4656129 -8.8991516
12 -13.1481556 0.4656129
13 -14.2516910 -13.1481556
14 12.3434004 -14.2516910
15 -0.8160034 12.3434004
16 11.4721956 -0.8160034
17 13.7387332 11.4721956
18 8.9934112 13.7387332
19 13.7742955 8.9934112
20 27.9441649 13.7742955
21 8.2152897 27.9441649
22 8.1427467 8.2152897
23 9.6582298 8.1427467
24 -5.9242259 9.6582298
25 -6.9181034 -5.9242259
26 11.7447629 -6.9181034
27 -0.3360134 11.7447629
28 5.5709286 -0.3360134
29 -5.5116496 5.5709286
30 2.1737732 -5.5116496
31 3.8889313 2.1737732
32 15.3026566 3.8889313
33 -7.3821529 15.3026566
34 -2.9702718 -7.3821529
35 7.5949033 -2.9702718
36 -3.0278468 7.5949033
37 -5.3351057 -3.0278468
38 5.3389187 -5.3351057
39 13.3955256 5.3389187
40 6.8372320 13.3955256
41 10.4074833 6.8372320
42 11.3468727 10.4074833
43 32.5040335 11.3468727
44 22.3249466 32.5040335
45 18.1266449 22.3249466
46 -1.5667077 18.1266449
47 17.5161289 -1.5667077
48 -5.0815857 17.5161289
49 -1.7436289 -5.0815857
50 6.8258921 -1.7436289
51 15.3215706 6.8258921
52 -16.0973533 15.3215706
53 -33.4325330 -16.0973533
54 -21.3257531 -33.4325330
55 -22.4506572 -21.3257531
56 -17.8776054 -22.4506572
57 -18.5537819 -17.8776054
58 -16.9812236 -18.5537819
59 -5.6031921 -16.9812236
60 -22.2921484 -5.6031921
> 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/7e0zj1259087054.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/8al1s1259087054.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/9ckz51259087054.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/10gusl1259087054.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/110xws1259087054.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/120s3o1259087054.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/13afm41259087054.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/14s5t61259087054.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/15sz6o1259087054.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/16su6w1259087054.tab")
+ }
>
> system("convert tmp/1z7661259087054.ps tmp/1z7661259087054.png")
> system("convert tmp/2uzh51259087054.ps tmp/2uzh51259087054.png")
> system("convert tmp/39yrk1259087054.ps tmp/39yrk1259087054.png")
> system("convert tmp/4dpm01259087054.ps tmp/4dpm01259087054.png")
> system("convert tmp/5tc4d1259087054.ps tmp/5tc4d1259087054.png")
> system("convert tmp/6vmlp1259087054.ps tmp/6vmlp1259087054.png")
> system("convert tmp/7e0zj1259087054.ps tmp/7e0zj1259087054.png")
> system("convert tmp/8al1s1259087054.ps tmp/8al1s1259087054.png")
> system("convert tmp/9ckz51259087054.ps tmp/9ckz51259087054.png")
> system("convert tmp/10gusl1259087054.ps tmp/10gusl1259087054.png")
>
>
> proc.time()
user system elapsed
2.462 1.582 3.634