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.
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(9911,8915,9452,9112,8472,8230,8384,8625,8221,8649,8625,10443,10357,8586,8892,8329,8101,7922,8120,7838,7735,8406,8209,9451,10041,9411,10405,8467,8464,8102,7627,7513,7510,8291,8064,9383,9706,8579,9474,8318,8213,8059,9111,7708,7680,8014,8007,8718,9486,9113,9025,8476,7952,7759,7835,7600,7651,8319,8812,8630),dim=c(1,60),dimnames=list(c(''),1:60))
> y <- array(NA,dim=c(1,60),dimnames=list(c(''),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
M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 9911 1 0 0 0 0 0 0 0 0 0 0 1
2 8915 0 1 0 0 0 0 0 0 0 0 0 2
3 9452 0 0 1 0 0 0 0 0 0 0 0 3
4 9112 0 0 0 1 0 0 0 0 0 0 0 4
5 8472 0 0 0 0 1 0 0 0 0 0 0 5
6 8230 0 0 0 0 0 1 0 0 0 0 0 6
7 8384 0 0 0 0 0 0 1 0 0 0 0 7
8 8625 0 0 0 0 0 0 0 1 0 0 0 8
9 8221 0 0 0 0 0 0 0 0 1 0 0 9
10 8649 0 0 0 0 0 0 0 0 0 1 0 10
11 8625 0 0 0 0 0 0 0 0 0 0 1 11
12 10443 0 0 0 0 0 0 0 0 0 0 0 12
13 10357 1 0 0 0 0 0 0 0 0 0 0 13
14 8586 0 1 0 0 0 0 0 0 0 0 0 14
15 8892 0 0 1 0 0 0 0 0 0 0 0 15
16 8329 0 0 0 1 0 0 0 0 0 0 0 16
17 8101 0 0 0 0 1 0 0 0 0 0 0 17
18 7922 0 0 0 0 0 1 0 0 0 0 0 18
19 8120 0 0 0 0 0 0 1 0 0 0 0 19
20 7838 0 0 0 0 0 0 0 1 0 0 0 20
21 7735 0 0 0 0 0 0 0 0 1 0 0 21
22 8406 0 0 0 0 0 0 0 0 0 1 0 22
23 8209 0 0 0 0 0 0 0 0 0 0 1 23
24 9451 0 0 0 0 0 0 0 0 0 0 0 24
25 10041 1 0 0 0 0 0 0 0 0 0 0 25
26 9411 0 1 0 0 0 0 0 0 0 0 0 26
27 10405 0 0 1 0 0 0 0 0 0 0 0 27
28 8467 0 0 0 1 0 0 0 0 0 0 0 28
29 8464 0 0 0 0 1 0 0 0 0 0 0 29
30 8102 0 0 0 0 0 1 0 0 0 0 0 30
31 7627 0 0 0 0 0 0 1 0 0 0 0 31
32 7513 0 0 0 0 0 0 0 1 0 0 0 32
33 7510 0 0 0 0 0 0 0 0 1 0 0 33
34 8291 0 0 0 0 0 0 0 0 0 1 0 34
35 8064 0 0 0 0 0 0 0 0 0 0 1 35
36 9383 0 0 0 0 0 0 0 0 0 0 0 36
37 9706 1 0 0 0 0 0 0 0 0 0 0 37
38 8579 0 1 0 0 0 0 0 0 0 0 0 38
39 9474 0 0 1 0 0 0 0 0 0 0 0 39
40 8318 0 0 0 1 0 0 0 0 0 0 0 40
41 8213 0 0 0 0 1 0 0 0 0 0 0 41
42 8059 0 0 0 0 0 1 0 0 0 0 0 42
43 9111 0 0 0 0 0 0 1 0 0 0 0 43
44 7708 0 0 0 0 0 0 0 1 0 0 0 44
45 7680 0 0 0 0 0 0 0 0 1 0 0 45
46 8014 0 0 0 0 0 0 0 0 0 1 0 46
47 8007 0 0 0 0 0 0 0 0 0 0 1 47
48 8718 0 0 0 0 0 0 0 0 0 0 0 48
49 9486 1 0 0 0 0 0 0 0 0 0 0 49
50 9113 0 1 0 0 0 0 0 0 0 0 0 50
51 9025 0 0 1 0 0 0 0 0 0 0 0 51
52 8476 0 0 0 1 0 0 0 0 0 0 0 52
53 7952 0 0 0 0 1 0 0 0 0 0 0 53
54 7759 0 0 0 0 0 1 0 0 0 0 0 54
55 7835 0 0 0 0 0 0 1 0 0 0 0 55
56 7600 0 0 0 0 0 0 0 1 0 0 0 56
57 7651 0 0 0 0 0 0 0 0 1 0 0 57
58 8319 0 0 0 0 0 0 0 0 0 1 0 58
59 8812 0 0 0 0 0 0 0 0 0 0 1 59
60 8630 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) M1 M2 M3 M4 M5
9653.025 474.970 -495.318 42.594 -857.494 -1148.383
M6 M7 M8 M9 M10 M11
-1365.271 -1155.159 -1504.647 -1592.935 -1007.424 -990.712
t
-9.112
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-666.94 -213.41 -42.13 135.51 1004.94
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9653.025 201.514 47.903 < 2e-16 ***
M1 474.970 245.153 1.937 0.058713 .
M2 -495.318 244.786 -2.023 0.048732 *
M3 42.594 244.455 0.174 0.862425
M4 -857.494 244.157 -3.512 0.000994 ***
M5 -1148.383 243.895 -4.709 2.24e-05 ***
M6 -1365.271 243.667 -5.603 1.07e-06 ***
M7 -1155.159 243.474 -4.744 1.98e-05 ***
M8 -1504.647 243.316 -6.184 1.42e-07 ***
M9 -1592.935 243.193 -6.550 3.94e-08 ***
M10 -1007.424 243.105 -4.144 0.000141 ***
M11 -990.712 243.052 -4.076 0.000175 ***
t -9.112 2.923 -3.117 0.003114 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 384.3 on 47 degrees of freedom
Multiple R-squared: 0.7937, Adjusted R-squared: 0.741
F-statistic: 15.06 on 12 and 47 DF, p-value: 2.809e-12
> postscript(file="/var/www/html/freestat/rcomp/tmp/1daue1291719058.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/2o2uh1291719058.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/3o2uh1291719058.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/4o2uh1291719058.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/5hbb21291719058.ps",horizontal=F,onefile=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
-207.883333 -224.483333 -216.283333 352.916667 12.916667 -3.083333
7 8 9 10 11 12
-50.083333 549.516667 242.916667 94.516667 62.916667 899.316667
13 14 15 16 17 18
347.458333 -444.141667 -666.941667 -320.741667 -248.741667 -201.741667
19 20 21 22 23 24
-204.741667 -128.141667 -133.741667 -39.141667 -243.741667 16.658333
25 26 27 28 29 30
140.800000 490.200000 955.400000 -73.400000 223.600000 87.600000
31 32 33 34 35 36
-588.400000 -343.800000 -249.400000 -44.800000 -279.400000 58.000000
37 38 39 40 41 42
-84.858333 -232.458333 133.741667 -113.058333 81.941667 153.941667
43 44 45 46 47 48
1004.941667 -39.458333 29.941667 -212.458333 -227.058333 -497.658333
49 50 51 52 53 54
-195.516667 410.883333 -205.916667 154.283333 -69.716667 -36.716667
55 56 57 58 59 60
-161.716667 -38.116667 110.283333 201.883333 687.283333 -476.316667
> postscript(file="/var/www/html/freestat/rcomp/tmp/6hbb21291719058.ps",horizontal=F,onefile=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 -207.883333 NA
1 -224.483333 -207.883333
2 -216.283333 -224.483333
3 352.916667 -216.283333
4 12.916667 352.916667
5 -3.083333 12.916667
6 -50.083333 -3.083333
7 549.516667 -50.083333
8 242.916667 549.516667
9 94.516667 242.916667
10 62.916667 94.516667
11 899.316667 62.916667
12 347.458333 899.316667
13 -444.141667 347.458333
14 -666.941667 -444.141667
15 -320.741667 -666.941667
16 -248.741667 -320.741667
17 -201.741667 -248.741667
18 -204.741667 -201.741667
19 -128.141667 -204.741667
20 -133.741667 -128.141667
21 -39.141667 -133.741667
22 -243.741667 -39.141667
23 16.658333 -243.741667
24 140.800000 16.658333
25 490.200000 140.800000
26 955.400000 490.200000
27 -73.400000 955.400000
28 223.600000 -73.400000
29 87.600000 223.600000
30 -588.400000 87.600000
31 -343.800000 -588.400000
32 -249.400000 -343.800000
33 -44.800000 -249.400000
34 -279.400000 -44.800000
35 58.000000 -279.400000
36 -84.858333 58.000000
37 -232.458333 -84.858333
38 133.741667 -232.458333
39 -113.058333 133.741667
40 81.941667 -113.058333
41 153.941667 81.941667
42 1004.941667 153.941667
43 -39.458333 1004.941667
44 29.941667 -39.458333
45 -212.458333 29.941667
46 -227.058333 -212.458333
47 -497.658333 -227.058333
48 -195.516667 -497.658333
49 410.883333 -195.516667
50 -205.916667 410.883333
51 154.283333 -205.916667
52 -69.716667 154.283333
53 -36.716667 -69.716667
54 -161.716667 -36.716667
55 -38.116667 -161.716667
56 110.283333 -38.116667
57 201.883333 110.283333
58 687.283333 201.883333
59 -476.316667 687.283333
60 NA -476.316667
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -224.483333 -207.883333
[2,] -216.283333 -224.483333
[3,] 352.916667 -216.283333
[4,] 12.916667 352.916667
[5,] -3.083333 12.916667
[6,] -50.083333 -3.083333
[7,] 549.516667 -50.083333
[8,] 242.916667 549.516667
[9,] 94.516667 242.916667
[10,] 62.916667 94.516667
[11,] 899.316667 62.916667
[12,] 347.458333 899.316667
[13,] -444.141667 347.458333
[14,] -666.941667 -444.141667
[15,] -320.741667 -666.941667
[16,] -248.741667 -320.741667
[17,] -201.741667 -248.741667
[18,] -204.741667 -201.741667
[19,] -128.141667 -204.741667
[20,] -133.741667 -128.141667
[21,] -39.141667 -133.741667
[22,] -243.741667 -39.141667
[23,] 16.658333 -243.741667
[24,] 140.800000 16.658333
[25,] 490.200000 140.800000
[26,] 955.400000 490.200000
[27,] -73.400000 955.400000
[28,] 223.600000 -73.400000
[29,] 87.600000 223.600000
[30,] -588.400000 87.600000
[31,] -343.800000 -588.400000
[32,] -249.400000 -343.800000
[33,] -44.800000 -249.400000
[34,] -279.400000 -44.800000
[35,] 58.000000 -279.400000
[36,] -84.858333 58.000000
[37,] -232.458333 -84.858333
[38,] 133.741667 -232.458333
[39,] -113.058333 133.741667
[40,] 81.941667 -113.058333
[41,] 153.941667 81.941667
[42,] 1004.941667 153.941667
[43,] -39.458333 1004.941667
[44,] 29.941667 -39.458333
[45,] -212.458333 29.941667
[46,] -227.058333 -212.458333
[47,] -497.658333 -227.058333
[48,] -195.516667 -497.658333
[49,] 410.883333 -195.516667
[50,] -205.916667 410.883333
[51,] 154.283333 -205.916667
[52,] -69.716667 154.283333
[53,] -36.716667 -69.716667
[54,] -161.716667 -36.716667
[55,] -38.116667 -161.716667
[56,] 110.283333 -38.116667
[57,] 201.883333 110.283333
[58,] 687.283333 201.883333
[59,] -476.316667 687.283333
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -224.483333 -207.883333
2 -216.283333 -224.483333
3 352.916667 -216.283333
4 12.916667 352.916667
5 -3.083333 12.916667
6 -50.083333 -3.083333
7 549.516667 -50.083333
8 242.916667 549.516667
9 94.516667 242.916667
10 62.916667 94.516667
11 899.316667 62.916667
12 347.458333 899.316667
13 -444.141667 347.458333
14 -666.941667 -444.141667
15 -320.741667 -666.941667
16 -248.741667 -320.741667
17 -201.741667 -248.741667
18 -204.741667 -201.741667
19 -128.141667 -204.741667
20 -133.741667 -128.141667
21 -39.141667 -133.741667
22 -243.741667 -39.141667
23 16.658333 -243.741667
24 140.800000 16.658333
25 490.200000 140.800000
26 955.400000 490.200000
27 -73.400000 955.400000
28 223.600000 -73.400000
29 87.600000 223.600000
30 -588.400000 87.600000
31 -343.800000 -588.400000
32 -249.400000 -343.800000
33 -44.800000 -249.400000
34 -279.400000 -44.800000
35 58.000000 -279.400000
36 -84.858333 58.000000
37 -232.458333 -84.858333
38 133.741667 -232.458333
39 -113.058333 133.741667
40 81.941667 -113.058333
41 153.941667 81.941667
42 1004.941667 153.941667
43 -39.458333 1004.941667
44 29.941667 -39.458333
45 -212.458333 29.941667
46 -227.058333 -212.458333
47 -497.658333 -227.058333
48 -195.516667 -497.658333
49 410.883333 -195.516667
50 -205.916667 410.883333
51 154.283333 -205.916667
52 -69.716667 154.283333
53 -36.716667 -69.716667
54 -161.716667 -36.716667
55 -38.116667 -161.716667
56 110.283333 -38.116667
57 201.883333 110.283333
58 687.283333 201.883333
59 -476.316667 687.283333
> 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/freestat/rcomp/tmp/79ksm1291719058.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/89ksm1291719058.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/9kbs71291719058.ps",horizontal=F,onefile=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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/106uqd1291719058.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/freestat/rcomp/tmp/11y37g1291719058.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/freestat/rcomp/tmp/12n44s1291719058.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/freestat/rcomp/tmp/1395lg1291719058.tab")
>
> try(system("convert tmp/1daue1291719058.ps tmp/1daue1291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/2o2uh1291719058.ps tmp/2o2uh1291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/3o2uh1291719058.ps tmp/3o2uh1291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/4o2uh1291719058.ps tmp/4o2uh1291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/5hbb21291719058.ps tmp/5hbb21291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/6hbb21291719058.ps tmp/6hbb21291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/79ksm1291719058.ps tmp/79ksm1291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/89ksm1291719058.ps tmp/89ksm1291719058.png",intern=TRUE))
character(0)
> try(system("convert tmp/9kbs71291719058.ps tmp/9kbs71291719058.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.035 2.200 3.316