R version 2.6.0 (2007-10-03)
Copyright (C) 2007 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
+ ,0.76
+ ,0.4
+ ,37702
+ ,1.04
+ ,0.77
+ ,0.37
+ ,30364
+ ,1.02
+ ,0.76
+ ,0.36
+ ,32609
+ ,1.07
+ ,0.77
+ ,0.36
+ ,30212
+ ,1.12
+ ,0.78
+ ,0.36
+ ,29965
+ ,1.08
+ ,0.79
+ ,0.36
+ ,28352
+ ,1.02
+ ,0.78
+ ,0.32
+ ,25814
+ ,1.01
+ ,0.76
+ ,0.31
+ ,22414
+ ,1.04
+ ,0.78
+ ,0.32
+ ,20506
+ ,0.98
+ ,0.76
+ ,0.33
+ ,28806
+ ,0.95
+ ,0.74
+ ,0.33
+ ,22228
+ ,0.94
+ ,0.73
+ ,0.29
+ ,13971
+ ,0.94
+ ,0.72
+ ,0.33
+ ,36845
+ ,0.96
+ ,0.71
+ ,0.32
+ ,35338
+ ,0.97
+ ,0.73
+ ,0.31
+ ,35022
+ ,1.03
+ ,0.75
+ ,0.33
+ ,34777
+ ,1.01
+ ,0.75
+ ,0.32
+ ,26887
+ ,0.99
+ ,0.72
+ ,0.32
+ ,23970
+ ,1
+ ,0.72
+ ,0.3
+ ,22780
+ ,1
+ ,0.72
+ ,0.3
+ ,17351
+ ,1.02
+ ,0.74
+ ,0.33
+ ,21382
+ ,1.01
+ ,0.78
+ ,0.35
+ ,24561
+ ,0.99
+ ,0.74
+ ,0.35
+ ,17409
+ ,0.98
+ ,0.74
+ ,0.37
+ ,11514
+ ,1.01
+ ,0.75
+ ,0.38
+ ,31514
+ ,1.03
+ ,0.78
+ ,0.39
+ ,27071
+ ,1.03
+ ,0.81
+ ,0.4
+ ,29462
+ ,1
+ ,0.75
+ ,0.32
+ ,26105
+ ,0.96
+ ,0.7
+ ,0.29
+ ,22397
+ ,0.97
+ ,0.71
+ ,0.29
+ ,23843
+ ,0.98
+ ,0.71
+ ,0.3
+ ,21705
+ ,1.02
+ ,0.73
+ ,0.3
+ ,18089
+ ,1.04
+ ,0.74
+ ,0.32
+ ,20764
+ ,1.01
+ ,0.74
+ ,0.32
+ ,25316
+ ,1.01
+ ,0.75
+ ,0.34
+ ,17704
+ ,1
+ ,0.74
+ ,0.34
+ ,15548
+ ,1.01
+ ,0.74
+ ,0.34
+ ,28029
+ ,1.02
+ ,0.73
+ ,0.33
+ ,29383
+ ,1.03
+ ,0.76
+ ,0.33
+ ,36438
+ ,1.06
+ ,0.8
+ ,0.33
+ ,32034
+ ,1.12
+ ,0.83
+ ,0.34
+ ,22679
+ ,1.12
+ ,0.81
+ ,0.35
+ ,24319
+ ,1.13
+ ,0.83
+ ,0.34
+ ,18004
+ ,1.13
+ ,0.88
+ ,0.36
+ ,17537
+ ,1.13
+ ,0.89
+ ,0.39
+ ,20366
+ ,1.17
+ ,0.93
+ ,0.43
+ ,22782
+ ,1.14
+ ,0.91
+ ,0.42
+ ,19169
+ ,1.08
+ ,0.9
+ ,0.39
+ ,13807
+ ,1.07
+ ,0.86
+ ,0.37
+ ,29743
+ ,1.12
+ ,0.88
+ ,0.36
+ ,25591
+ ,1.14
+ ,0.93
+ ,0.39
+ ,29096
+ ,1.21
+ ,0.98
+ ,0.39
+ ,26482
+ ,1.2
+ ,0.97
+ ,0.37
+ ,22405
+ ,1.23
+ ,1.03
+ ,0.36
+ ,27044
+ ,1.29
+ ,1.06
+ ,0.38
+ ,17970
+ ,1.31
+ ,1.06
+ ,0.38
+ ,18730
+ ,1.37
+ ,1.08
+ ,0.44
+ ,19684
+ ,1.35
+ ,1.09
+ ,0.49
+ ,19785
+ ,1.26
+ ,1.04
+ ,0.47
+ ,18479
+ ,1.26
+ ,1
+ ,0.48
+ ,10698)
+ ,dim=c(4
+ ,60)
+ ,dimnames=list(c('Eurosuperbenzine'
+ ,'Diesel'
+ ,'LPG'
+ ,'Personenwagens')
+ ,1:60))
> y <- array(NA,dim=c(4,60),dimnames=list(c('Eurosuperbenzine','Diesel','LPG','Personenwagens'),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 = '4'
> #'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)
> 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
Personenwagens Eurosuperbenzine Diesel LPG
1 37702 1.00 0.76 0.40
2 30364 1.04 0.77 0.37
3 32609 1.02 0.76 0.36
4 30212 1.07 0.77 0.36
5 29965 1.12 0.78 0.36
6 28352 1.08 0.79 0.36
7 25814 1.02 0.78 0.32
8 22414 1.01 0.76 0.31
9 20506 1.04 0.78 0.32
10 28806 0.98 0.76 0.33
11 22228 0.95 0.74 0.33
12 13971 0.94 0.73 0.29
13 36845 0.94 0.72 0.33
14 35338 0.96 0.71 0.32
15 35022 0.97 0.73 0.31
16 34777 1.03 0.75 0.33
17 26887 1.01 0.75 0.32
18 23970 0.99 0.72 0.32
19 22780 1.00 0.72 0.30
20 17351 1.00 0.72 0.30
21 21382 1.02 0.74 0.33
22 24561 1.01 0.78 0.35
23 17409 0.99 0.74 0.35
24 11514 0.98 0.74 0.37
25 31514 1.01 0.75 0.38
26 27071 1.03 0.78 0.39
27 29462 1.03 0.81 0.40
28 26105 1.00 0.75 0.32
29 22397 0.96 0.70 0.29
30 23843 0.97 0.71 0.29
31 21705 0.98 0.71 0.30
32 18089 1.02 0.73 0.30
33 20764 1.04 0.74 0.32
34 25316 1.01 0.74 0.32
35 17704 1.01 0.75 0.34
36 15548 1.00 0.74 0.34
37 28029 1.01 0.74 0.34
38 29383 1.02 0.73 0.33
39 36438 1.03 0.76 0.33
40 32034 1.06 0.80 0.33
41 22679 1.12 0.83 0.34
42 24319 1.12 0.81 0.35
43 18004 1.13 0.83 0.34
44 17537 1.13 0.88 0.36
45 20366 1.13 0.89 0.39
46 22782 1.17 0.93 0.43
47 19169 1.14 0.91 0.42
48 13807 1.08 0.90 0.39
49 29743 1.07 0.86 0.37
50 25591 1.12 0.88 0.36
51 29096 1.14 0.93 0.39
52 26482 1.21 0.98 0.39
53 22405 1.20 0.97 0.37
54 27044 1.23 1.03 0.36
55 17970 1.29 1.06 0.38
56 18730 1.31 1.06 0.38
57 19684 1.37 1.08 0.44
58 19785 1.35 1.09 0.49
59 18479 1.26 1.04 0.47
60 10698 1.26 1.00 0.48
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Eurosuperbenzine Diesel LPG
38758 -6100 -19156 21793
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-15153.62 -3957.74 -45.77 4699.31 11330.23
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 38758 11276 3.437 0.00111 **
Eurosuperbenzine -6100 28565 -0.214 0.83166
Diesel -19156 28730 -0.667 0.50768
LPG 21793 28880 0.755 0.45365
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 6293 on 56 degrees of freedom
Multiple R-Squared: 0.1003, Adjusted R-squared: 0.05209
F-statistic: 2.081 on 3 and 56 DF, p-value: 0.1131
> postscript(file="/var/www/html/rcomp/tmp/16yq91197299545.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/2q3lp1197299545.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/32sjb1197299545.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/4kcw31197299545.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/50c381197299545.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> 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
10885.71410 4637.07575 6786.43809 4886.01867 5135.59925 3470.13689
7 8 9 10 11 12
1246.26600 -2379.92361 -3939.72446 3393.20485 -3750.92291 -11388.76996
13 14 15 16 17 18
10421.95886 9063.34029 9409.38713 9477.67197 1683.59105 -1930.08868
19 20 21 22 23 24
-2623.22668 -8052.22668 -4169.88952 -721.52461 -8761.76106 -15153.62306
25 26 27 28 29 30
5003.01937 1038.77048 3786.51205 840.58628 -3415.43060 -1716.86910
31 32 33 34 35 36
-4011.79295 -7000.66041 -4447.95137 -78.96568 -7935.26618 -10343.82768
37 38 39 40 41 42
2198.17709 3639.55375 11330.22870 7875.46992 -756.75989 282.19804
43 44 45 46 47 48
-5370.75512 -5315.82870 -2949.05782 -394.52628 -4355.72543 -9621.52494
49 50 51 52 53 54
5923.10061 2677.16653 6608.17386 5378.99089 1485.28662 7674.56991
55 56 57 58 59 60
-894.58851 -12.57897 382.99142 -536.10445 -2913.07380 -11678.22932
> postscript(file="/var/www/html/rcomp/tmp/60l3w1197299545.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 10885.71410 NA
1 4637.07575 10885.71410
2 6786.43809 4637.07575
3 4886.01867 6786.43809
4 5135.59925 4886.01867
5 3470.13689 5135.59925
6 1246.26600 3470.13689
7 -2379.92361 1246.26600
8 -3939.72446 -2379.92361
9 3393.20485 -3939.72446
10 -3750.92291 3393.20485
11 -11388.76996 -3750.92291
12 10421.95886 -11388.76996
13 9063.34029 10421.95886
14 9409.38713 9063.34029
15 9477.67197 9409.38713
16 1683.59105 9477.67197
17 -1930.08868 1683.59105
18 -2623.22668 -1930.08868
19 -8052.22668 -2623.22668
20 -4169.88952 -8052.22668
21 -721.52461 -4169.88952
22 -8761.76106 -721.52461
23 -15153.62306 -8761.76106
24 5003.01937 -15153.62306
25 1038.77048 5003.01937
26 3786.51205 1038.77048
27 840.58628 3786.51205
28 -3415.43060 840.58628
29 -1716.86910 -3415.43060
30 -4011.79295 -1716.86910
31 -7000.66041 -4011.79295
32 -4447.95137 -7000.66041
33 -78.96568 -4447.95137
34 -7935.26618 -78.96568
35 -10343.82768 -7935.26618
36 2198.17709 -10343.82768
37 3639.55375 2198.17709
38 11330.22870 3639.55375
39 7875.46992 11330.22870
40 -756.75989 7875.46992
41 282.19804 -756.75989
42 -5370.75512 282.19804
43 -5315.82870 -5370.75512
44 -2949.05782 -5315.82870
45 -394.52628 -2949.05782
46 -4355.72543 -394.52628
47 -9621.52494 -4355.72543
48 5923.10061 -9621.52494
49 2677.16653 5923.10061
50 6608.17386 2677.16653
51 5378.99089 6608.17386
52 1485.28662 5378.99089
53 7674.56991 1485.28662
54 -894.58851 7674.56991
55 -12.57897 -894.58851
56 382.99142 -12.57897
57 -536.10445 382.99142
58 -2913.07380 -536.10445
59 -11678.22932 -2913.07380
60 NA -11678.22932
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 4637.07575 10885.71410
[2,] 6786.43809 4637.07575
[3,] 4886.01867 6786.43809
[4,] 5135.59925 4886.01867
[5,] 3470.13689 5135.59925
[6,] 1246.26600 3470.13689
[7,] -2379.92361 1246.26600
[8,] -3939.72446 -2379.92361
[9,] 3393.20485 -3939.72446
[10,] -3750.92291 3393.20485
[11,] -11388.76996 -3750.92291
[12,] 10421.95886 -11388.76996
[13,] 9063.34029 10421.95886
[14,] 9409.38713 9063.34029
[15,] 9477.67197 9409.38713
[16,] 1683.59105 9477.67197
[17,] -1930.08868 1683.59105
[18,] -2623.22668 -1930.08868
[19,] -8052.22668 -2623.22668
[20,] -4169.88952 -8052.22668
[21,] -721.52461 -4169.88952
[22,] -8761.76106 -721.52461
[23,] -15153.62306 -8761.76106
[24,] 5003.01937 -15153.62306
[25,] 1038.77048 5003.01937
[26,] 3786.51205 1038.77048
[27,] 840.58628 3786.51205
[28,] -3415.43060 840.58628
[29,] -1716.86910 -3415.43060
[30,] -4011.79295 -1716.86910
[31,] -7000.66041 -4011.79295
[32,] -4447.95137 -7000.66041
[33,] -78.96568 -4447.95137
[34,] -7935.26618 -78.96568
[35,] -10343.82768 -7935.26618
[36,] 2198.17709 -10343.82768
[37,] 3639.55375 2198.17709
[38,] 11330.22870 3639.55375
[39,] 7875.46992 11330.22870
[40,] -756.75989 7875.46992
[41,] 282.19804 -756.75989
[42,] -5370.75512 282.19804
[43,] -5315.82870 -5370.75512
[44,] -2949.05782 -5315.82870
[45,] -394.52628 -2949.05782
[46,] -4355.72543 -394.52628
[47,] -9621.52494 -4355.72543
[48,] 5923.10061 -9621.52494
[49,] 2677.16653 5923.10061
[50,] 6608.17386 2677.16653
[51,] 5378.99089 6608.17386
[52,] 1485.28662 5378.99089
[53,] 7674.56991 1485.28662
[54,] -894.58851 7674.56991
[55,] -12.57897 -894.58851
[56,] 382.99142 -12.57897
[57,] -536.10445 382.99142
[58,] -2913.07380 -536.10445
[59,] -11678.22932 -2913.07380
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 4637.07575 10885.71410
2 6786.43809 4637.07575
3 4886.01867 6786.43809
4 5135.59925 4886.01867
5 3470.13689 5135.59925
6 1246.26600 3470.13689
7 -2379.92361 1246.26600
8 -3939.72446 -2379.92361
9 3393.20485 -3939.72446
10 -3750.92291 3393.20485
11 -11388.76996 -3750.92291
12 10421.95886 -11388.76996
13 9063.34029 10421.95886
14 9409.38713 9063.34029
15 9477.67197 9409.38713
16 1683.59105 9477.67197
17 -1930.08868 1683.59105
18 -2623.22668 -1930.08868
19 -8052.22668 -2623.22668
20 -4169.88952 -8052.22668
21 -721.52461 -4169.88952
22 -8761.76106 -721.52461
23 -15153.62306 -8761.76106
24 5003.01937 -15153.62306
25 1038.77048 5003.01937
26 3786.51205 1038.77048
27 840.58628 3786.51205
28 -3415.43060 840.58628
29 -1716.86910 -3415.43060
30 -4011.79295 -1716.86910
31 -7000.66041 -4011.79295
32 -4447.95137 -7000.66041
33 -78.96568 -4447.95137
34 -7935.26618 -78.96568
35 -10343.82768 -7935.26618
36 2198.17709 -10343.82768
37 3639.55375 2198.17709
38 11330.22870 3639.55375
39 7875.46992 11330.22870
40 -756.75989 7875.46992
41 282.19804 -756.75989
42 -5370.75512 282.19804
43 -5315.82870 -5370.75512
44 -2949.05782 -5315.82870
45 -394.52628 -2949.05782
46 -4355.72543 -394.52628
47 -9621.52494 -4355.72543
48 5923.10061 -9621.52494
49 2677.16653 5923.10061
50 6608.17386 2677.16653
51 5378.99089 6608.17386
52 1485.28662 5378.99089
53 7674.56991 1485.28662
54 -894.58851 7674.56991
55 -12.57897 -894.58851
56 382.99142 -12.57897
57 -536.10445 382.99142
58 -2913.07380 -536.10445
59 -11678.22932 -2913.07380
> 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/7oab01197299545.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/8bt0p1197299545.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/9q1z11197299545.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
> 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/10zb981197299545.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/11cxp31197299545.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/12ene61197299545.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/136qir1197299545.tab")
>
> system("convert tmp/16yq91197299545.ps tmp/16yq91197299545.png")
> system("convert tmp/2q3lp1197299545.ps tmp/2q3lp1197299545.png")
> system("convert tmp/32sjb1197299545.ps tmp/32sjb1197299545.png")
> system("convert tmp/4kcw31197299545.ps tmp/4kcw31197299545.png")
> system("convert tmp/50c381197299545.ps tmp/50c381197299545.png")
> system("convert tmp/60l3w1197299545.ps tmp/60l3w1197299545.png")
> system("convert tmp/7oab01197299545.ps tmp/7oab01197299545.png")
> system("convert tmp/8bt0p1197299545.ps tmp/8bt0p1197299545.png")
> system("convert tmp/9q1z11197299545.ps tmp/9q1z11197299545.png")
>
>
> proc.time()
user system elapsed
2.314 1.467 2.778