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(1.3,2,1.2,2.1,1.1,2.1,1.4,2.5,1.2,2.2,1.5,2.3,1.1,2.3,1.3,2.2,1.5,2.2,1.1,1.6,1.4,1.8,1.3,1.7,1.5,1.9,1.6,1.8,1.7,1.9,1.1,1.5,1.6,1,1.3,0.8,1.7,1.1,1.6,1.5,1.7,1.7,1.9,2.3,1.8,2.4,1.9,3,1.6,3,1.5,3.2,1.6,3.2,1.6,3.2,1.7,3.5,2,4,2,4.3,1.9,4.1,1.7,4,1.8,4.1,1.9,4.2,1.7,4.5,2,5.6,2.1,6.5,2.4,7.6,2.5,8.5,2.5,8.7,2.6,8.3,2.2,8.3,2.5,8.5,2.8,8.7,2.8,8.7,2.9,8.5,3,7.9,3.1,7,2.9,5.8,2.7,4.5,2.2,3.7,2.5,3.1,2.3,2.7,2.6,2.3,2.3,1.8,2.2,1.5,1.8,1.2,1.8,1),dim=c(2,59),dimnames=list(c('inflatie','inflatie_levensmiddelen'),1:59))
> y <- array(NA,dim=c(2,59),dimnames=list(c('inflatie','inflatie_levensmiddelen'),1:59))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = '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
inflatie inflatie_levensmiddelen t
1 1.3 2.0 1
2 1.2 2.1 2
3 1.1 2.1 3
4 1.4 2.5 4
5 1.2 2.2 5
6 1.5 2.3 6
7 1.1 2.3 7
8 1.3 2.2 8
9 1.5 2.2 9
10 1.1 1.6 10
11 1.4 1.8 11
12 1.3 1.7 12
13 1.5 1.9 13
14 1.6 1.8 14
15 1.7 1.9 15
16 1.1 1.5 16
17 1.6 1.0 17
18 1.3 0.8 18
19 1.7 1.1 19
20 1.6 1.5 20
21 1.7 1.7 21
22 1.9 2.3 22
23 1.8 2.4 23
24 1.9 3.0 24
25 1.6 3.0 25
26 1.5 3.2 26
27 1.6 3.2 27
28 1.6 3.2 28
29 1.7 3.5 29
30 2.0 4.0 30
31 2.0 4.3 31
32 1.9 4.1 32
33 1.7 4.0 33
34 1.8 4.1 34
35 1.9 4.2 35
36 1.7 4.5 36
37 2.0 5.6 37
38 2.1 6.5 38
39 2.4 7.6 39
40 2.5 8.5 40
41 2.5 8.7 41
42 2.6 8.3 42
43 2.2 8.3 43
44 2.5 8.5 44
45 2.8 8.7 45
46 2.8 8.7 46
47 2.9 8.5 47
48 3.0 7.9 48
49 3.1 7.0 49
50 2.9 5.8 50
51 2.7 4.5 51
52 2.2 3.7 52
53 2.5 3.1 53
54 2.3 2.7 54
55 2.6 2.3 55
56 2.3 1.8 56
57 2.2 1.5 57
58 1.8 1.2 58
59 1.8 1.0 59
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) inflatie_levensmiddelen t
0.95958 0.10015 0.01903
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.409331 -0.155255 0.005243 0.166350 0.506665
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.959584 0.062711 15.302 < 2e-16 ***
inflatie_levensmiddelen 0.100155 0.013508 7.414 7.15e-10 ***
t 0.019034 0.001952 9.750 1.14e-13 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2226 on 56 degrees of freedom
Multiple R-squared: 0.8384, Adjusted R-squared: 0.8327
F-statistic: 145.3 on 2 and 56 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.259293064 0.51858613 0.7407069
[2,] 0.242322467 0.48464493 0.7576775
[3,] 0.160258027 0.32051605 0.8397420
[4,] 0.171541431 0.34308286 0.8284586
[5,] 0.105780860 0.21156172 0.8942191
[6,] 0.085479304 0.17095861 0.9145207
[7,] 0.047741446 0.09548289 0.9522586
[8,] 0.033692987 0.06738597 0.9663070
[9,] 0.033315711 0.06663142 0.9666843
[10,] 0.032870581 0.06574116 0.9671294
[11,] 0.067476747 0.13495349 0.9325233
[12,] 0.111685539 0.22337108 0.8883145
[13,] 0.075077952 0.15015590 0.9249220
[14,] 0.090807554 0.18161511 0.9091924
[15,] 0.063987914 0.12797583 0.9360121
[16,] 0.048558311 0.09711662 0.9514417
[17,] 0.049559848 0.09911970 0.9504402
[18,] 0.049072407 0.09814481 0.9509276
[19,] 0.057134965 0.11426993 0.9428650
[20,] 0.094004517 0.18800903 0.9059955
[21,] 0.138417406 0.27683481 0.8615826
[22,] 0.121191132 0.24238226 0.8788089
[23,] 0.099999997 0.19999999 0.9000000
[24,] 0.072242804 0.14448561 0.9277572
[25,] 0.083009682 0.16601936 0.9169903
[26,] 0.084116564 0.16823313 0.9158834
[27,] 0.073036401 0.14607280 0.9269636
[28,] 0.063923754 0.12784751 0.9360762
[29,] 0.049494442 0.09898888 0.9505056
[30,] 0.043518514 0.08703703 0.9564815
[31,] 0.038063394 0.07612679 0.9619366
[32,] 0.026391283 0.05278257 0.9736087
[33,] 0.017439290 0.03487858 0.9825607
[34,] 0.018657961 0.03731592 0.9813420
[35,] 0.014668613 0.02933723 0.9853314
[36,] 0.009359610 0.01871922 0.9906404
[37,] 0.006929991 0.01385998 0.9930700
[38,] 0.025477114 0.05095423 0.9745229
[39,] 0.087463354 0.17492671 0.9125366
[40,] 0.155032990 0.31006598 0.8449670
[41,] 0.257363384 0.51472677 0.7426366
[42,] 0.325835012 0.65167002 0.6741650
[43,] 0.350651936 0.70130387 0.6493481
[44,] 0.378135879 0.75627176 0.6218641
[45,] 0.401094661 0.80218932 0.5989053
[46,] 0.658972580 0.68205484 0.3410274
[47,] 0.607616958 0.78476608 0.3923830
[48,] 0.449228782 0.89845756 0.5507712
> postscript(file="/var/www/html/rcomp/tmp/13uih1258719637.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/2rpu21258719637.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/3r5241258719637.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/4yzho1258719637.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/531bf1258719637.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 = 59
Frequency = 1
1 2 3 4 5 6
0.121072703 -0.007976813 -0.127010874 0.113893250 -0.075094451 0.195856033
7 8 9 10 11 12
-0.223178028 -0.032196637 0.148769302 -0.210172039 0.050762992 -0.058255616
13 14 15 16 17 18
0.102679415 0.193660807 0.264611292 -0.314360956 0.216682250 -0.082320905
19 20 21 22 23 24
0.268598673 0.109502797 0.170437828 0.291311046 0.162261530 0.183134748
25 26 27 28 29 30
-0.135899314 -0.274964283 -0.193998345 -0.213032406 -0.162112828 0.068775842
31 32 33 34 35 36
0.019695420 -0.079307735 -0.288326343 -0.217375858 -0.146425373 -0.395505796
37 38 39 40 41 42
-0.224709846 -0.233882989 -0.063087039 -0.072260182 -0.111325151 0.009702601
43 44 45 46 47 48
-0.409331461 -0.148396429 0.112538602 0.093504540 0.194501386 0.335560045
49 50 51 52 53 54
0.506665064 0.407816445 0.318983278 -0.119927155 0.221131504 0.042159256
55 56 57 58 59
0.363187008 0.094230214 0.005242513 -0.383745189 -0.382748343
> postscript(file="/var/www/html/rcomp/tmp/6a5tp1258719637.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 = 59
Frequency = 1
lag(myerror, k = 1) myerror
0 0.121072703 NA
1 -0.007976813 0.121072703
2 -0.127010874 -0.007976813
3 0.113893250 -0.127010874
4 -0.075094451 0.113893250
5 0.195856033 -0.075094451
6 -0.223178028 0.195856033
7 -0.032196637 -0.223178028
8 0.148769302 -0.032196637
9 -0.210172039 0.148769302
10 0.050762992 -0.210172039
11 -0.058255616 0.050762992
12 0.102679415 -0.058255616
13 0.193660807 0.102679415
14 0.264611292 0.193660807
15 -0.314360956 0.264611292
16 0.216682250 -0.314360956
17 -0.082320905 0.216682250
18 0.268598673 -0.082320905
19 0.109502797 0.268598673
20 0.170437828 0.109502797
21 0.291311046 0.170437828
22 0.162261530 0.291311046
23 0.183134748 0.162261530
24 -0.135899314 0.183134748
25 -0.274964283 -0.135899314
26 -0.193998345 -0.274964283
27 -0.213032406 -0.193998345
28 -0.162112828 -0.213032406
29 0.068775842 -0.162112828
30 0.019695420 0.068775842
31 -0.079307735 0.019695420
32 -0.288326343 -0.079307735
33 -0.217375858 -0.288326343
34 -0.146425373 -0.217375858
35 -0.395505796 -0.146425373
36 -0.224709846 -0.395505796
37 -0.233882989 -0.224709846
38 -0.063087039 -0.233882989
39 -0.072260182 -0.063087039
40 -0.111325151 -0.072260182
41 0.009702601 -0.111325151
42 -0.409331461 0.009702601
43 -0.148396429 -0.409331461
44 0.112538602 -0.148396429
45 0.093504540 0.112538602
46 0.194501386 0.093504540
47 0.335560045 0.194501386
48 0.506665064 0.335560045
49 0.407816445 0.506665064
50 0.318983278 0.407816445
51 -0.119927155 0.318983278
52 0.221131504 -0.119927155
53 0.042159256 0.221131504
54 0.363187008 0.042159256
55 0.094230214 0.363187008
56 0.005242513 0.094230214
57 -0.383745189 0.005242513
58 -0.382748343 -0.383745189
59 NA -0.382748343
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.007976813 0.121072703
[2,] -0.127010874 -0.007976813
[3,] 0.113893250 -0.127010874
[4,] -0.075094451 0.113893250
[5,] 0.195856033 -0.075094451
[6,] -0.223178028 0.195856033
[7,] -0.032196637 -0.223178028
[8,] 0.148769302 -0.032196637
[9,] -0.210172039 0.148769302
[10,] 0.050762992 -0.210172039
[11,] -0.058255616 0.050762992
[12,] 0.102679415 -0.058255616
[13,] 0.193660807 0.102679415
[14,] 0.264611292 0.193660807
[15,] -0.314360956 0.264611292
[16,] 0.216682250 -0.314360956
[17,] -0.082320905 0.216682250
[18,] 0.268598673 -0.082320905
[19,] 0.109502797 0.268598673
[20,] 0.170437828 0.109502797
[21,] 0.291311046 0.170437828
[22,] 0.162261530 0.291311046
[23,] 0.183134748 0.162261530
[24,] -0.135899314 0.183134748
[25,] -0.274964283 -0.135899314
[26,] -0.193998345 -0.274964283
[27,] -0.213032406 -0.193998345
[28,] -0.162112828 -0.213032406
[29,] 0.068775842 -0.162112828
[30,] 0.019695420 0.068775842
[31,] -0.079307735 0.019695420
[32,] -0.288326343 -0.079307735
[33,] -0.217375858 -0.288326343
[34,] -0.146425373 -0.217375858
[35,] -0.395505796 -0.146425373
[36,] -0.224709846 -0.395505796
[37,] -0.233882989 -0.224709846
[38,] -0.063087039 -0.233882989
[39,] -0.072260182 -0.063087039
[40,] -0.111325151 -0.072260182
[41,] 0.009702601 -0.111325151
[42,] -0.409331461 0.009702601
[43,] -0.148396429 -0.409331461
[44,] 0.112538602 -0.148396429
[45,] 0.093504540 0.112538602
[46,] 0.194501386 0.093504540
[47,] 0.335560045 0.194501386
[48,] 0.506665064 0.335560045
[49,] 0.407816445 0.506665064
[50,] 0.318983278 0.407816445
[51,] -0.119927155 0.318983278
[52,] 0.221131504 -0.119927155
[53,] 0.042159256 0.221131504
[54,] 0.363187008 0.042159256
[55,] 0.094230214 0.363187008
[56,] 0.005242513 0.094230214
[57,] -0.383745189 0.005242513
[58,] -0.382748343 -0.383745189
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.007976813 0.121072703
2 -0.127010874 -0.007976813
3 0.113893250 -0.127010874
4 -0.075094451 0.113893250
5 0.195856033 -0.075094451
6 -0.223178028 0.195856033
7 -0.032196637 -0.223178028
8 0.148769302 -0.032196637
9 -0.210172039 0.148769302
10 0.050762992 -0.210172039
11 -0.058255616 0.050762992
12 0.102679415 -0.058255616
13 0.193660807 0.102679415
14 0.264611292 0.193660807
15 -0.314360956 0.264611292
16 0.216682250 -0.314360956
17 -0.082320905 0.216682250
18 0.268598673 -0.082320905
19 0.109502797 0.268598673
20 0.170437828 0.109502797
21 0.291311046 0.170437828
22 0.162261530 0.291311046
23 0.183134748 0.162261530
24 -0.135899314 0.183134748
25 -0.274964283 -0.135899314
26 -0.193998345 -0.274964283
27 -0.213032406 -0.193998345
28 -0.162112828 -0.213032406
29 0.068775842 -0.162112828
30 0.019695420 0.068775842
31 -0.079307735 0.019695420
32 -0.288326343 -0.079307735
33 -0.217375858 -0.288326343
34 -0.146425373 -0.217375858
35 -0.395505796 -0.146425373
36 -0.224709846 -0.395505796
37 -0.233882989 -0.224709846
38 -0.063087039 -0.233882989
39 -0.072260182 -0.063087039
40 -0.111325151 -0.072260182
41 0.009702601 -0.111325151
42 -0.409331461 0.009702601
43 -0.148396429 -0.409331461
44 0.112538602 -0.148396429
45 0.093504540 0.112538602
46 0.194501386 0.093504540
47 0.335560045 0.194501386
48 0.506665064 0.335560045
49 0.407816445 0.506665064
50 0.318983278 0.407816445
51 -0.119927155 0.318983278
52 0.221131504 -0.119927155
53 0.042159256 0.221131504
54 0.363187008 0.042159256
55 0.094230214 0.363187008
56 0.005242513 0.094230214
57 -0.383745189 0.005242513
58 -0.382748343 -0.383745189
> 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/7xc0p1258719637.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/82lvi1258719637.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/9emu01258719637.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/10i8e51258719637.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/11em731258719637.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/12q5301258719637.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/1368w31258719638.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/142bfk1258719638.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/15n3p81258719638.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/166r201258719638.tab")
+ }
>
> system("convert tmp/13uih1258719637.ps tmp/13uih1258719637.png")
> system("convert tmp/2rpu21258719637.ps tmp/2rpu21258719637.png")
> system("convert tmp/3r5241258719637.ps tmp/3r5241258719637.png")
> system("convert tmp/4yzho1258719637.ps tmp/4yzho1258719637.png")
> system("convert tmp/531bf1258719637.ps tmp/531bf1258719637.png")
> system("convert tmp/6a5tp1258719637.ps tmp/6a5tp1258719637.png")
> system("convert tmp/7xc0p1258719637.ps tmp/7xc0p1258719637.png")
> system("convert tmp/82lvi1258719637.ps tmp/82lvi1258719637.png")
> system("convert tmp/9emu01258719637.ps tmp/9emu01258719637.png")
> system("convert tmp/10i8e51258719637.ps tmp/10i8e51258719637.png")
>
>
> proc.time()
user system elapsed
2.450 1.537 3.530