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(733.6,0,844.9,0,864.3,0,833.5,0,814.9,0,820.4,0,710.8,0,773.1,0,801.2,0,832.9,0,808.3,0,817.2,0,745.5,0,932.6,0,1057.0,0,879.9,0,1089.5,0,903.0,0,846.1,0,959.1,0,952.0,0,1092.5,0,1188.9,0,996.7,0,1034.3,0,898.2,0,1111.6,0,900.5,0,1049.2,0,1010.9,0,875.9,0,849.9,0,713.4,1,918.6,1,912.5,1,767.0,1,902.2,1,891.9,1,874.0,1,930.9,1,944.2,1,935.9,1,937.1,1,885.1,1,892.4,1,987.3,1,946.3,1,799.6,1,875.4,1,846.2,1,880.6,1,885.7,1,868.9,1,882.5,1,789.6,1,773.3,1,804.3,1,817.8,1,836.7,1,721.8,1),dim=c(2,60),dimnames=list(c('y','x'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('y','x'),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 = 'Linear Trend'
> par2 = 'Include Monthly 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 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 733.6 0 1 0 0 0 0 0 0 0 0 0 0 1
2 844.9 0 0 1 0 0 0 0 0 0 0 0 0 2
3 864.3 0 0 0 1 0 0 0 0 0 0 0 0 3
4 833.5 0 0 0 0 1 0 0 0 0 0 0 0 4
5 814.9 0 0 0 0 0 1 0 0 0 0 0 0 5
6 820.4 0 0 0 0 0 0 1 0 0 0 0 0 6
7 710.8 0 0 0 0 0 0 0 1 0 0 0 0 7
8 773.1 0 0 0 0 0 0 0 0 1 0 0 0 8
9 801.2 0 0 0 0 0 0 0 0 0 1 0 0 9
10 832.9 0 0 0 0 0 0 0 0 0 0 1 0 10
11 808.3 0 0 0 0 0 0 0 0 0 0 0 1 11
12 817.2 0 0 0 0 0 0 0 0 0 0 0 0 12
13 745.5 0 1 0 0 0 0 0 0 0 0 0 0 13
14 932.6 0 0 1 0 0 0 0 0 0 0 0 0 14
15 1057.0 0 0 0 1 0 0 0 0 0 0 0 0 15
16 879.9 0 0 0 0 1 0 0 0 0 0 0 0 16
17 1089.5 0 0 0 0 0 1 0 0 0 0 0 0 17
18 903.0 0 0 0 0 0 0 1 0 0 0 0 0 18
19 846.1 0 0 0 0 0 0 0 1 0 0 0 0 19
20 959.1 0 0 0 0 0 0 0 0 1 0 0 0 20
21 952.0 0 0 0 0 0 0 0 0 0 1 0 0 21
22 1092.5 0 0 0 0 0 0 0 0 0 0 1 0 22
23 1188.9 0 0 0 0 0 0 0 0 0 0 0 1 23
24 996.7 0 0 0 0 0 0 0 0 0 0 0 0 24
25 1034.3 0 1 0 0 0 0 0 0 0 0 0 0 25
26 898.2 0 0 1 0 0 0 0 0 0 0 0 0 26
27 1111.6 0 0 0 1 0 0 0 0 0 0 0 0 27
28 900.5 0 0 0 0 1 0 0 0 0 0 0 0 28
29 1049.2 0 0 0 0 0 1 0 0 0 0 0 0 29
30 1010.9 0 0 0 0 0 0 1 0 0 0 0 0 30
31 875.9 0 0 0 0 0 0 0 1 0 0 0 0 31
32 849.9 0 0 0 0 0 0 0 0 1 0 0 0 32
33 713.4 1 0 0 0 0 0 0 0 0 1 0 0 33
34 918.6 1 0 0 0 0 0 0 0 0 0 1 0 34
35 912.5 1 0 0 0 0 0 0 0 0 0 0 1 35
36 767.0 1 0 0 0 0 0 0 0 0 0 0 0 36
37 902.2 1 1 0 0 0 0 0 0 0 0 0 0 37
38 891.9 1 0 1 0 0 0 0 0 0 0 0 0 38
39 874.0 1 0 0 1 0 0 0 0 0 0 0 0 39
40 930.9 1 0 0 0 1 0 0 0 0 0 0 0 40
41 944.2 1 0 0 0 0 1 0 0 0 0 0 0 41
42 935.9 1 0 0 0 0 0 1 0 0 0 0 0 42
43 937.1 1 0 0 0 0 0 0 1 0 0 0 0 43
44 885.1 1 0 0 0 0 0 0 0 1 0 0 0 44
45 892.4 1 0 0 0 0 0 0 0 0 1 0 0 45
46 987.3 1 0 0 0 0 0 0 0 0 0 1 0 46
47 946.3 1 0 0 0 0 0 0 0 0 0 0 1 47
48 799.6 1 0 0 0 0 0 0 0 0 0 0 0 48
49 875.4 1 1 0 0 0 0 0 0 0 0 0 0 49
50 846.2 1 0 1 0 0 0 0 0 0 0 0 0 50
51 880.6 1 0 0 1 0 0 0 0 0 0 0 0 51
52 885.7 1 0 0 0 1 0 0 0 0 0 0 0 52
53 868.9 1 0 0 0 0 1 0 0 0 0 0 0 53
54 882.5 1 0 0 0 0 0 1 0 0 0 0 0 54
55 789.6 1 0 0 0 0 0 0 1 0 0 0 0 55
56 773.3 1 0 0 0 0 0 0 0 1 0 0 0 56
57 804.3 1 0 0 0 0 0 0 0 0 1 0 0 57
58 817.8 1 0 0 0 0 0 0 0 0 0 1 0 58
59 836.7 1 0 0 0 0 0 0 0 0 0 0 1 59
60 721.8 1 0 0 0 0 0 0 0 0 0 0 0 60
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) x M1 M2 M3 M4
773.4750 -161.6583 49.4022 69.9628 140.7033 65.3039
M5 M6 M7 M8 M9 M10
128.5444 81.7450 -0.8944 11.3061 24.1983 117.3589
M11 t
122.0794 3.9994
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-143.343 -59.033 -5.402 71.291 201.358
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 773.4750 49.9164 15.495 < 2e-16 ***
x -161.6583 48.0321 -3.366 0.00155 **
M1 49.4022 58.2523 0.848 0.40079
M2 69.9628 58.1036 1.204 0.23471
M3 140.7033 57.9877 2.426 0.01923 *
M4 65.3039 57.9047 1.128 0.26526
M5 128.5444 57.8549 2.222 0.03125 *
M6 81.7450 57.8383 1.413 0.16429
M7 -0.8944 57.8549 -0.015 0.98773
M8 11.3061 57.9047 0.195 0.84605
M9 24.1983 57.7884 0.419 0.67735
M10 117.3589 57.7052 2.034 0.04777 *
M11 122.0794 57.6552 2.117 0.03966 *
t 3.9994 1.3866 2.884 0.00595 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 91.13 on 46 degrees of freedom
Multiple R-Squared: 0.3758, Adjusted R-squared: 0.1995
F-statistic: 2.131 on 13 and 46 DF, p-value: 0.03013
> postscript(file="/var/www/html/rcomp/tmp/17qit1197027865.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/2mfrn1197027865.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/3y2ng1197027865.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/4hoj31197027865.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/5792o1197027865.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
-93.2766667 -6.5366667 -61.8766667 -21.2766667 -107.1166667 -58.8166667
7 8 9 10 11 12
-89.7766667 -43.6766667 -32.4683333 -97.9283333 -131.2483333 -4.2683333
13 14 15 16 17 18
-129.3700000 33.1700000 82.8300000 -22.8700000 119.4900000 -24.2100000
19 20 21 22 23 24
-2.4700000 94.3300000 70.3383333 113.6783333 201.3583333 127.2383333
25 26 27 28 29 30
111.4366667 -49.2233333 89.4366667 -50.2633333 31.1966667 35.6966667
31 32 33 34 35 36
-20.6633333 -62.8633333 -54.5966667 53.4433333 38.6233333 11.2033333
37 38 39 40 41 42
93.0016667 58.1416667 -34.4983333 93.8016667 39.8616667 74.3616667
43 44 45 46 47 48
154.2016667 86.0016667 76.4100000 74.1500000 24.4300000 -4.1900000
49 50 51 52 53 54
18.2083333 -35.5516667 -75.8916667 0.6083333 -83.4316667 -27.0316667
55 56 57 58 59 60
-41.2916667 -73.7916667 -59.6833333 -143.3433333 -133.1633333 -129.9833333
> postscript(file="/var/www/html/rcomp/tmp/6b4bx1197027865.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 -93.2766667 NA
1 -6.5366667 -93.2766667
2 -61.8766667 -6.5366667
3 -21.2766667 -61.8766667
4 -107.1166667 -21.2766667
5 -58.8166667 -107.1166667
6 -89.7766667 -58.8166667
7 -43.6766667 -89.7766667
8 -32.4683333 -43.6766667
9 -97.9283333 -32.4683333
10 -131.2483333 -97.9283333
11 -4.2683333 -131.2483333
12 -129.3700000 -4.2683333
13 33.1700000 -129.3700000
14 82.8300000 33.1700000
15 -22.8700000 82.8300000
16 119.4900000 -22.8700000
17 -24.2100000 119.4900000
18 -2.4700000 -24.2100000
19 94.3300000 -2.4700000
20 70.3383333 94.3300000
21 113.6783333 70.3383333
22 201.3583333 113.6783333
23 127.2383333 201.3583333
24 111.4366667 127.2383333
25 -49.2233333 111.4366667
26 89.4366667 -49.2233333
27 -50.2633333 89.4366667
28 31.1966667 -50.2633333
29 35.6966667 31.1966667
30 -20.6633333 35.6966667
31 -62.8633333 -20.6633333
32 -54.5966667 -62.8633333
33 53.4433333 -54.5966667
34 38.6233333 53.4433333
35 11.2033333 38.6233333
36 93.0016667 11.2033333
37 58.1416667 93.0016667
38 -34.4983333 58.1416667
39 93.8016667 -34.4983333
40 39.8616667 93.8016667
41 74.3616667 39.8616667
42 154.2016667 74.3616667
43 86.0016667 154.2016667
44 76.4100000 86.0016667
45 74.1500000 76.4100000
46 24.4300000 74.1500000
47 -4.1900000 24.4300000
48 18.2083333 -4.1900000
49 -35.5516667 18.2083333
50 -75.8916667 -35.5516667
51 0.6083333 -75.8916667
52 -83.4316667 0.6083333
53 -27.0316667 -83.4316667
54 -41.2916667 -27.0316667
55 -73.7916667 -41.2916667
56 -59.6833333 -73.7916667
57 -143.3433333 -59.6833333
58 -133.1633333 -143.3433333
59 -129.9833333 -133.1633333
60 NA -129.9833333
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -6.5366667 -93.2766667
[2,] -61.8766667 -6.5366667
[3,] -21.2766667 -61.8766667
[4,] -107.1166667 -21.2766667
[5,] -58.8166667 -107.1166667
[6,] -89.7766667 -58.8166667
[7,] -43.6766667 -89.7766667
[8,] -32.4683333 -43.6766667
[9,] -97.9283333 -32.4683333
[10,] -131.2483333 -97.9283333
[11,] -4.2683333 -131.2483333
[12,] -129.3700000 -4.2683333
[13,] 33.1700000 -129.3700000
[14,] 82.8300000 33.1700000
[15,] -22.8700000 82.8300000
[16,] 119.4900000 -22.8700000
[17,] -24.2100000 119.4900000
[18,] -2.4700000 -24.2100000
[19,] 94.3300000 -2.4700000
[20,] 70.3383333 94.3300000
[21,] 113.6783333 70.3383333
[22,] 201.3583333 113.6783333
[23,] 127.2383333 201.3583333
[24,] 111.4366667 127.2383333
[25,] -49.2233333 111.4366667
[26,] 89.4366667 -49.2233333
[27,] -50.2633333 89.4366667
[28,] 31.1966667 -50.2633333
[29,] 35.6966667 31.1966667
[30,] -20.6633333 35.6966667
[31,] -62.8633333 -20.6633333
[32,] -54.5966667 -62.8633333
[33,] 53.4433333 -54.5966667
[34,] 38.6233333 53.4433333
[35,] 11.2033333 38.6233333
[36,] 93.0016667 11.2033333
[37,] 58.1416667 93.0016667
[38,] -34.4983333 58.1416667
[39,] 93.8016667 -34.4983333
[40,] 39.8616667 93.8016667
[41,] 74.3616667 39.8616667
[42,] 154.2016667 74.3616667
[43,] 86.0016667 154.2016667
[44,] 76.4100000 86.0016667
[45,] 74.1500000 76.4100000
[46,] 24.4300000 74.1500000
[47,] -4.1900000 24.4300000
[48,] 18.2083333 -4.1900000
[49,] -35.5516667 18.2083333
[50,] -75.8916667 -35.5516667
[51,] 0.6083333 -75.8916667
[52,] -83.4316667 0.6083333
[53,] -27.0316667 -83.4316667
[54,] -41.2916667 -27.0316667
[55,] -73.7916667 -41.2916667
[56,] -59.6833333 -73.7916667
[57,] -143.3433333 -59.6833333
[58,] -133.1633333 -143.3433333
[59,] -129.9833333 -133.1633333
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -6.5366667 -93.2766667
2 -61.8766667 -6.5366667
3 -21.2766667 -61.8766667
4 -107.1166667 -21.2766667
5 -58.8166667 -107.1166667
6 -89.7766667 -58.8166667
7 -43.6766667 -89.7766667
8 -32.4683333 -43.6766667
9 -97.9283333 -32.4683333
10 -131.2483333 -97.9283333
11 -4.2683333 -131.2483333
12 -129.3700000 -4.2683333
13 33.1700000 -129.3700000
14 82.8300000 33.1700000
15 -22.8700000 82.8300000
16 119.4900000 -22.8700000
17 -24.2100000 119.4900000
18 -2.4700000 -24.2100000
19 94.3300000 -2.4700000
20 70.3383333 94.3300000
21 113.6783333 70.3383333
22 201.3583333 113.6783333
23 127.2383333 201.3583333
24 111.4366667 127.2383333
25 -49.2233333 111.4366667
26 89.4366667 -49.2233333
27 -50.2633333 89.4366667
28 31.1966667 -50.2633333
29 35.6966667 31.1966667
30 -20.6633333 35.6966667
31 -62.8633333 -20.6633333
32 -54.5966667 -62.8633333
33 53.4433333 -54.5966667
34 38.6233333 53.4433333
35 11.2033333 38.6233333
36 93.0016667 11.2033333
37 58.1416667 93.0016667
38 -34.4983333 58.1416667
39 93.8016667 -34.4983333
40 39.8616667 93.8016667
41 74.3616667 39.8616667
42 154.2016667 74.3616667
43 86.0016667 154.2016667
44 76.4100000 86.0016667
45 74.1500000 76.4100000
46 24.4300000 74.1500000
47 -4.1900000 24.4300000
48 18.2083333 -4.1900000
49 -35.5516667 18.2083333
50 -75.8916667 -35.5516667
51 0.6083333 -75.8916667
52 -83.4316667 0.6083333
53 -27.0316667 -83.4316667
54 -41.2916667 -27.0316667
55 -73.7916667 -41.2916667
56 -59.6833333 -73.7916667
57 -143.3433333 -59.6833333
58 -133.1633333 -143.3433333
59 -129.9833333 -133.1633333
> 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/7zq981197027865.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/8d4np1197027865.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/9kdd41197027865.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/10jlhq1197027865.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/11al6j1197027865.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/121ndn1197027865.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/133aih1197027865.tab")
>
> system("convert tmp/17qit1197027865.ps tmp/17qit1197027865.png")
> system("convert tmp/2mfrn1197027865.ps tmp/2mfrn1197027865.png")
> system("convert tmp/3y2ng1197027865.ps tmp/3y2ng1197027865.png")
> system("convert tmp/4hoj31197027865.ps tmp/4hoj31197027865.png")
> system("convert tmp/5792o1197027865.ps tmp/5792o1197027865.png")
> system("convert tmp/6b4bx1197027865.ps tmp/6b4bx1197027865.png")
> system("convert tmp/7zq981197027865.ps tmp/7zq981197027865.png")
> system("convert tmp/8d4np1197027865.ps tmp/8d4np1197027865.png")
> system("convert tmp/9kdd41197027865.ps tmp/9kdd41197027865.png")
>
>
> proc.time()
user system elapsed
2.293 1.452 3.096