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(20366,1,22782,1,19169,1,13807,1,29743,1,25591,1,29096,1,26482,1,22405,1,27044,1,17970,1,18730,1,19684,1,19785,1,18479,1,10698,1,31956,1,29506,1,34506,1,27165,1,26736,1,23691,1,18157,1,17328,1,18205,1,20995,1,17382,1,9367,1,31124,1,26551,1,30651,1,25859,1,25100,1,25778,1,20418,1,18688,1,20424,1,24776,1,19814,1,12738,1,31566,1,30111,1,30019,1,31934,1,25826,1,26835,1,20205,1,17789,1,20520,1,22518,1,15572,0,11509,0,25447,0,24090,0,27786,0,26195,0,20516,0,22759,0,19028,0,16971,0),dim=c(2,60),dimnames=list(c('wagens','dummies'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('wagens','dummies'),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 = 'Include Monthly 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
wagens dummies M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 20366 1 1 0 0 0 0 0 0 0 0 0 0
2 22782 1 0 1 0 0 0 0 0 0 0 0 0
3 19169 1 0 0 1 0 0 0 0 0 0 0 0
4 13807 1 0 0 0 1 0 0 0 0 0 0 0
5 29743 1 0 0 0 0 1 0 0 0 0 0 0
6 25591 1 0 0 0 0 0 1 0 0 0 0 0
7 29096 1 0 0 0 0 0 0 1 0 0 0 0
8 26482 1 0 0 0 0 0 0 0 1 0 0 0
9 22405 1 0 0 0 0 0 0 0 0 1 0 0
10 27044 1 0 0 0 0 0 0 0 0 0 1 0
11 17970 1 0 0 0 0 0 0 0 0 0 0 1
12 18730 1 0 0 0 0 0 0 0 0 0 0 0
13 19684 1 1 0 0 0 0 0 0 0 0 0 0
14 19785 1 0 1 0 0 0 0 0 0 0 0 0
15 18479 1 0 0 1 0 0 0 0 0 0 0 0
16 10698 1 0 0 0 1 0 0 0 0 0 0 0
17 31956 1 0 0 0 0 1 0 0 0 0 0 0
18 29506 1 0 0 0 0 0 1 0 0 0 0 0
19 34506 1 0 0 0 0 0 0 1 0 0 0 0
20 27165 1 0 0 0 0 0 0 0 1 0 0 0
21 26736 1 0 0 0 0 0 0 0 0 1 0 0
22 23691 1 0 0 0 0 0 0 0 0 0 1 0
23 18157 1 0 0 0 0 0 0 0 0 0 0 1
24 17328 1 0 0 0 0 0 0 0 0 0 0 0
25 18205 1 1 0 0 0 0 0 0 0 0 0 0
26 20995 1 0 1 0 0 0 0 0 0 0 0 0
27 17382 1 0 0 1 0 0 0 0 0 0 0 0
28 9367 1 0 0 0 1 0 0 0 0 0 0 0
29 31124 1 0 0 0 0 1 0 0 0 0 0 0
30 26551 1 0 0 0 0 0 1 0 0 0 0 0
31 30651 1 0 0 0 0 0 0 1 0 0 0 0
32 25859 1 0 0 0 0 0 0 0 1 0 0 0
33 25100 1 0 0 0 0 0 0 0 0 1 0 0
34 25778 1 0 0 0 0 0 0 0 0 0 1 0
35 20418 1 0 0 0 0 0 0 0 0 0 0 1
36 18688 1 0 0 0 0 0 0 0 0 0 0 0
37 20424 1 1 0 0 0 0 0 0 0 0 0 0
38 24776 1 0 1 0 0 0 0 0 0 0 0 0
39 19814 1 0 0 1 0 0 0 0 0 0 0 0
40 12738 1 0 0 0 1 0 0 0 0 0 0 0
41 31566 1 0 0 0 0 1 0 0 0 0 0 0
42 30111 1 0 0 0 0 0 1 0 0 0 0 0
43 30019 1 0 0 0 0 0 0 1 0 0 0 0
44 31934 1 0 0 0 0 0 0 0 1 0 0 0
45 25826 1 0 0 0 0 0 0 0 0 1 0 0
46 26835 1 0 0 0 0 0 0 0 0 0 1 0
47 20205 1 0 0 0 0 0 0 0 0 0 0 1
48 17789 1 0 0 0 0 0 0 0 0 0 0 0
49 20520 1 1 0 0 0 0 0 0 0 0 0 0
50 22518 1 0 1 0 0 0 0 0 0 0 0 0
51 15572 0 0 0 1 0 0 0 0 0 0 0 0
52 11509 0 0 0 0 1 0 0 0 0 0 0 0
53 25447 0 0 0 0 0 1 0 0 0 0 0 0
54 24090 0 0 0 0 0 0 1 0 0 0 0 0
55 27786 0 0 0 0 0 0 0 1 0 0 0 0
56 26195 0 0 0 0 0 0 0 0 1 0 0 0
57 20516 0 0 0 0 0 0 0 0 0 1 0 0
58 22759 0 0 0 0 0 0 0 0 0 0 1 0
59 19028 0 0 0 0 0 0 0 0 0 0 0 1
60 16971 0 0 0 0 0 0 0 0 0 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) dummies M1 M2 M3 M4
15771 2663 1406 3737 182 -6277
M5 M6 M7 M8 M9 M10
12066 9269 12510 9626 6215 7320
M11
1254
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-2789.4 -1190.6 139.1 1069.9 3874.4
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15771 910 17.330 < 2e-16 ***
dummies 2663 608 4.380 6.60e-05 ***
M1 1406 1094 1.285 0.20522
M2 3737 1094 3.415 0.00132 **
M3 182 1088 0.167 0.86783
M4 -6277 1088 -5.771 5.96e-07 ***
M5 12066 1088 11.093 1.01e-14 ***
M6 9269 1088 8.521 4.30e-11 ***
M7 12510 1088 11.502 2.90e-15 ***
M8 9626 1088 8.850 1.42e-11 ***
M9 6215 1088 5.714 7.27e-07 ***
M10 7320 1088 6.730 2.10e-08 ***
M11 1254 1088 1.153 0.25464
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1720 on 47 degrees of freedom
Multiple R-squared: 0.9289, Adjusted R-squared: 0.9108
F-statistic: 51.17 on 12 and 47 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.5997137 0.8005726 0.40028628
[2,] 0.5440761 0.9118479 0.45592394
[3,] 0.6675520 0.6648960 0.33244799
[4,] 0.8899952 0.2200097 0.11000483
[5,] 0.8369810 0.3260379 0.16301897
[6,] 0.8852705 0.2294590 0.11472949
[7,] 0.8955130 0.2089739 0.10448695
[8,] 0.8714857 0.2570285 0.12851427
[9,] 0.8300889 0.3398222 0.16991108
[10,] 0.8120166 0.3759667 0.18798336
[11,] 0.7842271 0.4315458 0.21577288
[12,] 0.7455985 0.5088031 0.25440153
[13,] 0.8655009 0.2689983 0.13449913
[14,] 0.8132874 0.3734251 0.18671257
[15,] 0.7915256 0.4169489 0.20847444
[16,] 0.7228523 0.5542954 0.27714769
[17,] 0.9111025 0.1777949 0.08889747
[18,] 0.8636974 0.2726053 0.13630263
[19,] 0.8088555 0.3822890 0.19114449
[20,] 0.7792433 0.4415133 0.22075667
[21,] 0.6993920 0.6012160 0.30060800
[22,] 0.6057641 0.7884719 0.39423594
[23,] 0.6637750 0.6724499 0.33622496
[24,] 0.5696316 0.8607368 0.43036842
[25,] 0.5710164 0.8579671 0.42898357
[26,] 0.5472413 0.9055173 0.45275866
[27,] 0.5939652 0.8120696 0.40603480
[28,] 0.4756033 0.9512066 0.52439672
[29,] 0.5717782 0.8564436 0.42822178
> postscript(file="/var/www/html/rcomp/tmp/1tag61261770092.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/2z9rb1261770092.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/3rewq1261770092.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/44iw11261770092.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/56g7k1261770092.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 60
Frequency = 1
1 2 3 4 5 6 7 8
526.20 610.80 553.19 1650.59 -756.81 -2111.41 -1848.21 -1577.61
9 10 11 12 13 14 15 16
-2244.21 1289.99 -1718.21 296.19 -155.80 -2386.20 -136.81 -1458.41
17 18 19 20 21 22 23 24
1456.19 1803.59 3561.79 -894.61 2086.79 -2063.01 -1531.21 -1105.81
25 26 27 28 29 30 31 32
-1634.80 -1176.20 -1233.81 -2789.41 624.19 -1151.41 -293.21 -2200.61
33 34 35 36 37 38 39 40
450.79 23.99 729.79 254.19 584.20 2604.80 1198.19 581.59
41 42 43 44 45 46 47 48
1066.19 2408.59 -925.21 3874.39 1176.79 1080.99 516.79 -644.81
49 50 51 52 53 54 55 56
680.20 346.80 -380.76 2015.64 -2389.76 -949.36 -495.16 798.44
57 58 59 60
-1470.16 -331.96 2002.84 1200.24
> postscript(file="/var/www/html/rcomp/tmp/61e9j1261770092.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 526.20 NA
1 610.80 526.20
2 553.19 610.80
3 1650.59 553.19
4 -756.81 1650.59
5 -2111.41 -756.81
6 -1848.21 -2111.41
7 -1577.61 -1848.21
8 -2244.21 -1577.61
9 1289.99 -2244.21
10 -1718.21 1289.99
11 296.19 -1718.21
12 -155.80 296.19
13 -2386.20 -155.80
14 -136.81 -2386.20
15 -1458.41 -136.81
16 1456.19 -1458.41
17 1803.59 1456.19
18 3561.79 1803.59
19 -894.61 3561.79
20 2086.79 -894.61
21 -2063.01 2086.79
22 -1531.21 -2063.01
23 -1105.81 -1531.21
24 -1634.80 -1105.81
25 -1176.20 -1634.80
26 -1233.81 -1176.20
27 -2789.41 -1233.81
28 624.19 -2789.41
29 -1151.41 624.19
30 -293.21 -1151.41
31 -2200.61 -293.21
32 450.79 -2200.61
33 23.99 450.79
34 729.79 23.99
35 254.19 729.79
36 584.20 254.19
37 2604.80 584.20
38 1198.19 2604.80
39 581.59 1198.19
40 1066.19 581.59
41 2408.59 1066.19
42 -925.21 2408.59
43 3874.39 -925.21
44 1176.79 3874.39
45 1080.99 1176.79
46 516.79 1080.99
47 -644.81 516.79
48 680.20 -644.81
49 346.80 680.20
50 -380.76 346.80
51 2015.64 -380.76
52 -2389.76 2015.64
53 -949.36 -2389.76
54 -495.16 -949.36
55 798.44 -495.16
56 -1470.16 798.44
57 -331.96 -1470.16
58 2002.84 -331.96
59 1200.24 2002.84
60 NA 1200.24
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 610.80 526.20
[2,] 553.19 610.80
[3,] 1650.59 553.19
[4,] -756.81 1650.59
[5,] -2111.41 -756.81
[6,] -1848.21 -2111.41
[7,] -1577.61 -1848.21
[8,] -2244.21 -1577.61
[9,] 1289.99 -2244.21
[10,] -1718.21 1289.99
[11,] 296.19 -1718.21
[12,] -155.80 296.19
[13,] -2386.20 -155.80
[14,] -136.81 -2386.20
[15,] -1458.41 -136.81
[16,] 1456.19 -1458.41
[17,] 1803.59 1456.19
[18,] 3561.79 1803.59
[19,] -894.61 3561.79
[20,] 2086.79 -894.61
[21,] -2063.01 2086.79
[22,] -1531.21 -2063.01
[23,] -1105.81 -1531.21
[24,] -1634.80 -1105.81
[25,] -1176.20 -1634.80
[26,] -1233.81 -1176.20
[27,] -2789.41 -1233.81
[28,] 624.19 -2789.41
[29,] -1151.41 624.19
[30,] -293.21 -1151.41
[31,] -2200.61 -293.21
[32,] 450.79 -2200.61
[33,] 23.99 450.79
[34,] 729.79 23.99
[35,] 254.19 729.79
[36,] 584.20 254.19
[37,] 2604.80 584.20
[38,] 1198.19 2604.80
[39,] 581.59 1198.19
[40,] 1066.19 581.59
[41,] 2408.59 1066.19
[42,] -925.21 2408.59
[43,] 3874.39 -925.21
[44,] 1176.79 3874.39
[45,] 1080.99 1176.79
[46,] 516.79 1080.99
[47,] -644.81 516.79
[48,] 680.20 -644.81
[49,] 346.80 680.20
[50,] -380.76 346.80
[51,] 2015.64 -380.76
[52,] -2389.76 2015.64
[53,] -949.36 -2389.76
[54,] -495.16 -949.36
[55,] 798.44 -495.16
[56,] -1470.16 798.44
[57,] -331.96 -1470.16
[58,] 2002.84 -331.96
[59,] 1200.24 2002.84
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 610.80 526.20
2 553.19 610.80
3 1650.59 553.19
4 -756.81 1650.59
5 -2111.41 -756.81
6 -1848.21 -2111.41
7 -1577.61 -1848.21
8 -2244.21 -1577.61
9 1289.99 -2244.21
10 -1718.21 1289.99
11 296.19 -1718.21
12 -155.80 296.19
13 -2386.20 -155.80
14 -136.81 -2386.20
15 -1458.41 -136.81
16 1456.19 -1458.41
17 1803.59 1456.19
18 3561.79 1803.59
19 -894.61 3561.79
20 2086.79 -894.61
21 -2063.01 2086.79
22 -1531.21 -2063.01
23 -1105.81 -1531.21
24 -1634.80 -1105.81
25 -1176.20 -1634.80
26 -1233.81 -1176.20
27 -2789.41 -1233.81
28 624.19 -2789.41
29 -1151.41 624.19
30 -293.21 -1151.41
31 -2200.61 -293.21
32 450.79 -2200.61
33 23.99 450.79
34 729.79 23.99
35 254.19 729.79
36 584.20 254.19
37 2604.80 584.20
38 1198.19 2604.80
39 581.59 1198.19
40 1066.19 581.59
41 2408.59 1066.19
42 -925.21 2408.59
43 3874.39 -925.21
44 1176.79 3874.39
45 1080.99 1176.79
46 516.79 1080.99
47 -644.81 516.79
48 680.20 -644.81
49 346.80 680.20
50 -380.76 346.80
51 2015.64 -380.76
52 -2389.76 2015.64
53 -949.36 -2389.76
54 -495.16 -949.36
55 798.44 -495.16
56 -1470.16 798.44
57 -331.96 -1470.16
58 2002.84 -331.96
59 1200.24 2002.84
> 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/7t67b1261770092.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/8urky1261770092.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/9kpf21261770092.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/100km61261770092.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/116gkj1261770092.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/12dy3s1261770092.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/13msc21261770092.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/14lixq1261770092.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/15jg2f1261770092.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/16x0tv1261770093.tab")
+ }
>
> try(system("convert tmp/1tag61261770092.ps tmp/1tag61261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/2z9rb1261770092.ps tmp/2z9rb1261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/3rewq1261770092.ps tmp/3rewq1261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/44iw11261770092.ps tmp/44iw11261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/56g7k1261770092.ps tmp/56g7k1261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/61e9j1261770092.ps tmp/61e9j1261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/7t67b1261770092.ps tmp/7t67b1261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/8urky1261770092.ps tmp/8urky1261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/9kpf21261770092.ps tmp/9kpf21261770092.png",intern=TRUE))
character(0)
> try(system("convert tmp/100km61261770092.ps tmp/100km61261770092.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.442 1.610 3.792