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(8.1,10.9,7.7,10,7.5,9.2,7.6,9.2,7.8,9.5,7.8,9.6,7.8,9.5,7.5,9.1,7.5,8.9,7.1,9,7.5,10.1,7.5,10.3,7.6,10.2,7.7,9.6,7.7,9.2,7.9,9.3,8.1,9.4,8.2,9.4,8.2,9.2,8.2,9,7.9,9,7.3,9,6.9,9.8,6.6,10,6.7,9.8,6.9,9.3,7,9,7.1,9,7.2,9.1,7.1,9.1,6.9,9.1,7,9.2,6.8,8.8,6.4,8.3,6.7,8.4,6.6,8.1,6.4,7.7,6.3,7.9,6.2,7.9,6.5,8,6.8,7.9,6.8,7.6,6.4,7.1,6.1,6.8,5.8,6.5,6.1,6.9,7.2,8.2,7.3,8.7,6.9,8.3,6.1,7.9,5.8,7.5,6.2,7.8,7.1,8.3,7.7,8.4,7.9,8.2,7.7,7.7,7.4,7.2,7.5,7.3,8,8.1,8.1,8.5),dim=c(2,60),dimnames=list(c('Werkl_Mannen','Werkl_Vrouwen'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Werkl_Mannen','Werkl_Vrouwen'),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 = '2'
> #'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
Werkl_Vrouwen Werkl_Mannen
1 10.9 8.1
2 10.0 7.7
3 9.2 7.5
4 9.2 7.6
5 9.5 7.8
6 9.6 7.8
7 9.5 7.8
8 9.1 7.5
9 8.9 7.5
10 9.0 7.1
11 10.1 7.5
12 10.3 7.5
13 10.2 7.6
14 9.6 7.7
15 9.2 7.7
16 9.3 7.9
17 9.4 8.1
18 9.4 8.2
19 9.2 8.2
20 9.0 8.2
21 9.0 7.9
22 9.0 7.3
23 9.8 6.9
24 10.0 6.6
25 9.8 6.7
26 9.3 6.9
27 9.0 7.0
28 9.0 7.1
29 9.1 7.2
30 9.1 7.1
31 9.1 6.9
32 9.2 7.0
33 8.8 6.8
34 8.3 6.4
35 8.4 6.7
36 8.1 6.6
37 7.7 6.4
38 7.9 6.3
39 7.9 6.2
40 8.0 6.5
41 7.9 6.8
42 7.6 6.8
43 7.1 6.4
44 6.8 6.1
45 6.5 5.8
46 6.9 6.1
47 8.2 7.2
48 8.7 7.3
49 8.3 6.9
50 7.9 6.1
51 7.5 5.8
52 7.8 6.2
53 8.3 7.1
54 8.4 7.7
55 8.2 7.9
56 7.7 7.7
57 7.2 7.4
58 7.3 7.5
59 8.1 8.0
60 8.5 8.1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Werkl_Mannen
2.7095 0.8351
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.689291 -0.390088 0.002996 0.386241 1.778794
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.7095 1.1110 2.439 0.0178 *
Werkl_Mannen 0.8351 0.1542 5.414 1.23e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.7819 on 58 degrees of freedom
Multiple R-squared: 0.3357, Adjusted R-squared: 0.3243
F-statistic: 29.31 on 1 and 58 DF, p-value: 1.230e-06
> 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.104453869 0.208907738 0.895546131
[2,] 0.054834593 0.109669187 0.945165407
[3,] 0.032397780 0.064795559 0.967602220
[4,] 0.012095862 0.024191725 0.987904138
[5,] 0.004423281 0.008846562 0.995576719
[6,] 0.012291097 0.024582194 0.987708903
[7,] 0.031267642 0.062535283 0.968732358
[8,] 0.076726725 0.153453450 0.923273275
[9,] 0.087663288 0.175326576 0.912336712
[10,] 0.059882198 0.119764395 0.940117802
[11,] 0.052285403 0.104570806 0.947714597
[12,] 0.051737369 0.103474739 0.948262631
[13,] 0.049172188 0.098344377 0.950827812
[14,] 0.041615666 0.083231332 0.958384334
[15,] 0.036439145 0.072878291 0.963560855
[16,] 0.033988088 0.067976177 0.966011912
[17,] 0.027607353 0.055214706 0.972392647
[18,] 0.021122496 0.042244993 0.978877504
[19,] 0.026707496 0.053414992 0.973292504
[20,] 0.054433045 0.108866091 0.945566955
[21,] 0.090507229 0.181014458 0.909492771
[22,] 0.106162090 0.212324180 0.893837910
[23,] 0.119971439 0.239942879 0.880028561
[24,] 0.130899041 0.261798082 0.869100959
[25,] 0.143357982 0.286715964 0.856642018
[26,] 0.170040151 0.340080303 0.829959849
[27,] 0.229494056 0.458988113 0.770505944
[28,] 0.345706127 0.691412254 0.654293873
[29,] 0.456183345 0.912366691 0.543816655
[30,] 0.558792485 0.882415029 0.441207515
[31,] 0.630737703 0.738524594 0.369262297
[32,] 0.681693156 0.636613687 0.318306844
[33,] 0.724673825 0.550652350 0.275326175
[34,] 0.725672151 0.548655697 0.274327849
[35,] 0.721926150 0.556147701 0.278073850
[36,] 0.718505187 0.562989627 0.281494813
[37,] 0.709731017 0.580537965 0.290268983
[38,] 0.715625378 0.568749245 0.284374622
[39,] 0.747078427 0.505843146 0.252921573
[40,] 0.790403559 0.419192881 0.209596441
[41,] 0.881377310 0.237245381 0.118622690
[42,] 0.927048472 0.145903056 0.072951528
[43,] 0.899013156 0.201973689 0.100986844
[44,] 0.923941148 0.152117704 0.076058852
[45,] 0.908580493 0.182839015 0.091419507
[46,] 0.865036882 0.269926235 0.134963118
[47,] 0.785618631 0.428762738 0.214381369
[48,] 0.720473586 0.559052829 0.279526414
[49,] 0.950609250 0.098781500 0.049390750
[50,] 0.998363195 0.003273610 0.001636805
[51,] 0.995785471 0.008429057 0.004214529
> postscript(file="/var/www/html/rcomp/tmp/1p9ib1258741253.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/2808i1258741253.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/3rsu61258741253.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/4ns051258741253.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/51m071258741253.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
1.426135008 0.860177450 0.227198672 0.143688061 0.276666840 0.376666840
7 8 9 10 11 12
0.276666840 0.127198672 -0.072801328 0.361241115 1.127198672 1.327198672
13 14 15 16 17 18
1.143688061 0.460177450 0.060177450 -0.006843771 -0.073864992 -0.157375603
19 20 21 22 23 24
-0.357375603 -0.557375603 -0.306843771 0.194219893 1.328262336 1.778794168
25 26 27 28 29 30
1.495283557 0.828262336 0.444751725 0.361241115 0.377730504 0.461241115
31 32 33 34 35 36
0.628262336 0.644751725 0.411772947 0.245815389 0.095283557 -0.121205832
37 38 39 40 41 42
-0.354184611 -0.070674000 0.012836611 -0.137695221 -0.488227053 -0.788227053
43 44 45 46 47 48
-0.954184611 -1.003652778 -1.053120946 -0.903652778 -0.522269496 -0.105780107
49 50 51 52 53 54
-0.171737664 0.096347222 -0.053120946 -0.087163389 -0.338758885 -0.739822550
55 56 57 58 59 60
-1.106843771 -1.439822550 -1.689290718 -1.672801328 -1.290354382 -0.973864992
> postscript(file="/var/www/html/rcomp/tmp/6ypw31258741253.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 1.426135008 NA
1 0.860177450 1.426135008
2 0.227198672 0.860177450
3 0.143688061 0.227198672
4 0.276666840 0.143688061
5 0.376666840 0.276666840
6 0.276666840 0.376666840
7 0.127198672 0.276666840
8 -0.072801328 0.127198672
9 0.361241115 -0.072801328
10 1.127198672 0.361241115
11 1.327198672 1.127198672
12 1.143688061 1.327198672
13 0.460177450 1.143688061
14 0.060177450 0.460177450
15 -0.006843771 0.060177450
16 -0.073864992 -0.006843771
17 -0.157375603 -0.073864992
18 -0.357375603 -0.157375603
19 -0.557375603 -0.357375603
20 -0.306843771 -0.557375603
21 0.194219893 -0.306843771
22 1.328262336 0.194219893
23 1.778794168 1.328262336
24 1.495283557 1.778794168
25 0.828262336 1.495283557
26 0.444751725 0.828262336
27 0.361241115 0.444751725
28 0.377730504 0.361241115
29 0.461241115 0.377730504
30 0.628262336 0.461241115
31 0.644751725 0.628262336
32 0.411772947 0.644751725
33 0.245815389 0.411772947
34 0.095283557 0.245815389
35 -0.121205832 0.095283557
36 -0.354184611 -0.121205832
37 -0.070674000 -0.354184611
38 0.012836611 -0.070674000
39 -0.137695221 0.012836611
40 -0.488227053 -0.137695221
41 -0.788227053 -0.488227053
42 -0.954184611 -0.788227053
43 -1.003652778 -0.954184611
44 -1.053120946 -1.003652778
45 -0.903652778 -1.053120946
46 -0.522269496 -0.903652778
47 -0.105780107 -0.522269496
48 -0.171737664 -0.105780107
49 0.096347222 -0.171737664
50 -0.053120946 0.096347222
51 -0.087163389 -0.053120946
52 -0.338758885 -0.087163389
53 -0.739822550 -0.338758885
54 -1.106843771 -0.739822550
55 -1.439822550 -1.106843771
56 -1.689290718 -1.439822550
57 -1.672801328 -1.689290718
58 -1.290354382 -1.672801328
59 -0.973864992 -1.290354382
60 NA -0.973864992
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.860177450 1.426135008
[2,] 0.227198672 0.860177450
[3,] 0.143688061 0.227198672
[4,] 0.276666840 0.143688061
[5,] 0.376666840 0.276666840
[6,] 0.276666840 0.376666840
[7,] 0.127198672 0.276666840
[8,] -0.072801328 0.127198672
[9,] 0.361241115 -0.072801328
[10,] 1.127198672 0.361241115
[11,] 1.327198672 1.127198672
[12,] 1.143688061 1.327198672
[13,] 0.460177450 1.143688061
[14,] 0.060177450 0.460177450
[15,] -0.006843771 0.060177450
[16,] -0.073864992 -0.006843771
[17,] -0.157375603 -0.073864992
[18,] -0.357375603 -0.157375603
[19,] -0.557375603 -0.357375603
[20,] -0.306843771 -0.557375603
[21,] 0.194219893 -0.306843771
[22,] 1.328262336 0.194219893
[23,] 1.778794168 1.328262336
[24,] 1.495283557 1.778794168
[25,] 0.828262336 1.495283557
[26,] 0.444751725 0.828262336
[27,] 0.361241115 0.444751725
[28,] 0.377730504 0.361241115
[29,] 0.461241115 0.377730504
[30,] 0.628262336 0.461241115
[31,] 0.644751725 0.628262336
[32,] 0.411772947 0.644751725
[33,] 0.245815389 0.411772947
[34,] 0.095283557 0.245815389
[35,] -0.121205832 0.095283557
[36,] -0.354184611 -0.121205832
[37,] -0.070674000 -0.354184611
[38,] 0.012836611 -0.070674000
[39,] -0.137695221 0.012836611
[40,] -0.488227053 -0.137695221
[41,] -0.788227053 -0.488227053
[42,] -0.954184611 -0.788227053
[43,] -1.003652778 -0.954184611
[44,] -1.053120946 -1.003652778
[45,] -0.903652778 -1.053120946
[46,] -0.522269496 -0.903652778
[47,] -0.105780107 -0.522269496
[48,] -0.171737664 -0.105780107
[49,] 0.096347222 -0.171737664
[50,] -0.053120946 0.096347222
[51,] -0.087163389 -0.053120946
[52,] -0.338758885 -0.087163389
[53,] -0.739822550 -0.338758885
[54,] -1.106843771 -0.739822550
[55,] -1.439822550 -1.106843771
[56,] -1.689290718 -1.439822550
[57,] -1.672801328 -1.689290718
[58,] -1.290354382 -1.672801328
[59,] -0.973864992 -1.290354382
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.860177450 1.426135008
2 0.227198672 0.860177450
3 0.143688061 0.227198672
4 0.276666840 0.143688061
5 0.376666840 0.276666840
6 0.276666840 0.376666840
7 0.127198672 0.276666840
8 -0.072801328 0.127198672
9 0.361241115 -0.072801328
10 1.127198672 0.361241115
11 1.327198672 1.127198672
12 1.143688061 1.327198672
13 0.460177450 1.143688061
14 0.060177450 0.460177450
15 -0.006843771 0.060177450
16 -0.073864992 -0.006843771
17 -0.157375603 -0.073864992
18 -0.357375603 -0.157375603
19 -0.557375603 -0.357375603
20 -0.306843771 -0.557375603
21 0.194219893 -0.306843771
22 1.328262336 0.194219893
23 1.778794168 1.328262336
24 1.495283557 1.778794168
25 0.828262336 1.495283557
26 0.444751725 0.828262336
27 0.361241115 0.444751725
28 0.377730504 0.361241115
29 0.461241115 0.377730504
30 0.628262336 0.461241115
31 0.644751725 0.628262336
32 0.411772947 0.644751725
33 0.245815389 0.411772947
34 0.095283557 0.245815389
35 -0.121205832 0.095283557
36 -0.354184611 -0.121205832
37 -0.070674000 -0.354184611
38 0.012836611 -0.070674000
39 -0.137695221 0.012836611
40 -0.488227053 -0.137695221
41 -0.788227053 -0.488227053
42 -0.954184611 -0.788227053
43 -1.003652778 -0.954184611
44 -1.053120946 -1.003652778
45 -0.903652778 -1.053120946
46 -0.522269496 -0.903652778
47 -0.105780107 -0.522269496
48 -0.171737664 -0.105780107
49 0.096347222 -0.171737664
50 -0.053120946 0.096347222
51 -0.087163389 -0.053120946
52 -0.338758885 -0.087163389
53 -0.739822550 -0.338758885
54 -1.106843771 -0.739822550
55 -1.439822550 -1.106843771
56 -1.689290718 -1.439822550
57 -1.672801328 -1.689290718
58 -1.290354382 -1.672801328
59 -0.973864992 -1.290354382
> 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/7qlli1258741253.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/8il9w1258741253.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/9fm351258741253.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/10ct1u1258741253.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/1119x81258741253.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/12x4yi1258741253.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/1370sq1258741253.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/14g97q1258741253.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/15o48x1258741253.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/16l0q31258741253.tab")
+ }
>
> system("convert tmp/1p9ib1258741253.ps tmp/1p9ib1258741253.png")
> system("convert tmp/2808i1258741253.ps tmp/2808i1258741253.png")
> system("convert tmp/3rsu61258741253.ps tmp/3rsu61258741253.png")
> system("convert tmp/4ns051258741253.ps tmp/4ns051258741253.png")
> system("convert tmp/51m071258741253.ps tmp/51m071258741253.png")
> system("convert tmp/6ypw31258741253.ps tmp/6ypw31258741253.png")
> system("convert tmp/7qlli1258741253.ps tmp/7qlli1258741253.png")
> system("convert tmp/8il9w1258741253.ps tmp/8il9w1258741253.png")
> system("convert tmp/9fm351258741253.ps tmp/9fm351258741253.png")
> system("convert tmp/10ct1u1258741253.ps tmp/10ct1u1258741253.png")
>
>
> proc.time()
user system elapsed
2.432 1.580 2.868