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(85.0,0,87.6,0,88.6,0,95.0,0,96.3,0,83.3,0,96.9,0,103.4,0,99.3,0,103.8,0,113.4,0,111.5,0,114.2,0,90.6,0,90.8,0,96.4,0,90.0,0,92.1,0,97.2,0,95.1,0,88.5,0,91.0,0,90.5,1,75.0,1,66.3,1,66.0,1,68.4,1,70.6,1,83.9,1,90.1,1,90.6,1,87.1,1,90.8,1,94.1,1,99.8,1,96.8,1,87.0,1,96.3,1,107.1,1,115.2,1,106.1,1,89.5,1,91.3,1,97.6,1,100.7,1,104.6,1,94.7,1,101.8,1,102.5,1,105.3,1),dim=c(2,50),dimnames=list(c('x','y'),1:50))
> y <- array(NA,dim=c(2,50),dimnames=list(c('x','y'),1:50))
> 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
x y M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 85.0 0 1 0 0 0 0 0 0 0 0 0 0 1
2 87.6 0 0 1 0 0 0 0 0 0 0 0 0 2
3 88.6 0 0 0 1 0 0 0 0 0 0 0 0 3
4 95.0 0 0 0 0 1 0 0 0 0 0 0 0 4
5 96.3 0 0 0 0 0 1 0 0 0 0 0 0 5
6 83.3 0 0 0 0 0 0 1 0 0 0 0 0 6
7 96.9 0 0 0 0 0 0 0 1 0 0 0 0 7
8 103.4 0 0 0 0 0 0 0 0 1 0 0 0 8
9 99.3 0 0 0 0 0 0 0 0 0 1 0 0 9
10 103.8 0 0 0 0 0 0 0 0 0 0 1 0 10
11 113.4 0 0 0 0 0 0 0 0 0 0 0 1 11
12 111.5 0 0 0 0 0 0 0 0 0 0 0 0 12
13 114.2 0 1 0 0 0 0 0 0 0 0 0 0 13
14 90.6 0 0 1 0 0 0 0 0 0 0 0 0 14
15 90.8 0 0 0 1 0 0 0 0 0 0 0 0 15
16 96.4 0 0 0 0 1 0 0 0 0 0 0 0 16
17 90.0 0 0 0 0 0 1 0 0 0 0 0 0 17
18 92.1 0 0 0 0 0 0 1 0 0 0 0 0 18
19 97.2 0 0 0 0 0 0 0 1 0 0 0 0 19
20 95.1 0 0 0 0 0 0 0 0 1 0 0 0 20
21 88.5 0 0 0 0 0 0 0 0 0 1 0 0 21
22 91.0 0 0 0 0 0 0 0 0 0 0 1 0 22
23 90.5 1 0 0 0 0 0 0 0 0 0 0 1 23
24 75.0 1 0 0 0 0 0 0 0 0 0 0 0 24
25 66.3 1 1 0 0 0 0 0 0 0 0 0 0 25
26 66.0 1 0 1 0 0 0 0 0 0 0 0 0 26
27 68.4 1 0 0 1 0 0 0 0 0 0 0 0 27
28 70.6 1 0 0 0 1 0 0 0 0 0 0 0 28
29 83.9 1 0 0 0 0 1 0 0 0 0 0 0 29
30 90.1 1 0 0 0 0 0 1 0 0 0 0 0 30
31 90.6 1 0 0 0 0 0 0 1 0 0 0 0 31
32 87.1 1 0 0 0 0 0 0 0 1 0 0 0 32
33 90.8 1 0 0 0 0 0 0 0 0 1 0 0 33
34 94.1 1 0 0 0 0 0 0 0 0 0 1 0 34
35 99.8 1 0 0 0 0 0 0 0 0 0 0 1 35
36 96.8 1 0 0 0 0 0 0 0 0 0 0 0 36
37 87.0 1 1 0 0 0 0 0 0 0 0 0 0 37
38 96.3 1 0 1 0 0 0 0 0 0 0 0 0 38
39 107.1 1 0 0 1 0 0 0 0 0 0 0 0 39
40 115.2 1 0 0 0 1 0 0 0 0 0 0 0 40
41 106.1 1 0 0 0 0 1 0 0 0 0 0 0 41
42 89.5 1 0 0 0 0 0 1 0 0 0 0 0 42
43 91.3 1 0 0 0 0 0 0 1 0 0 0 0 43
44 97.6 1 0 0 0 0 0 0 0 1 0 0 0 44
45 100.7 1 0 0 0 0 0 0 0 0 1 0 0 45
46 104.6 1 0 0 0 0 0 0 0 0 0 1 0 46
47 94.7 1 0 0 0 0 0 0 0 0 0 0 1 47
48 101.8 1 0 0 0 0 0 0 0 0 0 0 0 48
49 102.5 1 1 0 0 0 0 0 0 0 0 0 0 49
50 105.3 1 0 1 0 0 0 0 0 0 0 0 0 50
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) y M1 M2 M3 M4
90.5447 -25.7745 -4.9643 -7.6397 -6.4753 -1.7356
M5 M6 M7 M8 M9 M10
-2.7960 -8.9564 -4.5418 -3.5771 -5.3875 -2.6729
M11 t
4.1604 0.8354
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-15.825 -4.806 1.696 4.906 18.751
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 90.5447 5.9438 15.233 < 2e-16 ***
y -25.7745 5.8607 -4.398 9.3e-05 ***
M1 -4.9643 6.7957 -0.731 0.469805
M2 -7.6397 6.7914 -1.125 0.268072
M3 -6.4753 7.2015 -0.899 0.374547
M4 -1.7356 7.1892 -0.241 0.810595
M5 -2.7960 7.1824 -0.389 0.699356
M6 -8.9564 7.1813 -1.247 0.220382
M7 -4.5418 7.1858 -0.632 0.531350
M8 -3.5771 7.1960 -0.497 0.622139
M9 -5.3875 7.2118 -0.747 0.459887
M10 -2.6729 7.2331 -0.370 0.713894
M11 4.1604 7.1464 0.582 0.564087
t 0.8354 0.2014 4.148 0.000195 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 10.1 on 36 degrees of freedom
Multiple R-Squared: 0.4177, Adjusted R-squared: 0.2074
F-statistic: 1.986 on 13 and 36 DF, p-value: 0.05211
> postscript(file="/var/www/html/rcomp/tmp/1edmz1197028107.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/219uk1197028107.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/3aigk1197028107.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/4wivr1197028107.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/5r53i1197028107.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 = 50
Frequency = 1
1 2 3 4 5 6
-1.4157692 3.0242308 2.0244471 2.8494471 4.3744471 -3.3005529
7 8 9 10 11 12
5.0494471 9.7494471 6.6244471 7.5744471 9.5058173 10.9308173
13 14 15 16 17 18
17.7597596 -4.0002404 -5.8000240 -5.7750240 -11.9500240 -4.5250240
19 20 21 22 23 24
-4.6750240 -8.5750240 -14.2000240 -15.2500240 2.3558654 -9.8191346
25 26 27 28 29 30
-14.3901923 -12.8501923 -12.4499760 -15.8249760 -2.2999760 9.2250240
31 32 33 34 35 36
4.4750240 -0.8249760 3.8500240 3.6000240 1.6313942 1.9563942
37 38 39 40 41 42
-3.7146635 7.4253365 16.2255529 18.7505529 9.8755529 -1.3994471
43 44 45 46 47 48
-4.8494471 -0.3494471 3.7255529 4.0755529 -13.4930769 -3.0680769
49 50
1.7608654 6.4008654
> postscript(file="/var/www/html/rcomp/tmp/67scz1197028108.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 = 50
Frequency = 1
lag(myerror, k = 1) myerror
0 -1.4157692 NA
1 3.0242308 -1.4157692
2 2.0244471 3.0242308
3 2.8494471 2.0244471
4 4.3744471 2.8494471
5 -3.3005529 4.3744471
6 5.0494471 -3.3005529
7 9.7494471 5.0494471
8 6.6244471 9.7494471
9 7.5744471 6.6244471
10 9.5058173 7.5744471
11 10.9308173 9.5058173
12 17.7597596 10.9308173
13 -4.0002404 17.7597596
14 -5.8000240 -4.0002404
15 -5.7750240 -5.8000240
16 -11.9500240 -5.7750240
17 -4.5250240 -11.9500240
18 -4.6750240 -4.5250240
19 -8.5750240 -4.6750240
20 -14.2000240 -8.5750240
21 -15.2500240 -14.2000240
22 2.3558654 -15.2500240
23 -9.8191346 2.3558654
24 -14.3901923 -9.8191346
25 -12.8501923 -14.3901923
26 -12.4499760 -12.8501923
27 -15.8249760 -12.4499760
28 -2.2999760 -15.8249760
29 9.2250240 -2.2999760
30 4.4750240 9.2250240
31 -0.8249760 4.4750240
32 3.8500240 -0.8249760
33 3.6000240 3.8500240
34 1.6313942 3.6000240
35 1.9563942 1.6313942
36 -3.7146635 1.9563942
37 7.4253365 -3.7146635
38 16.2255529 7.4253365
39 18.7505529 16.2255529
40 9.8755529 18.7505529
41 -1.3994471 9.8755529
42 -4.8494471 -1.3994471
43 -0.3494471 -4.8494471
44 3.7255529 -0.3494471
45 4.0755529 3.7255529
46 -13.4930769 4.0755529
47 -3.0680769 -13.4930769
48 1.7608654 -3.0680769
49 6.4008654 1.7608654
50 NA 6.4008654
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.0242308 -1.4157692
[2,] 2.0244471 3.0242308
[3,] 2.8494471 2.0244471
[4,] 4.3744471 2.8494471
[5,] -3.3005529 4.3744471
[6,] 5.0494471 -3.3005529
[7,] 9.7494471 5.0494471
[8,] 6.6244471 9.7494471
[9,] 7.5744471 6.6244471
[10,] 9.5058173 7.5744471
[11,] 10.9308173 9.5058173
[12,] 17.7597596 10.9308173
[13,] -4.0002404 17.7597596
[14,] -5.8000240 -4.0002404
[15,] -5.7750240 -5.8000240
[16,] -11.9500240 -5.7750240
[17,] -4.5250240 -11.9500240
[18,] -4.6750240 -4.5250240
[19,] -8.5750240 -4.6750240
[20,] -14.2000240 -8.5750240
[21,] -15.2500240 -14.2000240
[22,] 2.3558654 -15.2500240
[23,] -9.8191346 2.3558654
[24,] -14.3901923 -9.8191346
[25,] -12.8501923 -14.3901923
[26,] -12.4499760 -12.8501923
[27,] -15.8249760 -12.4499760
[28,] -2.2999760 -15.8249760
[29,] 9.2250240 -2.2999760
[30,] 4.4750240 9.2250240
[31,] -0.8249760 4.4750240
[32,] 3.8500240 -0.8249760
[33,] 3.6000240 3.8500240
[34,] 1.6313942 3.6000240
[35,] 1.9563942 1.6313942
[36,] -3.7146635 1.9563942
[37,] 7.4253365 -3.7146635
[38,] 16.2255529 7.4253365
[39,] 18.7505529 16.2255529
[40,] 9.8755529 18.7505529
[41,] -1.3994471 9.8755529
[42,] -4.8494471 -1.3994471
[43,] -0.3494471 -4.8494471
[44,] 3.7255529 -0.3494471
[45,] 4.0755529 3.7255529
[46,] -13.4930769 4.0755529
[47,] -3.0680769 -13.4930769
[48,] 1.7608654 -3.0680769
[49,] 6.4008654 1.7608654
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.0242308 -1.4157692
2 2.0244471 3.0242308
3 2.8494471 2.0244471
4 4.3744471 2.8494471
5 -3.3005529 4.3744471
6 5.0494471 -3.3005529
7 9.7494471 5.0494471
8 6.6244471 9.7494471
9 7.5744471 6.6244471
10 9.5058173 7.5744471
11 10.9308173 9.5058173
12 17.7597596 10.9308173
13 -4.0002404 17.7597596
14 -5.8000240 -4.0002404
15 -5.7750240 -5.8000240
16 -11.9500240 -5.7750240
17 -4.5250240 -11.9500240
18 -4.6750240 -4.5250240
19 -8.5750240 -4.6750240
20 -14.2000240 -8.5750240
21 -15.2500240 -14.2000240
22 2.3558654 -15.2500240
23 -9.8191346 2.3558654
24 -14.3901923 -9.8191346
25 -12.8501923 -14.3901923
26 -12.4499760 -12.8501923
27 -15.8249760 -12.4499760
28 -2.2999760 -15.8249760
29 9.2250240 -2.2999760
30 4.4750240 9.2250240
31 -0.8249760 4.4750240
32 3.8500240 -0.8249760
33 3.6000240 3.8500240
34 1.6313942 3.6000240
35 1.9563942 1.6313942
36 -3.7146635 1.9563942
37 7.4253365 -3.7146635
38 16.2255529 7.4253365
39 18.7505529 16.2255529
40 9.8755529 18.7505529
41 -1.3994471 9.8755529
42 -4.8494471 -1.3994471
43 -0.3494471 -4.8494471
44 3.7255529 -0.3494471
45 4.0755529 3.7255529
46 -13.4930769 4.0755529
47 -3.0680769 -13.4930769
48 1.7608654 -3.0680769
49 6.4008654 1.7608654
> 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/7je0w1197028108.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/88y611197028108.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/9k6941197028108.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/10lann1197028108.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/11w31s1197028108.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/12bhdl1197028108.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/13e02d1197028108.tab")
>
> system("convert tmp/1edmz1197028107.ps tmp/1edmz1197028107.png")
> system("convert tmp/219uk1197028107.ps tmp/219uk1197028107.png")
> system("convert tmp/3aigk1197028107.ps tmp/3aigk1197028107.png")
> system("convert tmp/4wivr1197028107.ps tmp/4wivr1197028107.png")
> system("convert tmp/5r53i1197028107.ps tmp/5r53i1197028107.png")
> system("convert tmp/67scz1197028108.ps tmp/67scz1197028108.png")
> system("convert tmp/7je0w1197028108.ps tmp/7je0w1197028108.png")
> system("convert tmp/88y611197028108.ps tmp/88y611197028108.png")
> system("convert tmp/9k6941197028108.ps tmp/9k6941197028108.png")
>
>
> proc.time()
user system elapsed
2.289 1.448 2.863