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(3926,0,3517,0,4142,0,4353,0,5029,0,4755,0,3862,0,4406,0,4567,0,4863,0,4121,0,3626,0,3804,0,3491,0,4151,0,4254,0,4717,0,4866,0,4001,0,3758,0,4780,0,5016,0,4296,0,4467,0,3891,1,3872,1,3867,1,3973,1,4640,1,4538,1,3836,1,3770,1,4374,1,4497,1,3945,1,3862,1,3608,1,3301,1,3882,1,3605,1,4305,1,4216,1,3971,1,3988,1,4317,1,4484,1,4247,1,3520,1,3687,1,3405,1,3990,1,4047,1,4549,1,4559,1,3926,1,4206,1,4517,1,4387,1,3219,1,3129,1),dim=c(2,60),dimnames=list(c('Verkeersongevallen','Dummy'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Verkeersongevallen','Dummy'),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
Verkeersongevallen Dummy M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 3926 0 1 0 0 0 0 0 0 0 0 0 0 1
2 3517 0 0 1 0 0 0 0 0 0 0 0 0 2
3 4142 0 0 0 1 0 0 0 0 0 0 0 0 3
4 4353 0 0 0 0 1 0 0 0 0 0 0 0 4
5 5029 0 0 0 0 0 1 0 0 0 0 0 0 5
6 4755 0 0 0 0 0 0 1 0 0 0 0 0 6
7 3862 0 0 0 0 0 0 0 1 0 0 0 0 7
8 4406 0 0 0 0 0 0 0 0 1 0 0 0 8
9 4567 0 0 0 0 0 0 0 0 0 1 0 0 9
10 4863 0 0 0 0 0 0 0 0 0 0 1 0 10
11 4121 0 0 0 0 0 0 0 0 0 0 0 1 11
12 3626 0 0 0 0 0 0 0 0 0 0 0 0 12
13 3804 0 1 0 0 0 0 0 0 0 0 0 0 13
14 3491 0 0 1 0 0 0 0 0 0 0 0 0 14
15 4151 0 0 0 1 0 0 0 0 0 0 0 0 15
16 4254 0 0 0 0 1 0 0 0 0 0 0 0 16
17 4717 0 0 0 0 0 1 0 0 0 0 0 0 17
18 4866 0 0 0 0 0 0 1 0 0 0 0 0 18
19 4001 0 0 0 0 0 0 0 1 0 0 0 0 19
20 3758 0 0 0 0 0 0 0 0 1 0 0 0 20
21 4780 0 0 0 0 0 0 0 0 0 1 0 0 21
22 5016 0 0 0 0 0 0 0 0 0 0 1 0 22
23 4296 0 0 0 0 0 0 0 0 0 0 0 1 23
24 4467 0 0 0 0 0 0 0 0 0 0 0 0 24
25 3891 1 1 0 0 0 0 0 0 0 0 0 0 25
26 3872 1 0 1 0 0 0 0 0 0 0 0 0 26
27 3867 1 0 0 1 0 0 0 0 0 0 0 0 27
28 3973 1 0 0 0 1 0 0 0 0 0 0 0 28
29 4640 1 0 0 0 0 1 0 0 0 0 0 0 29
30 4538 1 0 0 0 0 0 1 0 0 0 0 0 30
31 3836 1 0 0 0 0 0 0 1 0 0 0 0 31
32 3770 1 0 0 0 0 0 0 0 1 0 0 0 32
33 4374 1 0 0 0 0 0 0 0 0 1 0 0 33
34 4497 1 0 0 0 0 0 0 0 0 0 1 0 34
35 3945 1 0 0 0 0 0 0 0 0 0 0 1 35
36 3862 1 0 0 0 0 0 0 0 0 0 0 0 36
37 3608 1 1 0 0 0 0 0 0 0 0 0 0 37
38 3301 1 0 1 0 0 0 0 0 0 0 0 0 38
39 3882 1 0 0 1 0 0 0 0 0 0 0 0 39
40 3605 1 0 0 0 1 0 0 0 0 0 0 0 40
41 4305 1 0 0 0 0 1 0 0 0 0 0 0 41
42 4216 1 0 0 0 0 0 1 0 0 0 0 0 42
43 3971 1 0 0 0 0 0 0 1 0 0 0 0 43
44 3988 1 0 0 0 0 0 0 0 1 0 0 0 44
45 4317 1 0 0 0 0 0 0 0 0 1 0 0 45
46 4484 1 0 0 0 0 0 0 0 0 0 1 0 46
47 4247 1 0 0 0 0 0 0 0 0 0 0 1 47
48 3520 1 0 0 0 0 0 0 0 0 0 0 0 48
49 3687 1 1 0 0 0 0 0 0 0 0 0 0 49
50 3405 1 0 1 0 0 0 0 0 0 0 0 0 50
51 3990 1 0 0 1 0 0 0 0 0 0 0 0 51
52 4047 1 0 0 0 1 0 0 0 0 0 0 0 52
53 4549 1 0 0 0 0 1 0 0 0 0 0 0 53
54 4559 1 0 0 0 0 0 1 0 0 0 0 0 54
55 3926 1 0 0 0 0 0 0 1 0 0 0 0 55
56 4206 1 0 0 0 0 0 0 0 1 0 0 0 56
57 4517 1 0 0 0 0 0 0 0 0 1 0 0 57
58 4387 1 0 0 0 0 0 0 0 0 0 1 0 58
59 3219 1 0 0 0 0 0 0 0 0 0 0 1 59
60 3129 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) Dummy M1 M2 M3 M4
3949.183 -176.139 24.908 -237.683 254.925 298.333
M5 M6 M7 M8 M9 M10
903.342 845.550 181.358 291.167 779.975 921.783
M11 t
241.392 -3.408
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-594.344 -93.294 -7.844 133.426 599.617
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3949.183 128.743 30.675 < 2e-16 ***
Dummy -176.139 123.883 -1.422 0.1618
M1 24.908 153.776 0.162 0.8720
M2 -237.683 152.901 -1.554 0.1269
M3 254.925 152.104 1.676 0.1005
M4 298.333 151.388 1.971 0.0548 .
M5 903.342 150.753 5.992 2.97e-07 ***
M6 845.550 150.200 5.629 1.04e-06 ***
M7 181.358 149.731 1.211 0.2320
M8 291.167 149.346 1.950 0.0573 .
M9 779.975 149.046 5.233 4.00e-06 ***
M10 921.783 148.832 6.193 1.48e-07 ***
M11 241.392 148.703 1.623 0.1114
t -3.408 3.576 -0.953 0.3455
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 235.1 on 46 degrees of freedom
Multiple R-Squared: 0.7881, Adjusted R-squared: 0.7282
F-statistic: 13.16 on 13 and 46 DF, p-value: 2.003e-11
> postscript(file="/var/www/html/rcomp/tmp/1x9gj1197625555.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/2qxer1197625555.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/3s4ky1197625555.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/4yy8r1197625555.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/59hp41197625555.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
-44.683333 -187.683333 -51.883333 119.116667 193.516667 -19.283333
7 8 9 10 11 12
-244.683333 192.916667 -131.483333 26.116667 -32.083333 -282.283333
13 14 15 16 17 18
-125.783333 -172.783333 -1.983333 61.016667 -77.583333 132.616667
19 20 21 22 23 24
-64.783333 -414.183333 122.416667 220.016667 183.816667 599.616667
25 26 27 28 29 30
178.255556 425.255556 -68.944444 -2.944444 62.455556 21.655556
31 32 33 34 35 36
-12.744444 -185.144444 -66.544444 -81.944444 49.855556 211.655556
37 38 39 40 41 42
-63.844444 -104.844444 -13.044444 -330.044444 -231.644444 -259.444444
43 44 45 46 47 48
163.155556 73.755556 -82.644444 -54.044444 392.755556 -89.444444
49 50 51 52 53 54
56.055556 40.055556 135.855556 152.855556 53.255556 124.455556
55 56 57 58 59 60
159.055556 332.655556 158.255556 -110.144444 -594.344444 -439.544444
> postscript(file="/var/www/html/rcomp/tmp/69n7e1197625555.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 -44.683333 NA
1 -187.683333 -44.683333
2 -51.883333 -187.683333
3 119.116667 -51.883333
4 193.516667 119.116667
5 -19.283333 193.516667
6 -244.683333 -19.283333
7 192.916667 -244.683333
8 -131.483333 192.916667
9 26.116667 -131.483333
10 -32.083333 26.116667
11 -282.283333 -32.083333
12 -125.783333 -282.283333
13 -172.783333 -125.783333
14 -1.983333 -172.783333
15 61.016667 -1.983333
16 -77.583333 61.016667
17 132.616667 -77.583333
18 -64.783333 132.616667
19 -414.183333 -64.783333
20 122.416667 -414.183333
21 220.016667 122.416667
22 183.816667 220.016667
23 599.616667 183.816667
24 178.255556 599.616667
25 425.255556 178.255556
26 -68.944444 425.255556
27 -2.944444 -68.944444
28 62.455556 -2.944444
29 21.655556 62.455556
30 -12.744444 21.655556
31 -185.144444 -12.744444
32 -66.544444 -185.144444
33 -81.944444 -66.544444
34 49.855556 -81.944444
35 211.655556 49.855556
36 -63.844444 211.655556
37 -104.844444 -63.844444
38 -13.044444 -104.844444
39 -330.044444 -13.044444
40 -231.644444 -330.044444
41 -259.444444 -231.644444
42 163.155556 -259.444444
43 73.755556 163.155556
44 -82.644444 73.755556
45 -54.044444 -82.644444
46 392.755556 -54.044444
47 -89.444444 392.755556
48 56.055556 -89.444444
49 40.055556 56.055556
50 135.855556 40.055556
51 152.855556 135.855556
52 53.255556 152.855556
53 124.455556 53.255556
54 159.055556 124.455556
55 332.655556 159.055556
56 158.255556 332.655556
57 -110.144444 158.255556
58 -594.344444 -110.144444
59 -439.544444 -594.344444
60 NA -439.544444
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -187.683333 -44.683333
[2,] -51.883333 -187.683333
[3,] 119.116667 -51.883333
[4,] 193.516667 119.116667
[5,] -19.283333 193.516667
[6,] -244.683333 -19.283333
[7,] 192.916667 -244.683333
[8,] -131.483333 192.916667
[9,] 26.116667 -131.483333
[10,] -32.083333 26.116667
[11,] -282.283333 -32.083333
[12,] -125.783333 -282.283333
[13,] -172.783333 -125.783333
[14,] -1.983333 -172.783333
[15,] 61.016667 -1.983333
[16,] -77.583333 61.016667
[17,] 132.616667 -77.583333
[18,] -64.783333 132.616667
[19,] -414.183333 -64.783333
[20,] 122.416667 -414.183333
[21,] 220.016667 122.416667
[22,] 183.816667 220.016667
[23,] 599.616667 183.816667
[24,] 178.255556 599.616667
[25,] 425.255556 178.255556
[26,] -68.944444 425.255556
[27,] -2.944444 -68.944444
[28,] 62.455556 -2.944444
[29,] 21.655556 62.455556
[30,] -12.744444 21.655556
[31,] -185.144444 -12.744444
[32,] -66.544444 -185.144444
[33,] -81.944444 -66.544444
[34,] 49.855556 -81.944444
[35,] 211.655556 49.855556
[36,] -63.844444 211.655556
[37,] -104.844444 -63.844444
[38,] -13.044444 -104.844444
[39,] -330.044444 -13.044444
[40,] -231.644444 -330.044444
[41,] -259.444444 -231.644444
[42,] 163.155556 -259.444444
[43,] 73.755556 163.155556
[44,] -82.644444 73.755556
[45,] -54.044444 -82.644444
[46,] 392.755556 -54.044444
[47,] -89.444444 392.755556
[48,] 56.055556 -89.444444
[49,] 40.055556 56.055556
[50,] 135.855556 40.055556
[51,] 152.855556 135.855556
[52,] 53.255556 152.855556
[53,] 124.455556 53.255556
[54,] 159.055556 124.455556
[55,] 332.655556 159.055556
[56,] 158.255556 332.655556
[57,] -110.144444 158.255556
[58,] -594.344444 -110.144444
[59,] -439.544444 -594.344444
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -187.683333 -44.683333
2 -51.883333 -187.683333
3 119.116667 -51.883333
4 193.516667 119.116667
5 -19.283333 193.516667
6 -244.683333 -19.283333
7 192.916667 -244.683333
8 -131.483333 192.916667
9 26.116667 -131.483333
10 -32.083333 26.116667
11 -282.283333 -32.083333
12 -125.783333 -282.283333
13 -172.783333 -125.783333
14 -1.983333 -172.783333
15 61.016667 -1.983333
16 -77.583333 61.016667
17 132.616667 -77.583333
18 -64.783333 132.616667
19 -414.183333 -64.783333
20 122.416667 -414.183333
21 220.016667 122.416667
22 183.816667 220.016667
23 599.616667 183.816667
24 178.255556 599.616667
25 425.255556 178.255556
26 -68.944444 425.255556
27 -2.944444 -68.944444
28 62.455556 -2.944444
29 21.655556 62.455556
30 -12.744444 21.655556
31 -185.144444 -12.744444
32 -66.544444 -185.144444
33 -81.944444 -66.544444
34 49.855556 -81.944444
35 211.655556 49.855556
36 -63.844444 211.655556
37 -104.844444 -63.844444
38 -13.044444 -104.844444
39 -330.044444 -13.044444
40 -231.644444 -330.044444
41 -259.444444 -231.644444
42 163.155556 -259.444444
43 73.755556 163.155556
44 -82.644444 73.755556
45 -54.044444 -82.644444
46 392.755556 -54.044444
47 -89.444444 392.755556
48 56.055556 -89.444444
49 40.055556 56.055556
50 135.855556 40.055556
51 152.855556 135.855556
52 53.255556 152.855556
53 124.455556 53.255556
54 159.055556 124.455556
55 332.655556 159.055556
56 158.255556 332.655556
57 -110.144444 158.255556
58 -594.344444 -110.144444
59 -439.544444 -594.344444
> 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/7vuky1197625555.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/83qpy1197625555.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/9zp5r1197625555.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/10ct5q1197625555.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/1105py1197625555.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/129ocg1197625555.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/13qzqp1197625555.tab")
>
> system("convert tmp/1x9gj1197625555.ps tmp/1x9gj1197625555.png")
> system("convert tmp/2qxer1197625555.ps tmp/2qxer1197625555.png")
> system("convert tmp/3s4ky1197625555.ps tmp/3s4ky1197625555.png")
> system("convert tmp/4yy8r1197625555.ps tmp/4yy8r1197625555.png")
> system("convert tmp/59hp41197625555.ps tmp/59hp41197625555.png")
> system("convert tmp/69n7e1197625555.ps tmp/69n7e1197625555.png")
> system("convert tmp/7vuky1197625555.ps tmp/7vuky1197625555.png")
> system("convert tmp/83qpy1197625555.ps tmp/83qpy1197625555.png")
> system("convert tmp/9zp5r1197625555.ps tmp/9zp5r1197625555.png")
>
>
> proc.time()
user system elapsed
2.237 1.435 2.794