R version 2.8.0 (2008-10-20)
Copyright (C) 2008 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(106.7,0,110.2,0,125.9,0,100.1,0,106.4,0,114.8,0,81.3,0,87,0,104.2,0,108,0,105,0,94.5,0,92,0,95.9,0,108.8,0,103.4,0,102.1,0,110.1,0,83.2,0,82.7,0,106.8,0,113.7,0,102.5,0,96.6,0,92.1,0,95.6,0,102.3,0,98.6,0,98.2,0,104.5,0,84,0,73.8,0,103.9,0,106,0,97.2,0,102.6,0,89,0,93.8,0,116.7,1,106.8,1,98.5,1,118.7,1,90,1,91.9,1,113.3,1,113.1,1,104.1,1,108.7,1,96.7,1,101,1,116.9,1,105.8,1,99,1,129.4,1,83,1,88.9,1,115.9,1,104.2,1,113.4,1,112.2,1,100.8,1,107.3,1,126.6,1,102.9,1,117.9,1,128.8,1,87.5,1,93.8,1,122.7,1,126.2,1,124.6,1,116.7,1,115.2,1,111.1,1,129.9,1,113.3,1,118.5,1,133.5,1,102.1,1,102.4,1),dim=c(2,80),dimnames=list(c('y','x'),1:80))
> y <- array(NA,dim=c(2,80),dimnames=list(c('y','x'),1:80))
> 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 = '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)
> 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
y x
1 106.7 0
2 110.2 0
3 125.9 0
4 100.1 0
5 106.4 0
6 114.8 0
7 81.3 0
8 87.0 0
9 104.2 0
10 108.0 0
11 105.0 0
12 94.5 0
13 92.0 0
14 95.9 0
15 108.8 0
16 103.4 0
17 102.1 0
18 110.1 0
19 83.2 0
20 82.7 0
21 106.8 0
22 113.7 0
23 102.5 0
24 96.6 0
25 92.1 0
26 95.6 0
27 102.3 0
28 98.6 0
29 98.2 0
30 104.5 0
31 84.0 0
32 73.8 0
33 103.9 0
34 106.0 0
35 97.2 0
36 102.6 0
37 89.0 0
38 93.8 0
39 116.7 1
40 106.8 1
41 98.5 1
42 118.7 1
43 90.0 1
44 91.9 1
45 113.3 1
46 113.1 1
47 104.1 1
48 108.7 1
49 96.7 1
50 101.0 1
51 116.9 1
52 105.8 1
53 99.0 1
54 129.4 1
55 83.0 1
56 88.9 1
57 115.9 1
58 104.2 1
59 113.4 1
60 112.2 1
61 100.8 1
62 107.3 1
63 126.6 1
64 102.9 1
65 117.9 1
66 128.8 1
67 87.5 1
68 93.8 1
69 122.7 1
70 126.2 1
71 124.6 1
72 116.7 1
73 115.2 1
74 111.1 1
75 129.9 1
76 113.3 1
77 118.5 1
78 133.5 1
79 102.1 1
80 102.4 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) x
99.57 10.20
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-26.762 -7.491 2.486 7.135 26.334
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 99.566 1.901 52.387 < 2e-16 ***
x 10.196 2.623 3.887 0.000212 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 11.72 on 78 degrees of freedom
Multiple R-squared: 0.1623, Adjusted R-squared: 0.1515
F-statistic: 15.11 on 1 and 78 DF, p-value: 0.0002117
> postscript(file="/var/www/html/rcomp/tmp/1ph1z1227597881.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/2oa071227597881.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/38lr01227597881.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/4jxey1227597881.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/5l9gd1227597881.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 = 80
Frequency = 1
1 2 3 4 5 6
7.1342105 10.6342105 26.3342105 0.5342105 6.8342105 15.2342105
7 8 9 10 11 12
-18.2657895 -12.5657895 4.6342105 8.4342105 5.4342105 -5.0657895
13 14 15 16 17 18
-7.5657895 -3.6657895 9.2342105 3.8342105 2.5342105 10.5342105
19 20 21 22 23 24
-16.3657895 -16.8657895 7.2342105 14.1342105 2.9342105 -2.9657895
25 26 27 28 29 30
-7.4657895 -3.9657895 2.7342105 -0.9657895 -1.3657895 4.9342105
31 32 33 34 35 36
-15.5657895 -25.7657895 4.3342105 6.4342105 -2.3657895 3.0342105
37 38 39 40 41 42
-10.5657895 -5.7657895 6.9380952 -2.9619048 -11.2619048 8.9380952
43 44 45 46 47 48
-19.7619048 -17.8619048 3.5380952 3.3380952 -5.6619048 -1.0619048
49 50 51 52 53 54
-13.0619048 -8.7619048 7.1380952 -3.9619048 -10.7619048 19.6380952
55 56 57 58 59 60
-26.7619048 -20.8619048 6.1380952 -5.5619048 3.6380952 2.4380952
61 62 63 64 65 66
-8.9619048 -2.4619048 16.8380952 -6.8619048 8.1380952 19.0380952
67 68 69 70 71 72
-22.2619048 -15.9619048 12.9380952 16.4380952 14.8380952 6.9380952
73 74 75 76 77 78
5.4380952 1.3380952 20.1380952 3.5380952 8.7380952 23.7380952
79 80
-7.6619048 -7.3619048
> postscript(file="/var/www/html/rcomp/tmp/6z4kw1227597881.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 = 80
Frequency = 1
lag(myerror, k = 1) myerror
0 7.1342105 NA
1 10.6342105 7.1342105
2 26.3342105 10.6342105
3 0.5342105 26.3342105
4 6.8342105 0.5342105
5 15.2342105 6.8342105
6 -18.2657895 15.2342105
7 -12.5657895 -18.2657895
8 4.6342105 -12.5657895
9 8.4342105 4.6342105
10 5.4342105 8.4342105
11 -5.0657895 5.4342105
12 -7.5657895 -5.0657895
13 -3.6657895 -7.5657895
14 9.2342105 -3.6657895
15 3.8342105 9.2342105
16 2.5342105 3.8342105
17 10.5342105 2.5342105
18 -16.3657895 10.5342105
19 -16.8657895 -16.3657895
20 7.2342105 -16.8657895
21 14.1342105 7.2342105
22 2.9342105 14.1342105
23 -2.9657895 2.9342105
24 -7.4657895 -2.9657895
25 -3.9657895 -7.4657895
26 2.7342105 -3.9657895
27 -0.9657895 2.7342105
28 -1.3657895 -0.9657895
29 4.9342105 -1.3657895
30 -15.5657895 4.9342105
31 -25.7657895 -15.5657895
32 4.3342105 -25.7657895
33 6.4342105 4.3342105
34 -2.3657895 6.4342105
35 3.0342105 -2.3657895
36 -10.5657895 3.0342105
37 -5.7657895 -10.5657895
38 6.9380952 -5.7657895
39 -2.9619048 6.9380952
40 -11.2619048 -2.9619048
41 8.9380952 -11.2619048
42 -19.7619048 8.9380952
43 -17.8619048 -19.7619048
44 3.5380952 -17.8619048
45 3.3380952 3.5380952
46 -5.6619048 3.3380952
47 -1.0619048 -5.6619048
48 -13.0619048 -1.0619048
49 -8.7619048 -13.0619048
50 7.1380952 -8.7619048
51 -3.9619048 7.1380952
52 -10.7619048 -3.9619048
53 19.6380952 -10.7619048
54 -26.7619048 19.6380952
55 -20.8619048 -26.7619048
56 6.1380952 -20.8619048
57 -5.5619048 6.1380952
58 3.6380952 -5.5619048
59 2.4380952 3.6380952
60 -8.9619048 2.4380952
61 -2.4619048 -8.9619048
62 16.8380952 -2.4619048
63 -6.8619048 16.8380952
64 8.1380952 -6.8619048
65 19.0380952 8.1380952
66 -22.2619048 19.0380952
67 -15.9619048 -22.2619048
68 12.9380952 -15.9619048
69 16.4380952 12.9380952
70 14.8380952 16.4380952
71 6.9380952 14.8380952
72 5.4380952 6.9380952
73 1.3380952 5.4380952
74 20.1380952 1.3380952
75 3.5380952 20.1380952
76 8.7380952 3.5380952
77 23.7380952 8.7380952
78 -7.6619048 23.7380952
79 -7.3619048 -7.6619048
80 NA -7.3619048
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 10.6342105 7.1342105
[2,] 26.3342105 10.6342105
[3,] 0.5342105 26.3342105
[4,] 6.8342105 0.5342105
[5,] 15.2342105 6.8342105
[6,] -18.2657895 15.2342105
[7,] -12.5657895 -18.2657895
[8,] 4.6342105 -12.5657895
[9,] 8.4342105 4.6342105
[10,] 5.4342105 8.4342105
[11,] -5.0657895 5.4342105
[12,] -7.5657895 -5.0657895
[13,] -3.6657895 -7.5657895
[14,] 9.2342105 -3.6657895
[15,] 3.8342105 9.2342105
[16,] 2.5342105 3.8342105
[17,] 10.5342105 2.5342105
[18,] -16.3657895 10.5342105
[19,] -16.8657895 -16.3657895
[20,] 7.2342105 -16.8657895
[21,] 14.1342105 7.2342105
[22,] 2.9342105 14.1342105
[23,] -2.9657895 2.9342105
[24,] -7.4657895 -2.9657895
[25,] -3.9657895 -7.4657895
[26,] 2.7342105 -3.9657895
[27,] -0.9657895 2.7342105
[28,] -1.3657895 -0.9657895
[29,] 4.9342105 -1.3657895
[30,] -15.5657895 4.9342105
[31,] -25.7657895 -15.5657895
[32,] 4.3342105 -25.7657895
[33,] 6.4342105 4.3342105
[34,] -2.3657895 6.4342105
[35,] 3.0342105 -2.3657895
[36,] -10.5657895 3.0342105
[37,] -5.7657895 -10.5657895
[38,] 6.9380952 -5.7657895
[39,] -2.9619048 6.9380952
[40,] -11.2619048 -2.9619048
[41,] 8.9380952 -11.2619048
[42,] -19.7619048 8.9380952
[43,] -17.8619048 -19.7619048
[44,] 3.5380952 -17.8619048
[45,] 3.3380952 3.5380952
[46,] -5.6619048 3.3380952
[47,] -1.0619048 -5.6619048
[48,] -13.0619048 -1.0619048
[49,] -8.7619048 -13.0619048
[50,] 7.1380952 -8.7619048
[51,] -3.9619048 7.1380952
[52,] -10.7619048 -3.9619048
[53,] 19.6380952 -10.7619048
[54,] -26.7619048 19.6380952
[55,] -20.8619048 -26.7619048
[56,] 6.1380952 -20.8619048
[57,] -5.5619048 6.1380952
[58,] 3.6380952 -5.5619048
[59,] 2.4380952 3.6380952
[60,] -8.9619048 2.4380952
[61,] -2.4619048 -8.9619048
[62,] 16.8380952 -2.4619048
[63,] -6.8619048 16.8380952
[64,] 8.1380952 -6.8619048
[65,] 19.0380952 8.1380952
[66,] -22.2619048 19.0380952
[67,] -15.9619048 -22.2619048
[68,] 12.9380952 -15.9619048
[69,] 16.4380952 12.9380952
[70,] 14.8380952 16.4380952
[71,] 6.9380952 14.8380952
[72,] 5.4380952 6.9380952
[73,] 1.3380952 5.4380952
[74,] 20.1380952 1.3380952
[75,] 3.5380952 20.1380952
[76,] 8.7380952 3.5380952
[77,] 23.7380952 8.7380952
[78,] -7.6619048 23.7380952
[79,] -7.3619048 -7.6619048
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 10.6342105 7.1342105
2 26.3342105 10.6342105
3 0.5342105 26.3342105
4 6.8342105 0.5342105
5 15.2342105 6.8342105
6 -18.2657895 15.2342105
7 -12.5657895 -18.2657895
8 4.6342105 -12.5657895
9 8.4342105 4.6342105
10 5.4342105 8.4342105
11 -5.0657895 5.4342105
12 -7.5657895 -5.0657895
13 -3.6657895 -7.5657895
14 9.2342105 -3.6657895
15 3.8342105 9.2342105
16 2.5342105 3.8342105
17 10.5342105 2.5342105
18 -16.3657895 10.5342105
19 -16.8657895 -16.3657895
20 7.2342105 -16.8657895
21 14.1342105 7.2342105
22 2.9342105 14.1342105
23 -2.9657895 2.9342105
24 -7.4657895 -2.9657895
25 -3.9657895 -7.4657895
26 2.7342105 -3.9657895
27 -0.9657895 2.7342105
28 -1.3657895 -0.9657895
29 4.9342105 -1.3657895
30 -15.5657895 4.9342105
31 -25.7657895 -15.5657895
32 4.3342105 -25.7657895
33 6.4342105 4.3342105
34 -2.3657895 6.4342105
35 3.0342105 -2.3657895
36 -10.5657895 3.0342105
37 -5.7657895 -10.5657895
38 6.9380952 -5.7657895
39 -2.9619048 6.9380952
40 -11.2619048 -2.9619048
41 8.9380952 -11.2619048
42 -19.7619048 8.9380952
43 -17.8619048 -19.7619048
44 3.5380952 -17.8619048
45 3.3380952 3.5380952
46 -5.6619048 3.3380952
47 -1.0619048 -5.6619048
48 -13.0619048 -1.0619048
49 -8.7619048 -13.0619048
50 7.1380952 -8.7619048
51 -3.9619048 7.1380952
52 -10.7619048 -3.9619048
53 19.6380952 -10.7619048
54 -26.7619048 19.6380952
55 -20.8619048 -26.7619048
56 6.1380952 -20.8619048
57 -5.5619048 6.1380952
58 3.6380952 -5.5619048
59 2.4380952 3.6380952
60 -8.9619048 2.4380952
61 -2.4619048 -8.9619048
62 16.8380952 -2.4619048
63 -6.8619048 16.8380952
64 8.1380952 -6.8619048
65 19.0380952 8.1380952
66 -22.2619048 19.0380952
67 -15.9619048 -22.2619048
68 12.9380952 -15.9619048
69 16.4380952 12.9380952
70 14.8380952 16.4380952
71 6.9380952 14.8380952
72 5.4380952 6.9380952
73 1.3380952 5.4380952
74 20.1380952 1.3380952
75 3.5380952 20.1380952
76 8.7380952 3.5380952
77 23.7380952 8.7380952
78 -7.6619048 23.7380952
79 -7.3619048 -7.6619048
> 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/70ctr1227597881.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/8tp4p1227597881.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/91tos1227597881.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
>
> #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/106oco1227597881.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/11gdnh1227597881.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/12fi0m1227597881.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/13ucj01227597881.tab")
>
> system("convert tmp/1ph1z1227597881.ps tmp/1ph1z1227597881.png")
> system("convert tmp/2oa071227597881.ps tmp/2oa071227597881.png")
> system("convert tmp/38lr01227597881.ps tmp/38lr01227597881.png")
> system("convert tmp/4jxey1227597881.ps tmp/4jxey1227597881.png")
> system("convert tmp/5l9gd1227597881.ps tmp/5l9gd1227597881.png")
> system("convert tmp/6z4kw1227597881.ps tmp/6z4kw1227597881.png")
> system("convert tmp/70ctr1227597881.ps tmp/70ctr1227597881.png")
> system("convert tmp/8tp4p1227597881.ps tmp/8tp4p1227597881.png")
> system("convert tmp/91tos1227597881.ps tmp/91tos1227597881.png")
>
>
> proc.time()
user system elapsed
1.915 1.384 2.506