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(3,101.2,3.21,101.1,3.37,100.7,3.51,100.1,3.75,99.9,4.11,99.7,4.25,99.5,4.25,99.2,4.5,99,4.7,99,4.75,99.3,4.75,99.5,4.75,99.7,4.75,100,4.75,100.4,4.75,100.6,4.58,100.7,4.5,100.7,4.5,100.6,4.49,100.5,4.03,100.6,3.75,100.5,3.39,100.4,3.25,100.3,3.25,100.4,3.25,100.4,3.25,100.4,3.25,100.4,3.25,100.4,3.25,100.5,3.25,100.6,3.25,100.6,3.25,100.5,3.25,100.5,3.25,100.7,2.85,101.1,2.75,101.5,2.75,101.9,2.55,102.1,2.5,102.1,2.5,102.1,2.1,102.4,2,102.8,2,103.1,2,103.1,2,102.9,2,102.4,2,101.9,2,101.3,2,100.7,2,100.6,2,101,2,101.5,2,101.9,2,102.1,2,102.3,2,102.5,2,102.9,2,103.6,2,104.3),dim=c(2,60),dimnames=list(c('Rente','Tprod'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Rente','Tprod'),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
Tprod Rente
1 101.2 3.00
2 101.1 3.21
3 100.7 3.37
4 100.1 3.51
5 99.9 3.75
6 99.7 4.11
7 99.5 4.25
8 99.2 4.25
9 99.0 4.50
10 99.0 4.70
11 99.3 4.75
12 99.5 4.75
13 99.7 4.75
14 100.0 4.75
15 100.4 4.75
16 100.6 4.75
17 100.7 4.58
18 100.7 4.50
19 100.6 4.50
20 100.5 4.49
21 100.6 4.03
22 100.5 3.75
23 100.4 3.39
24 100.3 3.25
25 100.4 3.25
26 100.4 3.25
27 100.4 3.25
28 100.4 3.25
29 100.4 3.25
30 100.5 3.25
31 100.6 3.25
32 100.6 3.25
33 100.5 3.25
34 100.5 3.25
35 100.7 3.25
36 101.1 2.85
37 101.5 2.75
38 101.9 2.75
39 102.1 2.55
40 102.1 2.50
41 102.1 2.50
42 102.4 2.10
43 102.8 2.00
44 103.1 2.00
45 103.1 2.00
46 102.9 2.00
47 102.4 2.00
48 101.9 2.00
49 101.3 2.00
50 100.7 2.00
51 100.6 2.00
52 101.0 2.00
53 101.5 2.00
54 101.9 2.00
55 102.1 2.00
56 102.3 2.00
57 102.5 2.00
58 102.9 2.00
59 103.6 2.00
60 104.3 2.00
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Rente
104.0575 -0.9544
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.54873 -0.55577 -0.09498 0.46923 2.15127
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 104.05746 0.30882 336.95 < 2e-16 ***
Rente -0.95437 0.09335 -10.22 1.36e-14 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.7159 on 58 degrees of freedom
Multiple R-squared: 0.6431, Adjusted R-squared: 0.637
F-statistic: 104.5 on 1 and 58 DF, p-value: 1.361e-14
> 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.0238414849 0.0476829698 0.9761585
[2,] 0.0175742657 0.0351485315 0.9824257
[3,] 0.0058810215 0.0117620429 0.9941190
[4,] 0.0021205935 0.0042411870 0.9978794
[5,] 0.0005873208 0.0011746416 0.9994127
[6,] 0.0003557713 0.0007115425 0.9996442
[7,] 0.0009168606 0.0018337213 0.9990831
[8,] 0.0018822934 0.0037645869 0.9981177
[9,] 0.0037058458 0.0074116916 0.9962942
[10,] 0.0101284477 0.0202568954 0.9898716
[11,] 0.0396372483 0.0792744966 0.9603628
[12,] 0.1014788944 0.2029577887 0.8985211
[13,] 0.1589061361 0.3178122722 0.8410939
[14,] 0.2025578970 0.4051157939 0.7974421
[15,] 0.2294502372 0.4589004744 0.7705498
[16,] 0.2510775982 0.5021551964 0.7489224
[17,] 0.2368794865 0.4737589730 0.7631205
[18,] 0.1916095578 0.3832191156 0.8083904
[19,] 0.1437689484 0.2875378969 0.8562311
[20,] 0.1113715366 0.2227430732 0.8886285
[21,] 0.0804102619 0.1608205238 0.9195897
[22,] 0.0564017844 0.1128035688 0.9435982
[23,] 0.0384875308 0.0769750617 0.9615125
[24,] 0.0255948326 0.0511896651 0.9744052
[25,] 0.0166304112 0.0332608224 0.9833696
[26,] 0.0102533732 0.0205067463 0.9897466
[27,] 0.0061028633 0.0122057267 0.9938971
[28,] 0.0035329439 0.0070658877 0.9964671
[29,] 0.0020477099 0.0040954198 0.9979523
[30,] 0.0012054532 0.0024109064 0.9987945
[31,] 0.0007092189 0.0014184379 0.9992908
[32,] 0.0004963463 0.0009926926 0.9995037
[33,] 0.0004492647 0.0008985295 0.9995507
[34,] 0.0006355281 0.0012710561 0.9993645
[35,] 0.0007803521 0.0015607042 0.9992196
[36,] 0.0007300678 0.0014601357 0.9992699
[37,] 0.0005988867 0.0011977734 0.9994011
[38,] 0.0004264117 0.0008528235 0.9995736
[39,] 0.0004505954 0.0009011907 0.9995494
[40,] 0.0007594433 0.0015188866 0.9992406
[41,] 0.0010989360 0.0021978720 0.9989011
[42,] 0.0010263454 0.0020526909 0.9989737
[43,] 0.0005302501 0.0010605002 0.9994697
[44,] 0.0002600904 0.0005201807 0.9997399
[45,] 0.0002741416 0.0005482832 0.9997259
[46,] 0.0014764260 0.0029528519 0.9985236
[47,] 0.0118934802 0.0237869605 0.9881065
[48,] 0.0409522125 0.0819044250 0.9590478
[49,] 0.0689769329 0.1379538658 0.9310231
[50,] 0.0798764812 0.1597529623 0.9201235
[51,] 0.0897685257 0.1795370514 0.9102315
> postscript(file="/var/www/html/rcomp/tmp/1vx851258662728.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/2gtw91258662728.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/376jd1258662728.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/4ci5b1258662728.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/5oqe71258662728.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
0.005641623 0.106058614 -0.141242725 -0.607631398 -0.578583408 -0.435011422
7 8 9 10 11 12
-0.501400095 -0.801400095 -0.762808438 -0.571935113 -0.224216782 -0.024216782
13 14 15 16 17 18
0.175783218 0.475783218 0.875783218 1.075783218 1.013540892 0.937191562
19 20 21 22 23 24
0.837191562 0.727647895 0.388639248 0.021416592 -0.422155393 -0.655766720
25 26 27 28 29 30
-0.555766720 -0.555766720 -0.555766720 -0.555766720 -0.555766720 -0.455766720
31 32 33 34 35 36
-0.355766720 -0.355766720 -0.455766720 -0.455766720 -0.255766720 -0.237513371
37 38 39 40 41 42
0.067049967 0.467049967 0.476176641 0.428458310 0.428458310 0.346711660
43 44 45 46 47 48
0.651274997 0.951274997 0.951274997 0.751274997 0.251274997 -0.248725003
49 50 51 52 53 54
-0.848725003 -1.448725003 -1.548725003 -1.148725003 -0.648725003 -0.248725003
55 56 57 58 59 60
-0.048725003 0.151274997 0.351274997 0.751274997 1.451274997 2.151274997
> postscript(file="/var/www/html/rcomp/tmp/6kqai1258662728.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 0.005641623 NA
1 0.106058614 0.005641623
2 -0.141242725 0.106058614
3 -0.607631398 -0.141242725
4 -0.578583408 -0.607631398
5 -0.435011422 -0.578583408
6 -0.501400095 -0.435011422
7 -0.801400095 -0.501400095
8 -0.762808438 -0.801400095
9 -0.571935113 -0.762808438
10 -0.224216782 -0.571935113
11 -0.024216782 -0.224216782
12 0.175783218 -0.024216782
13 0.475783218 0.175783218
14 0.875783218 0.475783218
15 1.075783218 0.875783218
16 1.013540892 1.075783218
17 0.937191562 1.013540892
18 0.837191562 0.937191562
19 0.727647895 0.837191562
20 0.388639248 0.727647895
21 0.021416592 0.388639248
22 -0.422155393 0.021416592
23 -0.655766720 -0.422155393
24 -0.555766720 -0.655766720
25 -0.555766720 -0.555766720
26 -0.555766720 -0.555766720
27 -0.555766720 -0.555766720
28 -0.555766720 -0.555766720
29 -0.455766720 -0.555766720
30 -0.355766720 -0.455766720
31 -0.355766720 -0.355766720
32 -0.455766720 -0.355766720
33 -0.455766720 -0.455766720
34 -0.255766720 -0.455766720
35 -0.237513371 -0.255766720
36 0.067049967 -0.237513371
37 0.467049967 0.067049967
38 0.476176641 0.467049967
39 0.428458310 0.476176641
40 0.428458310 0.428458310
41 0.346711660 0.428458310
42 0.651274997 0.346711660
43 0.951274997 0.651274997
44 0.951274997 0.951274997
45 0.751274997 0.951274997
46 0.251274997 0.751274997
47 -0.248725003 0.251274997
48 -0.848725003 -0.248725003
49 -1.448725003 -0.848725003
50 -1.548725003 -1.448725003
51 -1.148725003 -1.548725003
52 -0.648725003 -1.148725003
53 -0.248725003 -0.648725003
54 -0.048725003 -0.248725003
55 0.151274997 -0.048725003
56 0.351274997 0.151274997
57 0.751274997 0.351274997
58 1.451274997 0.751274997
59 2.151274997 1.451274997
60 NA 2.151274997
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.10605861 0.005641623
[2,] -0.14124273 0.106058614
[3,] -0.60763140 -0.141242725
[4,] -0.57858341 -0.607631398
[5,] -0.43501142 -0.578583408
[6,] -0.50140009 -0.435011422
[7,] -0.80140009 -0.501400095
[8,] -0.76280844 -0.801400095
[9,] -0.57193511 -0.762808438
[10,] -0.22421678 -0.571935113
[11,] -0.02421678 -0.224216782
[12,] 0.17578322 -0.024216782
[13,] 0.47578322 0.175783218
[14,] 0.87578322 0.475783218
[15,] 1.07578322 0.875783218
[16,] 1.01354089 1.075783218
[17,] 0.93719156 1.013540892
[18,] 0.83719156 0.937191562
[19,] 0.72764790 0.837191562
[20,] 0.38863925 0.727647895
[21,] 0.02141659 0.388639248
[22,] -0.42215539 0.021416592
[23,] -0.65576672 -0.422155393
[24,] -0.55576672 -0.655766720
[25,] -0.55576672 -0.555766720
[26,] -0.55576672 -0.555766720
[27,] -0.55576672 -0.555766720
[28,] -0.55576672 -0.555766720
[29,] -0.45576672 -0.555766720
[30,] -0.35576672 -0.455766720
[31,] -0.35576672 -0.355766720
[32,] -0.45576672 -0.355766720
[33,] -0.45576672 -0.455766720
[34,] -0.25576672 -0.455766720
[35,] -0.23751337 -0.255766720
[36,] 0.06704997 -0.237513371
[37,] 0.46704997 0.067049967
[38,] 0.47617664 0.467049967
[39,] 0.42845831 0.476176641
[40,] 0.42845831 0.428458310
[41,] 0.34671166 0.428458310
[42,] 0.65127500 0.346711660
[43,] 0.95127500 0.651274997
[44,] 0.95127500 0.951274997
[45,] 0.75127500 0.951274997
[46,] 0.25127500 0.751274997
[47,] -0.24872500 0.251274997
[48,] -0.84872500 -0.248725003
[49,] -1.44872500 -0.848725003
[50,] -1.54872500 -1.448725003
[51,] -1.14872500 -1.548725003
[52,] -0.64872500 -1.148725003
[53,] -0.24872500 -0.648725003
[54,] -0.04872500 -0.248725003
[55,] 0.15127500 -0.048725003
[56,] 0.35127500 0.151274997
[57,] 0.75127500 0.351274997
[58,] 1.45127500 0.751274997
[59,] 2.15127500 1.451274997
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.10605861 0.005641623
2 -0.14124273 0.106058614
3 -0.60763140 -0.141242725
4 -0.57858341 -0.607631398
5 -0.43501142 -0.578583408
6 -0.50140009 -0.435011422
7 -0.80140009 -0.501400095
8 -0.76280844 -0.801400095
9 -0.57193511 -0.762808438
10 -0.22421678 -0.571935113
11 -0.02421678 -0.224216782
12 0.17578322 -0.024216782
13 0.47578322 0.175783218
14 0.87578322 0.475783218
15 1.07578322 0.875783218
16 1.01354089 1.075783218
17 0.93719156 1.013540892
18 0.83719156 0.937191562
19 0.72764790 0.837191562
20 0.38863925 0.727647895
21 0.02141659 0.388639248
22 -0.42215539 0.021416592
23 -0.65576672 -0.422155393
24 -0.55576672 -0.655766720
25 -0.55576672 -0.555766720
26 -0.55576672 -0.555766720
27 -0.55576672 -0.555766720
28 -0.55576672 -0.555766720
29 -0.45576672 -0.555766720
30 -0.35576672 -0.455766720
31 -0.35576672 -0.355766720
32 -0.45576672 -0.355766720
33 -0.45576672 -0.455766720
34 -0.25576672 -0.455766720
35 -0.23751337 -0.255766720
36 0.06704997 -0.237513371
37 0.46704997 0.067049967
38 0.47617664 0.467049967
39 0.42845831 0.476176641
40 0.42845831 0.428458310
41 0.34671166 0.428458310
42 0.65127500 0.346711660
43 0.95127500 0.651274997
44 0.95127500 0.951274997
45 0.75127500 0.951274997
46 0.25127500 0.751274997
47 -0.24872500 0.251274997
48 -0.84872500 -0.248725003
49 -1.44872500 -0.848725003
50 -1.54872500 -1.448725003
51 -1.14872500 -1.548725003
52 -0.64872500 -1.148725003
53 -0.24872500 -0.648725003
54 -0.04872500 -0.248725003
55 0.15127500 -0.048725003
56 0.35127500 0.151274997
57 0.75127500 0.351274997
58 1.45127500 0.751274997
59 2.15127500 1.451274997
> 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/7utce1258662728.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/8lo3s1258662728.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/9g0kc1258662728.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/10rtq21258662728.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/111e551258662728.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/12ybhf1258662728.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/13w6h51258662728.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/14uu2v1258662728.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/15hokn1258662728.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/16wypq1258662728.tab")
+ }
> system("convert tmp/1vx851258662728.ps tmp/1vx851258662728.png")
> system("convert tmp/2gtw91258662728.ps tmp/2gtw91258662728.png")
> system("convert tmp/376jd1258662728.ps tmp/376jd1258662728.png")
> system("convert tmp/4ci5b1258662728.ps tmp/4ci5b1258662728.png")
> system("convert tmp/5oqe71258662728.ps tmp/5oqe71258662728.png")
> system("convert tmp/6kqai1258662728.ps tmp/6kqai1258662728.png")
> system("convert tmp/7utce1258662728.ps tmp/7utce1258662728.png")
> system("convert tmp/8lo3s1258662728.ps tmp/8lo3s1258662728.png")
> system("convert tmp/9g0kc1258662728.ps tmp/9g0kc1258662728.png")
> system("convert tmp/10rtq21258662728.ps tmp/10rtq21258662728.png")
>
>
> proc.time()
user system elapsed
2.444 1.571 2.853