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.
Natural language support but running in an English locale
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(95.90,96.92,96.06,96.06,96.31,96.59,96.34,96.67,96.49,97.27,96.22,96.38,96.53,96.47,96.50,96.05,96.77,96.76,96.66,96.51,96.58,96.55,96.63,95.97,97.06,97.00,97.73,97.46,98.01,97.90,97.76,98.42,97.49,98.54,97.77,99.00,97.96,98.94,98.23,99.02,98.51,100.07,98.19,98.72,98.37,98.73,98.31,98.04,98.60,99.08,98.97,99.22,99.11,99.57,99.64,100.44,100.03,100.84,99.98,100.75,100.32,100.49,100.44,99.98,100.51,99.96,101.00,99.76,100.88,100.11,100.55,99.79,100.83,100.29,101.51,101.12,102.16,102.65,102.39,102.71,102.54,103.39,102.85,102.80,103.47,102.07,103.57,102.15,103.69,101.21,103.50,101.27,103.47,101.86,103.45,101.65,103.48,101.94,103.93,102.62,103.89,102.71,104.40,103.39,104.79,104.51,104.77,104.09,105.13,104.29,105.26,104.57,104.96,105.39,104.75,105.15,105.01,106.13,105.15,105.46,105.20,106.47,105.77,106.62,105.78,106.52,106.26,108.04,106.13,107.15,106.12,107.32,106.57,107.76,106.44,107.26,106.54,107.89),dim=c(2,69),dimnames=list(c('Y','X'),1:69))
> y <- array(NA,dim=c(2,69),dimnames=list(c('Y','X'),1:69))
> 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 = '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 t
1 95.90 96.92 1
2 96.06 96.06 2
3 96.31 96.59 3
4 96.34 96.67 4
5 96.49 97.27 5
6 96.22 96.38 6
7 96.53 96.47 7
8 96.50 96.05 8
9 96.77 96.76 9
10 96.66 96.51 10
11 96.58 96.55 11
12 96.63 95.97 12
13 97.06 97.00 13
14 97.73 97.46 14
15 98.01 97.90 15
16 97.76 98.42 16
17 97.49 98.54 17
18 97.77 99.00 18
19 97.96 98.94 19
20 98.23 99.02 20
21 98.51 100.07 21
22 98.19 98.72 22
23 98.37 98.73 23
24 98.31 98.04 24
25 98.60 99.08 25
26 98.97 99.22 26
27 99.11 99.57 27
28 99.64 100.44 28
29 100.03 100.84 29
30 99.98 100.75 30
31 100.32 100.49 31
32 100.44 99.98 32
33 100.51 99.96 33
34 101.00 99.76 34
35 100.88 100.11 35
36 100.55 99.79 36
37 100.83 100.29 37
38 101.51 101.12 38
39 102.16 102.65 39
40 102.39 102.71 40
41 102.54 103.39 41
42 102.85 102.80 42
43 103.47 102.07 43
44 103.57 102.15 44
45 103.69 101.21 45
46 103.50 101.27 46
47 103.47 101.86 47
48 103.45 101.65 48
49 103.48 101.94 49
50 103.93 102.62 50
51 103.89 102.71 51
52 104.40 103.39 52
53 104.79 104.51 53
54 104.77 104.09 54
55 105.13 104.29 55
56 105.26 104.57 56
57 104.96 105.39 57
58 104.75 105.15 58
59 105.01 106.13 59
60 105.15 105.46 60
61 105.20 106.47 61
62 105.77 106.62 62
63 105.78 106.52 63
64 106.26 108.04 64
65 106.13 107.15 65
66 106.12 107.32 66
67 106.57 107.76 67
68 106.44 107.26 68
69 106.54 107.89 69
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) X t
89.93931 0.05387 0.16332
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.83058 -0.32633 -0.08292 0.34680 1.00932
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 89.93931 5.91696 15.200 <2e-16 ***
X 0.05387 0.06217 0.867 0.389
t 0.16332 0.01096 14.900 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.4507 on 66 degrees of freedom
Multiple R-Squared: 0.9838, Adjusted R-squared: 0.9833
F-statistic: 2005 on 2 and 66 DF, p-value: < 2.2e-16
> postscript(file="/var/www/html/rcomp/tmp/1yq6e1195582958.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/2rifz1195582958.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/3tbm61195582958.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/4x1m11195582958.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/5pswo1195582958.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 = 69
Frequency = 1
1 2 3 4 5 6
0.57600804 0.61902357 0.67715567 0.53953060 0.49389160 0.10852331
7 8 9 10 11 12
0.25035952 0.07967094 0.14810591 -0.11174108 -0.35721122 -0.43928013
13 14 15 16 17 18
-0.22808451 0.25381870 0.34679936 -0.09452981 -0.53430979 -0.44240658
19 20 21 22 23 24
-0.41248943 -0.31011449 -0.24999634 -0.66058306 -0.64443701 -0.83057989
25 26 27 28 29 30
-0.75992300 -0.56078044 -0.60295121 -0.28313592 -0.07800033 -0.28646699
31 32 33 34 35 36
-0.09577525 -0.11161526 -0.20385303 0.13360634 -0.16856442 -0.64464030
37 38 39 40 41 42
-0.55489201 -0.08292180 0.32133733 0.38478973 0.33484088 0.51331071
43 44 45 46 47 48
1.00932275 0.94169768 0.94902305 0.59247544 0.36737517 0.19537326
49 50 51 52 53 54
0.04643488 0.29648603 0.08832224 0.39837339 0.56472044 0.40403186
55 56 57 58 59 60
0.58994204 0.54154238 0.03405132 -0.32633439 -0.28244513 -0.26966546
61 62 63 64 65 66
-0.43739239 -0.03878856 -0.18671649 0.04808137 -0.19728691 -0.37976054
67 68 69
-0.11677988 -0.38315862 -0.48041382
> postscript(file="/var/www/html/rcomp/tmp/6vpai1195582958.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 = 69
Frequency = 1
lag(myerror, k = 1) myerror
0 0.57600804 NA
1 0.61902357 0.57600804
2 0.67715567 0.61902357
3 0.53953060 0.67715567
4 0.49389160 0.53953060
5 0.10852331 0.49389160
6 0.25035952 0.10852331
7 0.07967094 0.25035952
8 0.14810591 0.07967094
9 -0.11174108 0.14810591
10 -0.35721122 -0.11174108
11 -0.43928013 -0.35721122
12 -0.22808451 -0.43928013
13 0.25381870 -0.22808451
14 0.34679936 0.25381870
15 -0.09452981 0.34679936
16 -0.53430979 -0.09452981
17 -0.44240658 -0.53430979
18 -0.41248943 -0.44240658
19 -0.31011449 -0.41248943
20 -0.24999634 -0.31011449
21 -0.66058306 -0.24999634
22 -0.64443701 -0.66058306
23 -0.83057989 -0.64443701
24 -0.75992300 -0.83057989
25 -0.56078044 -0.75992300
26 -0.60295121 -0.56078044
27 -0.28313592 -0.60295121
28 -0.07800033 -0.28313592
29 -0.28646699 -0.07800033
30 -0.09577525 -0.28646699
31 -0.11161526 -0.09577525
32 -0.20385303 -0.11161526
33 0.13360634 -0.20385303
34 -0.16856442 0.13360634
35 -0.64464030 -0.16856442
36 -0.55489201 -0.64464030
37 -0.08292180 -0.55489201
38 0.32133733 -0.08292180
39 0.38478973 0.32133733
40 0.33484088 0.38478973
41 0.51331071 0.33484088
42 1.00932275 0.51331071
43 0.94169768 1.00932275
44 0.94902305 0.94169768
45 0.59247544 0.94902305
46 0.36737517 0.59247544
47 0.19537326 0.36737517
48 0.04643488 0.19537326
49 0.29648603 0.04643488
50 0.08832224 0.29648603
51 0.39837339 0.08832224
52 0.56472044 0.39837339
53 0.40403186 0.56472044
54 0.58994204 0.40403186
55 0.54154238 0.58994204
56 0.03405132 0.54154238
57 -0.32633439 0.03405132
58 -0.28244513 -0.32633439
59 -0.26966546 -0.28244513
60 -0.43739239 -0.26966546
61 -0.03878856 -0.43739239
62 -0.18671649 -0.03878856
63 0.04808137 -0.18671649
64 -0.19728691 0.04808137
65 -0.37976054 -0.19728691
66 -0.11677988 -0.37976054
67 -0.38315862 -0.11677988
68 -0.48041382 -0.38315862
69 NA -0.48041382
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.61902357 0.57600804
[2,] 0.67715567 0.61902357
[3,] 0.53953060 0.67715567
[4,] 0.49389160 0.53953060
[5,] 0.10852331 0.49389160
[6,] 0.25035952 0.10852331
[7,] 0.07967094 0.25035952
[8,] 0.14810591 0.07967094
[9,] -0.11174108 0.14810591
[10,] -0.35721122 -0.11174108
[11,] -0.43928013 -0.35721122
[12,] -0.22808451 -0.43928013
[13,] 0.25381870 -0.22808451
[14,] 0.34679936 0.25381870
[15,] -0.09452981 0.34679936
[16,] -0.53430979 -0.09452981
[17,] -0.44240658 -0.53430979
[18,] -0.41248943 -0.44240658
[19,] -0.31011449 -0.41248943
[20,] -0.24999634 -0.31011449
[21,] -0.66058306 -0.24999634
[22,] -0.64443701 -0.66058306
[23,] -0.83057989 -0.64443701
[24,] -0.75992300 -0.83057989
[25,] -0.56078044 -0.75992300
[26,] -0.60295121 -0.56078044
[27,] -0.28313592 -0.60295121
[28,] -0.07800033 -0.28313592
[29,] -0.28646699 -0.07800033
[30,] -0.09577525 -0.28646699
[31,] -0.11161526 -0.09577525
[32,] -0.20385303 -0.11161526
[33,] 0.13360634 -0.20385303
[34,] -0.16856442 0.13360634
[35,] -0.64464030 -0.16856442
[36,] -0.55489201 -0.64464030
[37,] -0.08292180 -0.55489201
[38,] 0.32133733 -0.08292180
[39,] 0.38478973 0.32133733
[40,] 0.33484088 0.38478973
[41,] 0.51331071 0.33484088
[42,] 1.00932275 0.51331071
[43,] 0.94169768 1.00932275
[44,] 0.94902305 0.94169768
[45,] 0.59247544 0.94902305
[46,] 0.36737517 0.59247544
[47,] 0.19537326 0.36737517
[48,] 0.04643488 0.19537326
[49,] 0.29648603 0.04643488
[50,] 0.08832224 0.29648603
[51,] 0.39837339 0.08832224
[52,] 0.56472044 0.39837339
[53,] 0.40403186 0.56472044
[54,] 0.58994204 0.40403186
[55,] 0.54154238 0.58994204
[56,] 0.03405132 0.54154238
[57,] -0.32633439 0.03405132
[58,] -0.28244513 -0.32633439
[59,] -0.26966546 -0.28244513
[60,] -0.43739239 -0.26966546
[61,] -0.03878856 -0.43739239
[62,] -0.18671649 -0.03878856
[63,] 0.04808137 -0.18671649
[64,] -0.19728691 0.04808137
[65,] -0.37976054 -0.19728691
[66,] -0.11677988 -0.37976054
[67,] -0.38315862 -0.11677988
[68,] -0.48041382 -0.38315862
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.61902357 0.57600804
2 0.67715567 0.61902357
3 0.53953060 0.67715567
4 0.49389160 0.53953060
5 0.10852331 0.49389160
6 0.25035952 0.10852331
7 0.07967094 0.25035952
8 0.14810591 0.07967094
9 -0.11174108 0.14810591
10 -0.35721122 -0.11174108
11 -0.43928013 -0.35721122
12 -0.22808451 -0.43928013
13 0.25381870 -0.22808451
14 0.34679936 0.25381870
15 -0.09452981 0.34679936
16 -0.53430979 -0.09452981
17 -0.44240658 -0.53430979
18 -0.41248943 -0.44240658
19 -0.31011449 -0.41248943
20 -0.24999634 -0.31011449
21 -0.66058306 -0.24999634
22 -0.64443701 -0.66058306
23 -0.83057989 -0.64443701
24 -0.75992300 -0.83057989
25 -0.56078044 -0.75992300
26 -0.60295121 -0.56078044
27 -0.28313592 -0.60295121
28 -0.07800033 -0.28313592
29 -0.28646699 -0.07800033
30 -0.09577525 -0.28646699
31 -0.11161526 -0.09577525
32 -0.20385303 -0.11161526
33 0.13360634 -0.20385303
34 -0.16856442 0.13360634
35 -0.64464030 -0.16856442
36 -0.55489201 -0.64464030
37 -0.08292180 -0.55489201
38 0.32133733 -0.08292180
39 0.38478973 0.32133733
40 0.33484088 0.38478973
41 0.51331071 0.33484088
42 1.00932275 0.51331071
43 0.94169768 1.00932275
44 0.94902305 0.94169768
45 0.59247544 0.94902305
46 0.36737517 0.59247544
47 0.19537326 0.36737517
48 0.04643488 0.19537326
49 0.29648603 0.04643488
50 0.08832224 0.29648603
51 0.39837339 0.08832224
52 0.56472044 0.39837339
53 0.40403186 0.56472044
54 0.58994204 0.40403186
55 0.54154238 0.58994204
56 0.03405132 0.54154238
57 -0.32633439 0.03405132
58 -0.28244513 -0.32633439
59 -0.26966546 -0.28244513
60 -0.43739239 -0.26966546
61 -0.03878856 -0.43739239
62 -0.18671649 -0.03878856
63 0.04808137 -0.18671649
64 -0.19728691 0.04808137
65 -0.37976054 -0.19728691
66 -0.11677988 -0.37976054
67 -0.38315862 -0.11677988
68 -0.48041382 -0.38315862
> 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/76mg51195582959.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/81ame1195582959.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/9ba891195582959.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/10eokm1195582959.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/115p6b1195582959.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/121d121195582959.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/133wux1195582959.tab")
>
> system("convert tmp/1yq6e1195582958.ps tmp/1yq6e1195582958.png")
> system("convert tmp/2rifz1195582958.ps tmp/2rifz1195582958.png")
> system("convert tmp/3tbm61195582958.ps tmp/3tbm61195582958.png")
> system("convert tmp/4x1m11195582958.ps tmp/4x1m11195582958.png")
> system("convert tmp/5pswo1195582958.ps tmp/5pswo1195582958.png")
> system("convert tmp/6vpai1195582958.ps tmp/6vpai1195582958.png")
> system("convert tmp/76mg51195582959.ps tmp/76mg51195582959.png")
> system("convert tmp/81ame1195582959.ps tmp/81ame1195582959.png")
> system("convert tmp/9ba891195582959.ps tmp/9ba891195582959.png")
>
>
> proc.time()
user system elapsed
4.146 2.462 4.502