R version 2.6.1 (2007-11-26)
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(332,0,0,182,0,0,-303,0,0,-443,0,0,908,0,0,4011,1,0,-2862,0,1,-1126,0,0,-50,0,0,3012,1,0,434,0,0,-273,0,0,-439,0,0,-1203,0,0,137,0,0,-102,0,0,1152,0,0,260,0,0,-1150,0,0,-299,0,0,-922,0,0,-1509,0,0,1152,0,0,-3,0,0,156,0,0,-1131,0,0,-1033,0,0,-130,0,0,-599,0,0,-1633,0,0,527,0,0,112,0,0,-895,0,0,669,0,0,-2126,0,1,-1779,0,0,-129,0,0,1922,0,0,674,0,0,185,0,0,-788,0,0,-696,0,0,-748,0,0,893,0,0,458,0,0,-78,0,0,-280,0,0,-1865,0,0,788,0,0,-916,0,0,1286,0,0,883,0,0,193,0,0,-2527,0,1,-1792,0,0,370,0,0,-2952,0,1,-403,0,0,-1478,0,0),dim=c(3,59),dimnames=list(c('diff','pos','neg'),1:59))
> y <- array(NA,dim=c(3,59),dimnames=list(c('diff','pos','neg'),1:59))
> 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 = '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
diff pos neg M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 332 0 0 1 0 0 0 0 0 0 0 0 0 0
2 182 0 0 0 1 0 0 0 0 0 0 0 0 0
3 -303 0 0 0 0 1 0 0 0 0 0 0 0 0
4 -443 0 0 0 0 0 1 0 0 0 0 0 0 0
5 908 0 0 0 0 0 0 1 0 0 0 0 0 0
6 4011 1 0 0 0 0 0 0 1 0 0 0 0 0
7 -2862 0 1 0 0 0 0 0 0 1 0 0 0 0
8 -1126 0 0 0 0 0 0 0 0 0 1 0 0 0
9 -50 0 0 0 0 0 0 0 0 0 0 1 0 0
10 3012 1 0 0 0 0 0 0 0 0 0 0 1 0
11 434 0 0 0 0 0 0 0 0 0 0 0 0 1
12 -273 0 0 0 0 0 0 0 0 0 0 0 0 0
13 -439 0 0 1 0 0 0 0 0 0 0 0 0 0
14 -1203 0 0 0 1 0 0 0 0 0 0 0 0 0
15 137 0 0 0 0 1 0 0 0 0 0 0 0 0
16 -102 0 0 0 0 0 1 0 0 0 0 0 0 0
17 1152 0 0 0 0 0 0 1 0 0 0 0 0 0
18 260 0 0 0 0 0 0 0 1 0 0 0 0 0
19 -1150 0 0 0 0 0 0 0 0 1 0 0 0 0
20 -299 0 0 0 0 0 0 0 0 0 1 0 0 0
21 -922 0 0 0 0 0 0 0 0 0 0 1 0 0
22 -1509 0 0 0 0 0 0 0 0 0 0 0 1 0
23 1152 0 0 0 0 0 0 0 0 0 0 0 0 1
24 -3 0 0 0 0 0 0 0 0 0 0 0 0 0
25 156 0 0 1 0 0 0 0 0 0 0 0 0 0
26 -1131 0 0 0 1 0 0 0 0 0 0 0 0 0
27 -1033 0 0 0 0 1 0 0 0 0 0 0 0 0
28 -130 0 0 0 0 0 1 0 0 0 0 0 0 0
29 -599 0 0 0 0 0 0 1 0 0 0 0 0 0
30 -1633 0 0 0 0 0 0 0 1 0 0 0 0 0
31 527 0 0 0 0 0 0 0 0 1 0 0 0 0
32 112 0 0 0 0 0 0 0 0 0 1 0 0 0
33 -895 0 0 0 0 0 0 0 0 0 0 1 0 0
34 669 0 0 0 0 0 0 0 0 0 0 0 1 0
35 -2126 0 1 0 0 0 0 0 0 0 0 0 0 1
36 -1779 0 0 0 0 0 0 0 0 0 0 0 0 0
37 -129 0 0 1 0 0 0 0 0 0 0 0 0 0
38 1922 0 0 0 1 0 0 0 0 0 0 0 0 0
39 674 0 0 0 0 1 0 0 0 0 0 0 0 0
40 185 0 0 0 0 0 1 0 0 0 0 0 0 0
41 -788 0 0 0 0 0 0 1 0 0 0 0 0 0
42 -696 0 0 0 0 0 0 0 1 0 0 0 0 0
43 -748 0 0 0 0 0 0 0 0 1 0 0 0 0
44 893 0 0 0 0 0 0 0 0 0 1 0 0 0
45 458 0 0 0 0 0 0 0 0 0 0 1 0 0
46 -78 0 0 0 0 0 0 0 0 0 0 0 1 0
47 -280 0 0 0 0 0 0 0 0 0 0 0 0 1
48 -1865 0 0 0 0 0 0 0 0 0 0 0 0 0
49 788 0 0 1 0 0 0 0 0 0 0 0 0 0
50 -916 0 0 0 1 0 0 0 0 0 0 0 0 0
51 1286 0 0 0 0 1 0 0 0 0 0 0 0 0
52 883 0 0 0 0 0 1 0 0 0 0 0 0 0
53 193 0 0 0 0 0 0 1 0 0 0 0 0 0
54 -2527 0 1 0 0 0 0 0 1 0 0 0 0 0
55 -1792 0 0 0 0 0 0 0 0 1 0 0 0 0
56 370 0 0 0 0 0 0 0 0 0 1 0 0 0
57 -2952 0 1 0 0 0 0 0 0 0 0 1 0 0
58 -403 0 0 0 0 0 0 0 0 0 0 0 1 0
59 -1478 0 0 0 0 0 0 0 0 0 0 0 0 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) pos neg M1 M2 M3
-980.0 3977.0 -2193.1 1121.6 750.8 1132.2
M4 M5 M6 M7 M8 M9
1058.6 1153.2 506.2 213.6 970.0 546.4
M10 M11
522.8 959.0
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1457.01 -514.70 18.39 514.80 2151.20
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -980.0 430.9 -2.274 0.0278 *
pos 3977.0 684.0 5.815 5.88e-07 ***
neg -2193.1 483.6 -4.535 4.26e-05 ***
M1 1121.6 578.1 1.940 0.0586 .
M2 750.8 578.1 1.299 0.2006
M3 1132.2 578.1 1.959 0.0564 .
M4 1058.6 578.1 1.831 0.0737 .
M5 1153.2 578.1 1.995 0.0521 .
M6 506.2 603.8 0.838 0.4063
M7 213.6 586.1 0.364 0.7172
M8 970.0 578.1 1.678 0.1003
M9 546.4 586.1 0.932 0.3562
M10 522.8 594.1 0.880 0.3835
M11 959.0 586.1 1.636 0.1088
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 861.8 on 45 degrees of freedom
Multiple R-Squared: 0.635, Adjusted R-squared: 0.5296
F-statistic: 6.022 on 13 and 45 DF, p-value: 2.649e-06
> postscript(file="/var/www/html/rcomp/tmp/1p73e1200475834.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/2bfb51200475834.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/3rnsb1200475834.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/4v8t01200475834.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/5i8fs1200475834.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 = 59
Frequency = 1
1 2 3 4 5 6
190.40000 411.20000 -455.20000 -521.60000 734.80000 507.79370
7 8 9 10 11 12
97.45039 -1116.00000 383.58740 -507.79370 454.98740 707.00000
13 14 15 16 17 18
-580.60000 -973.80000 -15.20000 -180.60000 978.80000 733.78583
19 20 21 22 23 24
-383.61260 -289.00000 -488.41260 -1051.80157 1172.98740 977.00000
25 26 27 28 29 30
14.40000 -901.80000 -1185.20000 -208.60000 -772.20000 -1159.21417
31 32 33 34 35 36
1293.38740 122.00000 -461.41260 1126.19843 88.05039 -799.00000
37 38 39 40 41 42
-270.60000 2151.20000 521.80000 106.40000 -961.20000 -222.21417
43 44 45 46 47 48
18.38740 903.00000 891.58740 379.19843 -259.01260 -885.00000
49 50 51 52 53 54
646.40000 -686.80000 1133.80000 804.40000 19.80000 139.84882
55 56 57 58 59
-1025.61260 380.00000 -325.34961 54.19843 -1457.01260
> postscript(file="/var/www/html/rcomp/tmp/6u3jm1200475834.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 = 59
Frequency = 1
lag(myerror, k = 1) myerror
0 190.40000 NA
1 411.20000 190.40000
2 -455.20000 411.20000
3 -521.60000 -455.20000
4 734.80000 -521.60000
5 507.79370 734.80000
6 97.45039 507.79370
7 -1116.00000 97.45039
8 383.58740 -1116.00000
9 -507.79370 383.58740
10 454.98740 -507.79370
11 707.00000 454.98740
12 -580.60000 707.00000
13 -973.80000 -580.60000
14 -15.20000 -973.80000
15 -180.60000 -15.20000
16 978.80000 -180.60000
17 733.78583 978.80000
18 -383.61260 733.78583
19 -289.00000 -383.61260
20 -488.41260 -289.00000
21 -1051.80157 -488.41260
22 1172.98740 -1051.80157
23 977.00000 1172.98740
24 14.40000 977.00000
25 -901.80000 14.40000
26 -1185.20000 -901.80000
27 -208.60000 -1185.20000
28 -772.20000 -208.60000
29 -1159.21417 -772.20000
30 1293.38740 -1159.21417
31 122.00000 1293.38740
32 -461.41260 122.00000
33 1126.19843 -461.41260
34 88.05039 1126.19843
35 -799.00000 88.05039
36 -270.60000 -799.00000
37 2151.20000 -270.60000
38 521.80000 2151.20000
39 106.40000 521.80000
40 -961.20000 106.40000
41 -222.21417 -961.20000
42 18.38740 -222.21417
43 903.00000 18.38740
44 891.58740 903.00000
45 379.19843 891.58740
46 -259.01260 379.19843
47 -885.00000 -259.01260
48 646.40000 -885.00000
49 -686.80000 646.40000
50 1133.80000 -686.80000
51 804.40000 1133.80000
52 19.80000 804.40000
53 139.84882 19.80000
54 -1025.61260 139.84882
55 380.00000 -1025.61260
56 -325.34961 380.00000
57 54.19843 -325.34961
58 -1457.01260 54.19843
59 NA -1457.01260
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 411.20000 190.40000
[2,] -455.20000 411.20000
[3,] -521.60000 -455.20000
[4,] 734.80000 -521.60000
[5,] 507.79370 734.80000
[6,] 97.45039 507.79370
[7,] -1116.00000 97.45039
[8,] 383.58740 -1116.00000
[9,] -507.79370 383.58740
[10,] 454.98740 -507.79370
[11,] 707.00000 454.98740
[12,] -580.60000 707.00000
[13,] -973.80000 -580.60000
[14,] -15.20000 -973.80000
[15,] -180.60000 -15.20000
[16,] 978.80000 -180.60000
[17,] 733.78583 978.80000
[18,] -383.61260 733.78583
[19,] -289.00000 -383.61260
[20,] -488.41260 -289.00000
[21,] -1051.80157 -488.41260
[22,] 1172.98740 -1051.80157
[23,] 977.00000 1172.98740
[24,] 14.40000 977.00000
[25,] -901.80000 14.40000
[26,] -1185.20000 -901.80000
[27,] -208.60000 -1185.20000
[28,] -772.20000 -208.60000
[29,] -1159.21417 -772.20000
[30,] 1293.38740 -1159.21417
[31,] 122.00000 1293.38740
[32,] -461.41260 122.00000
[33,] 1126.19843 -461.41260
[34,] 88.05039 1126.19843
[35,] -799.00000 88.05039
[36,] -270.60000 -799.00000
[37,] 2151.20000 -270.60000
[38,] 521.80000 2151.20000
[39,] 106.40000 521.80000
[40,] -961.20000 106.40000
[41,] -222.21417 -961.20000
[42,] 18.38740 -222.21417
[43,] 903.00000 18.38740
[44,] 891.58740 903.00000
[45,] 379.19843 891.58740
[46,] -259.01260 379.19843
[47,] -885.00000 -259.01260
[48,] 646.40000 -885.00000
[49,] -686.80000 646.40000
[50,] 1133.80000 -686.80000
[51,] 804.40000 1133.80000
[52,] 19.80000 804.40000
[53,] 139.84882 19.80000
[54,] -1025.61260 139.84882
[55,] 380.00000 -1025.61260
[56,] -325.34961 380.00000
[57,] 54.19843 -325.34961
[58,] -1457.01260 54.19843
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 411.20000 190.40000
2 -455.20000 411.20000
3 -521.60000 -455.20000
4 734.80000 -521.60000
5 507.79370 734.80000
6 97.45039 507.79370
7 -1116.00000 97.45039
8 383.58740 -1116.00000
9 -507.79370 383.58740
10 454.98740 -507.79370
11 707.00000 454.98740
12 -580.60000 707.00000
13 -973.80000 -580.60000
14 -15.20000 -973.80000
15 -180.60000 -15.20000
16 978.80000 -180.60000
17 733.78583 978.80000
18 -383.61260 733.78583
19 -289.00000 -383.61260
20 -488.41260 -289.00000
21 -1051.80157 -488.41260
22 1172.98740 -1051.80157
23 977.00000 1172.98740
24 14.40000 977.00000
25 -901.80000 14.40000
26 -1185.20000 -901.80000
27 -208.60000 -1185.20000
28 -772.20000 -208.60000
29 -1159.21417 -772.20000
30 1293.38740 -1159.21417
31 122.00000 1293.38740
32 -461.41260 122.00000
33 1126.19843 -461.41260
34 88.05039 1126.19843
35 -799.00000 88.05039
36 -270.60000 -799.00000
37 2151.20000 -270.60000
38 521.80000 2151.20000
39 106.40000 521.80000
40 -961.20000 106.40000
41 -222.21417 -961.20000
42 18.38740 -222.21417
43 903.00000 18.38740
44 891.58740 903.00000
45 379.19843 891.58740
46 -259.01260 379.19843
47 -885.00000 -259.01260
48 646.40000 -885.00000
49 -686.80000 646.40000
50 1133.80000 -686.80000
51 804.40000 1133.80000
52 19.80000 804.40000
53 139.84882 19.80000
54 -1025.61260 139.84882
55 380.00000 -1025.61260
56 -325.34961 380.00000
57 54.19843 -325.34961
58 -1457.01260 54.19843
> 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/72prq1200475834.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/8ij5s1200475834.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/9mc201200475834.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/108xsj1200475834.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/112ysx1200475834.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/12jq9d1200475835.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/13kqar1200475835.tab")
>
> system("convert tmp/1p73e1200475834.ps tmp/1p73e1200475834.png")
> system("convert tmp/2bfb51200475834.ps tmp/2bfb51200475834.png")
> system("convert tmp/3rnsb1200475834.ps tmp/3rnsb1200475834.png")
> system("convert tmp/4v8t01200475834.ps tmp/4v8t01200475834.png")
> system("convert tmp/5i8fs1200475834.ps tmp/5i8fs1200475834.png")
> system("convert tmp/6u3jm1200475834.ps tmp/6u3jm1200475834.png")
> system("convert tmp/72prq1200475834.ps tmp/72prq1200475834.png")
> system("convert tmp/8ij5s1200475834.ps tmp/8ij5s1200475834.png")
> system("convert tmp/9mc201200475834.ps tmp/9mc201200475834.png")
>
>
> proc.time()
user system elapsed
3.980 2.452 4.319