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.
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(107.1,0,110.7,0,117.1,0,118.7,0,126.5,0,127.5,0,134.6,0,131.8,0,135.9,0,142.7,0,141.7,0,153.4,0,145.0,0,137.7,0,148.3,0,152.2,0,169.4,0,168.6,0,161.1,0,174.1,0,179.0,0,190.6,0,190.0,0,181.6,0,174.8,0,180.5,1,196.8,1,193.8,1,197.0,1,216.3,1,221.4,1,217.9,1,229.7,1,227.4,1,204.2,1,196.6,1,198.8,1,207.5,1,190.7,1,201.6,1,210.5,1,223.5,1,223.8,1,231.2,1,244.0,1,234.7,1,250.2,1,265.7,1,287.6,1,283.3,1,295.4,1,312.3,1,333.8,1,347.7,1,383.2,1,407.1,1,413.6,1,362.7,1,321.9,1,239.4,1),dim=c(2,60),dimnames=list(c('PIC_grondstoffen','Dummy'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('PIC_grondstoffen','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
PIC_grondstoffen Dummy M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 107.1 0 1 0 0 0 0 0 0 0 0 0 0 1
2 110.7 0 0 1 0 0 0 0 0 0 0 0 0 2
3 117.1 0 0 0 1 0 0 0 0 0 0 0 0 3
4 118.7 0 0 0 0 1 0 0 0 0 0 0 0 4
5 126.5 0 0 0 0 0 1 0 0 0 0 0 0 5
6 127.5 0 0 0 0 0 0 1 0 0 0 0 0 6
7 134.6 0 0 0 0 0 0 0 1 0 0 0 0 7
8 131.8 0 0 0 0 0 0 0 0 1 0 0 0 8
9 135.9 0 0 0 0 0 0 0 0 0 1 0 0 9
10 142.7 0 0 0 0 0 0 0 0 0 0 1 0 10
11 141.7 0 0 0 0 0 0 0 0 0 0 0 1 11
12 153.4 0 0 0 0 0 0 0 0 0 0 0 0 12
13 145.0 0 1 0 0 0 0 0 0 0 0 0 0 13
14 137.7 0 0 1 0 0 0 0 0 0 0 0 0 14
15 148.3 0 0 0 1 0 0 0 0 0 0 0 0 15
16 152.2 0 0 0 0 1 0 0 0 0 0 0 0 16
17 169.4 0 0 0 0 0 1 0 0 0 0 0 0 17
18 168.6 0 0 0 0 0 0 1 0 0 0 0 0 18
19 161.1 0 0 0 0 0 0 0 1 0 0 0 0 19
20 174.1 0 0 0 0 0 0 0 0 1 0 0 0 20
21 179.0 0 0 0 0 0 0 0 0 0 1 0 0 21
22 190.6 0 0 0 0 0 0 0 0 0 0 1 0 22
23 190.0 0 0 0 0 0 0 0 0 0 0 0 1 23
24 181.6 0 0 0 0 0 0 0 0 0 0 0 0 24
25 174.8 0 1 0 0 0 0 0 0 0 0 0 0 25
26 180.5 1 0 1 0 0 0 0 0 0 0 0 0 26
27 196.8 1 0 0 1 0 0 0 0 0 0 0 0 27
28 193.8 1 0 0 0 1 0 0 0 0 0 0 0 28
29 197.0 1 0 0 0 0 1 0 0 0 0 0 0 29
30 216.3 1 0 0 0 0 0 1 0 0 0 0 0 30
31 221.4 1 0 0 0 0 0 0 1 0 0 0 0 31
32 217.9 1 0 0 0 0 0 0 0 1 0 0 0 32
33 229.7 1 0 0 0 0 0 0 0 0 1 0 0 33
34 227.4 1 0 0 0 0 0 0 0 0 0 1 0 34
35 204.2 1 0 0 0 0 0 0 0 0 0 0 1 35
36 196.6 1 0 0 0 0 0 0 0 0 0 0 0 36
37 198.8 1 1 0 0 0 0 0 0 0 0 0 0 37
38 207.5 1 0 1 0 0 0 0 0 0 0 0 0 38
39 190.7 1 0 0 1 0 0 0 0 0 0 0 0 39
40 201.6 1 0 0 0 1 0 0 0 0 0 0 0 40
41 210.5 1 0 0 0 0 1 0 0 0 0 0 0 41
42 223.5 1 0 0 0 0 0 1 0 0 0 0 0 42
43 223.8 1 0 0 0 0 0 0 1 0 0 0 0 43
44 231.2 1 0 0 0 0 0 0 0 1 0 0 0 44
45 244.0 1 0 0 0 0 0 0 0 0 1 0 0 45
46 234.7 1 0 0 0 0 0 0 0 0 0 1 0 46
47 250.2 1 0 0 0 0 0 0 0 0 0 0 1 47
48 265.7 1 0 0 0 0 0 0 0 0 0 0 0 48
49 287.6 1 1 0 0 0 0 0 0 0 0 0 0 49
50 283.3 1 0 1 0 0 0 0 0 0 0 0 0 50
51 295.4 1 0 0 1 0 0 0 0 0 0 0 0 51
52 312.3 1 0 0 0 1 0 0 0 0 0 0 0 52
53 333.8 1 0 0 0 0 1 0 0 0 0 0 0 53
54 347.7 1 0 0 0 0 0 1 0 0 0 0 0 54
55 383.2 1 0 0 0 0 0 0 1 0 0 0 0 55
56 407.1 1 0 0 0 0 0 0 0 1 0 0 0 56
57 413.6 1 0 0 0 0 0 0 0 0 1 0 0 57
58 362.7 1 0 0 0 0 0 0 0 0 0 1 0 58
59 321.9 1 0 0 0 0 0 0 0 0 0 0 1 59
60 239.4 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
56.690 -38.400 20.712 24.847 25.743 26.978
M5 M6 M7 M8 M9 M10
33.873 38.328 41.604 44.379 47.574 33.929
M11 t
19.085 4.825
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-68.373 -15.132 3.395 13.815 74.247
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 56.6900 16.9536 3.344 0.00165 **
Dummy -38.4000 16.3136 -2.354 0.02291 *
M1 20.7119 19.7849 1.047 0.30063
M2 24.8472 20.1349 1.234 0.22346
M3 25.7425 20.0299 1.285 0.20516
M4 26.9778 19.9356 1.353 0.18259
M5 33.8731 19.8520 1.706 0.09470 .
M6 38.3283 19.7792 1.938 0.05880 .
M7 41.6036 19.7175 2.110 0.04033 *
M8 44.3789 19.6668 2.257 0.02883 *
M9 47.5742 19.6273 2.424 0.01935 *
M10 33.9294 19.5990 1.731 0.09012 .
M11 19.0847 19.5820 0.975 0.33485
t 4.8247 0.4709 10.245 1.87e-13 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 30.95 on 46 degrees of freedom
Multiple R-squared: 0.8661, Adjusted R-squared: 0.8283
F-statistic: 22.89 on 13 and 46 DF, p-value: 8.499e-16
> postscript(file="/var/www/html/freestat/rcomp/tmp/17drf1227789804.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/freestat/rcomp/tmp/2hmcw1227789804.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/freestat/rcomp/tmp/3t01l1227789804.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/freestat/rcomp/tmp/406kh1227789804.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/freestat/rcomp/tmp/502nk1227789804.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
24.8733333 19.5133333 20.1933333 15.7333333 11.8133333 3.5333333
7 8 9 10 11 12
2.5333333 -7.8666667 -11.7866667 3.8333333 12.8533333 38.8133333
13 14 15 16 17 18
4.8766667 -11.3833333 -6.5033333 -8.6633333 -3.1833333 -13.2633333
19 20 21 22 23 24
-28.8633333 -23.4633333 -26.5833333 -6.1633333 3.2566667 9.1166667
25 26 27 28 29 30
-23.2200000 11.9200000 22.5000000 13.4400000 4.9200000 14.9400000
31 32 33 34 35 36
11.9400000 0.8400000 4.6200000 11.1400000 -2.0400000 4.6200000
37 38 39 40 41 42
-18.7166667 -18.9766667 -41.4966667 -36.6566667 -39.4766667 -35.7566667
43 44 45 46 47 48
-43.5566667 -43.7566667 -38.9766667 -39.4566667 -13.9366667 15.8233333
49 50 51 52 53 54
12.1866667 -1.0733333 5.3066667 16.1466667 25.9266667 30.5466667
55 56 57 58 59 60
57.9466667 74.2466667 72.7266667 30.6466667 -0.1333333 -68.3733333
> postscript(file="/var/www/html/freestat/rcomp/tmp/6y63l1227789804.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 24.8733333 NA
1 19.5133333 24.8733333
2 20.1933333 19.5133333
3 15.7333333 20.1933333
4 11.8133333 15.7333333
5 3.5333333 11.8133333
6 2.5333333 3.5333333
7 -7.8666667 2.5333333
8 -11.7866667 -7.8666667
9 3.8333333 -11.7866667
10 12.8533333 3.8333333
11 38.8133333 12.8533333
12 4.8766667 38.8133333
13 -11.3833333 4.8766667
14 -6.5033333 -11.3833333
15 -8.6633333 -6.5033333
16 -3.1833333 -8.6633333
17 -13.2633333 -3.1833333
18 -28.8633333 -13.2633333
19 -23.4633333 -28.8633333
20 -26.5833333 -23.4633333
21 -6.1633333 -26.5833333
22 3.2566667 -6.1633333
23 9.1166667 3.2566667
24 -23.2200000 9.1166667
25 11.9200000 -23.2200000
26 22.5000000 11.9200000
27 13.4400000 22.5000000
28 4.9200000 13.4400000
29 14.9400000 4.9200000
30 11.9400000 14.9400000
31 0.8400000 11.9400000
32 4.6200000 0.8400000
33 11.1400000 4.6200000
34 -2.0400000 11.1400000
35 4.6200000 -2.0400000
36 -18.7166667 4.6200000
37 -18.9766667 -18.7166667
38 -41.4966667 -18.9766667
39 -36.6566667 -41.4966667
40 -39.4766667 -36.6566667
41 -35.7566667 -39.4766667
42 -43.5566667 -35.7566667
43 -43.7566667 -43.5566667
44 -38.9766667 -43.7566667
45 -39.4566667 -38.9766667
46 -13.9366667 -39.4566667
47 15.8233333 -13.9366667
48 12.1866667 15.8233333
49 -1.0733333 12.1866667
50 5.3066667 -1.0733333
51 16.1466667 5.3066667
52 25.9266667 16.1466667
53 30.5466667 25.9266667
54 57.9466667 30.5466667
55 74.2466667 57.9466667
56 72.7266667 74.2466667
57 30.6466667 72.7266667
58 -0.1333333 30.6466667
59 -68.3733333 -0.1333333
60 NA -68.3733333
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 19.5133333 24.8733333
[2,] 20.1933333 19.5133333
[3,] 15.7333333 20.1933333
[4,] 11.8133333 15.7333333
[5,] 3.5333333 11.8133333
[6,] 2.5333333 3.5333333
[7,] -7.8666667 2.5333333
[8,] -11.7866667 -7.8666667
[9,] 3.8333333 -11.7866667
[10,] 12.8533333 3.8333333
[11,] 38.8133333 12.8533333
[12,] 4.8766667 38.8133333
[13,] -11.3833333 4.8766667
[14,] -6.5033333 -11.3833333
[15,] -8.6633333 -6.5033333
[16,] -3.1833333 -8.6633333
[17,] -13.2633333 -3.1833333
[18,] -28.8633333 -13.2633333
[19,] -23.4633333 -28.8633333
[20,] -26.5833333 -23.4633333
[21,] -6.1633333 -26.5833333
[22,] 3.2566667 -6.1633333
[23,] 9.1166667 3.2566667
[24,] -23.2200000 9.1166667
[25,] 11.9200000 -23.2200000
[26,] 22.5000000 11.9200000
[27,] 13.4400000 22.5000000
[28,] 4.9200000 13.4400000
[29,] 14.9400000 4.9200000
[30,] 11.9400000 14.9400000
[31,] 0.8400000 11.9400000
[32,] 4.6200000 0.8400000
[33,] 11.1400000 4.6200000
[34,] -2.0400000 11.1400000
[35,] 4.6200000 -2.0400000
[36,] -18.7166667 4.6200000
[37,] -18.9766667 -18.7166667
[38,] -41.4966667 -18.9766667
[39,] -36.6566667 -41.4966667
[40,] -39.4766667 -36.6566667
[41,] -35.7566667 -39.4766667
[42,] -43.5566667 -35.7566667
[43,] -43.7566667 -43.5566667
[44,] -38.9766667 -43.7566667
[45,] -39.4566667 -38.9766667
[46,] -13.9366667 -39.4566667
[47,] 15.8233333 -13.9366667
[48,] 12.1866667 15.8233333
[49,] -1.0733333 12.1866667
[50,] 5.3066667 -1.0733333
[51,] 16.1466667 5.3066667
[52,] 25.9266667 16.1466667
[53,] 30.5466667 25.9266667
[54,] 57.9466667 30.5466667
[55,] 74.2466667 57.9466667
[56,] 72.7266667 74.2466667
[57,] 30.6466667 72.7266667
[58,] -0.1333333 30.6466667
[59,] -68.3733333 -0.1333333
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 19.5133333 24.8733333
2 20.1933333 19.5133333
3 15.7333333 20.1933333
4 11.8133333 15.7333333
5 3.5333333 11.8133333
6 2.5333333 3.5333333
7 -7.8666667 2.5333333
8 -11.7866667 -7.8666667
9 3.8333333 -11.7866667
10 12.8533333 3.8333333
11 38.8133333 12.8533333
12 4.8766667 38.8133333
13 -11.3833333 4.8766667
14 -6.5033333 -11.3833333
15 -8.6633333 -6.5033333
16 -3.1833333 -8.6633333
17 -13.2633333 -3.1833333
18 -28.8633333 -13.2633333
19 -23.4633333 -28.8633333
20 -26.5833333 -23.4633333
21 -6.1633333 -26.5833333
22 3.2566667 -6.1633333
23 9.1166667 3.2566667
24 -23.2200000 9.1166667
25 11.9200000 -23.2200000
26 22.5000000 11.9200000
27 13.4400000 22.5000000
28 4.9200000 13.4400000
29 14.9400000 4.9200000
30 11.9400000 14.9400000
31 0.8400000 11.9400000
32 4.6200000 0.8400000
33 11.1400000 4.6200000
34 -2.0400000 11.1400000
35 4.6200000 -2.0400000
36 -18.7166667 4.6200000
37 -18.9766667 -18.7166667
38 -41.4966667 -18.9766667
39 -36.6566667 -41.4966667
40 -39.4766667 -36.6566667
41 -35.7566667 -39.4766667
42 -43.5566667 -35.7566667
43 -43.7566667 -43.5566667
44 -38.9766667 -43.7566667
45 -39.4566667 -38.9766667
46 -13.9366667 -39.4566667
47 15.8233333 -13.9366667
48 12.1866667 15.8233333
49 -1.0733333 12.1866667
50 5.3066667 -1.0733333
51 16.1466667 5.3066667
52 25.9266667 16.1466667
53 30.5466667 25.9266667
54 57.9466667 30.5466667
55 74.2466667 57.9466667
56 72.7266667 74.2466667
57 30.6466667 72.7266667
58 -0.1333333 30.6466667
59 -68.3733333 -0.1333333
> 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/7g9e91227789804.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/freestat/rcomp/tmp/86g621227789804.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/freestat/rcomp/tmp/9hih51227789804.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
>
> #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/10paa41227789804.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/11abbt1227789804.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/12nkq31227789804.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/13pj1c1227789804.tab")
>
> system("convert tmp/17drf1227789804.ps tmp/17drf1227789804.png")
> system("convert tmp/2hmcw1227789804.ps tmp/2hmcw1227789804.png")
> system("convert tmp/3t01l1227789804.ps tmp/3t01l1227789804.png")
> system("convert tmp/406kh1227789804.ps tmp/406kh1227789804.png")
> system("convert tmp/502nk1227789804.ps tmp/502nk1227789804.png")
> system("convert tmp/6y63l1227789804.ps tmp/6y63l1227789804.png")
> system("convert tmp/7g9e91227789804.ps tmp/7g9e91227789804.png")
> system("convert tmp/86g621227789804.ps tmp/86g621227789804.png")
> system("convert tmp/9hih51227789804.ps tmp/9hih51227789804.png")
>
>
> proc.time()
user system elapsed
2.994 2.272 3.333