R version 2.6.1 (2007-11-26)
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(112.61,0,113.4,0,115.18,0,121.01,0,119.44,0,116.68,0,117.07,0,117.41,0,119.58,0,120.92,0,117.09,0,116.77,0,119.39,0,122.49,0,124.08,1,118.29,1,112.94,1,113.79,1,114.43,1,118.7,1,120.36,1,118.27,1,118.34,1,117.82,1,117.65,1,118.18,1,121.02,1,124.78,1,131.16,1,130.14,1,131.75,1,134.73,1,135.35,1,140.32,1,136.35,1,131.6,1,128.9,1,133.89,1,138.25,1,146.23,1,144.76,1,149.3,1,156.8,1,159.08,1,165.12,1,163.14,1,153.43,1,151.01,1,154.72,1,154.58,1,155.63,1,161.67,1,163.51,1,162.91,1,164.80,1,164.98,1,154.54,1,148.60,1,149.19,1,150.61,1),dim=c(2,60),dimnames=list(c('indexcijfers','Irak'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('indexcijfers','Irak'),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
indexcijfers Irak M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 112.61 0 1 0 0 0 0 0 0 0 0 0 0 1
2 113.40 0 0 1 0 0 0 0 0 0 0 0 0 2
3 115.18 0 0 0 1 0 0 0 0 0 0 0 0 3
4 121.01 0 0 0 0 1 0 0 0 0 0 0 0 4
5 119.44 0 0 0 0 0 1 0 0 0 0 0 0 5
6 116.68 0 0 0 0 0 0 1 0 0 0 0 0 6
7 117.07 0 0 0 0 0 0 0 1 0 0 0 0 7
8 117.41 0 0 0 0 0 0 0 0 1 0 0 0 8
9 119.58 0 0 0 0 0 0 0 0 0 1 0 0 9
10 120.92 0 0 0 0 0 0 0 0 0 0 1 0 10
11 117.09 0 0 0 0 0 0 0 0 0 0 0 1 11
12 116.77 0 0 0 0 0 0 0 0 0 0 0 0 12
13 119.39 0 1 0 0 0 0 0 0 0 0 0 0 13
14 122.49 0 0 1 0 0 0 0 0 0 0 0 0 14
15 124.08 1 0 0 1 0 0 0 0 0 0 0 0 15
16 118.29 1 0 0 0 1 0 0 0 0 0 0 0 16
17 112.94 1 0 0 0 0 1 0 0 0 0 0 0 17
18 113.79 1 0 0 0 0 0 1 0 0 0 0 0 18
19 114.43 1 0 0 0 0 0 0 1 0 0 0 0 19
20 118.70 1 0 0 0 0 0 0 0 1 0 0 0 20
21 120.36 1 0 0 0 0 0 0 0 0 1 0 0 21
22 118.27 1 0 0 0 0 0 0 0 0 0 1 0 22
23 118.34 1 0 0 0 0 0 0 0 0 0 0 1 23
24 117.82 1 0 0 0 0 0 0 0 0 0 0 0 24
25 117.65 1 1 0 0 0 0 0 0 0 0 0 0 25
26 118.18 1 0 1 0 0 0 0 0 0 0 0 0 26
27 121.02 1 0 0 1 0 0 0 0 0 0 0 0 27
28 124.78 1 0 0 0 1 0 0 0 0 0 0 0 28
29 131.16 1 0 0 0 0 1 0 0 0 0 0 0 29
30 130.14 1 0 0 0 0 0 1 0 0 0 0 0 30
31 131.75 1 0 0 0 0 0 0 1 0 0 0 0 31
32 134.73 1 0 0 0 0 0 0 0 1 0 0 0 32
33 135.35 1 0 0 0 0 0 0 0 0 1 0 0 33
34 140.32 1 0 0 0 0 0 0 0 0 0 1 0 34
35 136.35 1 0 0 0 0 0 0 0 0 0 0 1 35
36 131.60 1 0 0 0 0 0 0 0 0 0 0 0 36
37 128.90 1 1 0 0 0 0 0 0 0 0 0 0 37
38 133.89 1 0 1 0 0 0 0 0 0 0 0 0 38
39 138.25 1 0 0 1 0 0 0 0 0 0 0 0 39
40 146.23 1 0 0 0 1 0 0 0 0 0 0 0 40
41 144.76 1 0 0 0 0 1 0 0 0 0 0 0 41
42 149.30 1 0 0 0 0 0 1 0 0 0 0 0 42
43 156.80 1 0 0 0 0 0 0 1 0 0 0 0 43
44 159.08 1 0 0 0 0 0 0 0 1 0 0 0 44
45 165.12 1 0 0 0 0 0 0 0 0 1 0 0 45
46 163.14 1 0 0 0 0 0 0 0 0 0 1 0 46
47 153.43 1 0 0 0 0 0 0 0 0 0 0 1 47
48 151.01 1 0 0 0 0 0 0 0 0 0 0 0 48
49 154.72 1 1 0 0 0 0 0 0 0 0 0 0 49
50 154.58 1 0 1 0 0 0 0 0 0 0 0 0 50
51 155.63 1 0 0 1 0 0 0 0 0 0 0 0 51
52 161.67 1 0 0 0 1 0 0 0 0 0 0 0 52
53 163.51 1 0 0 0 0 1 0 0 0 0 0 0 53
54 162.91 1 0 0 0 0 0 1 0 0 0 0 0 54
55 164.80 1 0 0 0 0 0 0 1 0 0 0 0 55
56 164.98 1 0 0 0 0 0 0 0 1 0 0 0 56
57 154.54 1 0 0 0 0 0 0 0 0 1 0 0 57
58 148.60 1 0 0 0 0 0 0 0 0 0 1 0 58
59 149.19 1 0 0 0 0 0 0 0 0 0 0 1 59
60 150.61 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) Irak M1 M2 M3 M4
102.583 -14.832 3.217 3.881 7.981 10.355
M5 M6 M7 M8 M9 M10
9.131 8.143 9.359 10.179 8.998 7.068
M11 t
2.508 1.190
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-15.247 -3.042 -0.634 3.339 14.815
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 102.58258 3.31138 30.979 < 2e-16 ***
Irak -14.83220 2.86774 -5.172 4.92e-06 ***
M1 3.21714 3.99435 0.805 0.4247
M2 3.88100 3.98877 0.973 0.3357
M3 7.98130 4.01014 1.990 0.0525 .
M4 10.35515 3.99964 2.589 0.0128 *
M5 9.13101 3.99035 2.288 0.0268 *
M6 8.14286 3.98228 2.045 0.0466 *
M7 9.35872 3.97543 2.354 0.0229 *
M8 10.17858 3.96983 2.564 0.0137 *
M9 8.99843 3.96546 2.269 0.0280 *
M10 7.06829 3.96234 1.784 0.0810 .
M11 2.50814 3.96047 0.633 0.5297
t 1.19014 0.07035 16.917 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 6.261 on 46 degrees of freedom
Multiple R-Squared: 0.9021, Adjusted R-squared: 0.8744
F-statistic: 32.59 on 13 and 46 DF, p-value: < 2.2e-16
> postscript(file="/var/www/html/rcomp/tmp/1bn721197637260.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/2q6x11197637260.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/38hlf1197637260.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/4ng371197637260.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/51jsk1197637260.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
5.6201329 4.5561329 1.0456923 3.3116923 1.7756923 -1.1863077
7 8 9 10 11 12
-3.2023077 -4.8723077 -2.7123077 -0.6323077 -1.0923077 -0.0943077
13 14 15 16 17 18
-1.8815944 -0.6355944 10.4961678 1.1421678 -4.1738322 -3.5258322
19 20 21 22 23 24
-5.2918322 -3.0318322 -1.3818322 -2.7318322 0.7081678 1.5061678
25 26 27 28 29 30
-3.0711189 -4.3951189 -6.8455594 -6.6495594 -0.2355594 -1.4575594
31 32 33 34 35 36
-2.2535594 -1.2835594 -0.6735594 5.0364406 4.4364406 1.0044406
37 38 39 40 41 42
-6.1028462 -2.9668462 -3.8972867 0.5187133 -0.9172867 3.4207133
43 44 45 46 47 48
8.5147133 8.7847133 14.8147133 13.5747133 7.2347133 6.1327133
49 50 51 52 53 54
5.4354266 3.4414266 -0.7990140 1.6769860 3.5509860 2.7489860
55 56 57 58 59 60
2.2329860 0.4029860 -10.0470140 -15.2470140 -11.2870140 -8.5490140
> postscript(file="/var/www/html/rcomp/tmp/6f2mp1197637260.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 5.6201329 NA
1 4.5561329 5.6201329
2 1.0456923 4.5561329
3 3.3116923 1.0456923
4 1.7756923 3.3116923
5 -1.1863077 1.7756923
6 -3.2023077 -1.1863077
7 -4.8723077 -3.2023077
8 -2.7123077 -4.8723077
9 -0.6323077 -2.7123077
10 -1.0923077 -0.6323077
11 -0.0943077 -1.0923077
12 -1.8815944 -0.0943077
13 -0.6355944 -1.8815944
14 10.4961678 -0.6355944
15 1.1421678 10.4961678
16 -4.1738322 1.1421678
17 -3.5258322 -4.1738322
18 -5.2918322 -3.5258322
19 -3.0318322 -5.2918322
20 -1.3818322 -3.0318322
21 -2.7318322 -1.3818322
22 0.7081678 -2.7318322
23 1.5061678 0.7081678
24 -3.0711189 1.5061678
25 -4.3951189 -3.0711189
26 -6.8455594 -4.3951189
27 -6.6495594 -6.8455594
28 -0.2355594 -6.6495594
29 -1.4575594 -0.2355594
30 -2.2535594 -1.4575594
31 -1.2835594 -2.2535594
32 -0.6735594 -1.2835594
33 5.0364406 -0.6735594
34 4.4364406 5.0364406
35 1.0044406 4.4364406
36 -6.1028462 1.0044406
37 -2.9668462 -6.1028462
38 -3.8972867 -2.9668462
39 0.5187133 -3.8972867
40 -0.9172867 0.5187133
41 3.4207133 -0.9172867
42 8.5147133 3.4207133
43 8.7847133 8.5147133
44 14.8147133 8.7847133
45 13.5747133 14.8147133
46 7.2347133 13.5747133
47 6.1327133 7.2347133
48 5.4354266 6.1327133
49 3.4414266 5.4354266
50 -0.7990140 3.4414266
51 1.6769860 -0.7990140
52 3.5509860 1.6769860
53 2.7489860 3.5509860
54 2.2329860 2.7489860
55 0.4029860 2.2329860
56 -10.0470140 0.4029860
57 -15.2470140 -10.0470140
58 -11.2870140 -15.2470140
59 -8.5490140 -11.2870140
60 NA -8.5490140
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 4.5561329 5.6201329
[2,] 1.0456923 4.5561329
[3,] 3.3116923 1.0456923
[4,] 1.7756923 3.3116923
[5,] -1.1863077 1.7756923
[6,] -3.2023077 -1.1863077
[7,] -4.8723077 -3.2023077
[8,] -2.7123077 -4.8723077
[9,] -0.6323077 -2.7123077
[10,] -1.0923077 -0.6323077
[11,] -0.0943077 -1.0923077
[12,] -1.8815944 -0.0943077
[13,] -0.6355944 -1.8815944
[14,] 10.4961678 -0.6355944
[15,] 1.1421678 10.4961678
[16,] -4.1738322 1.1421678
[17,] -3.5258322 -4.1738322
[18,] -5.2918322 -3.5258322
[19,] -3.0318322 -5.2918322
[20,] -1.3818322 -3.0318322
[21,] -2.7318322 -1.3818322
[22,] 0.7081678 -2.7318322
[23,] 1.5061678 0.7081678
[24,] -3.0711189 1.5061678
[25,] -4.3951189 -3.0711189
[26,] -6.8455594 -4.3951189
[27,] -6.6495594 -6.8455594
[28,] -0.2355594 -6.6495594
[29,] -1.4575594 -0.2355594
[30,] -2.2535594 -1.4575594
[31,] -1.2835594 -2.2535594
[32,] -0.6735594 -1.2835594
[33,] 5.0364406 -0.6735594
[34,] 4.4364406 5.0364406
[35,] 1.0044406 4.4364406
[36,] -6.1028462 1.0044406
[37,] -2.9668462 -6.1028462
[38,] -3.8972867 -2.9668462
[39,] 0.5187133 -3.8972867
[40,] -0.9172867 0.5187133
[41,] 3.4207133 -0.9172867
[42,] 8.5147133 3.4207133
[43,] 8.7847133 8.5147133
[44,] 14.8147133 8.7847133
[45,] 13.5747133 14.8147133
[46,] 7.2347133 13.5747133
[47,] 6.1327133 7.2347133
[48,] 5.4354266 6.1327133
[49,] 3.4414266 5.4354266
[50,] -0.7990140 3.4414266
[51,] 1.6769860 -0.7990140
[52,] 3.5509860 1.6769860
[53,] 2.7489860 3.5509860
[54,] 2.2329860 2.7489860
[55,] 0.4029860 2.2329860
[56,] -10.0470140 0.4029860
[57,] -15.2470140 -10.0470140
[58,] -11.2870140 -15.2470140
[59,] -8.5490140 -11.2870140
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 4.5561329 5.6201329
2 1.0456923 4.5561329
3 3.3116923 1.0456923
4 1.7756923 3.3116923
5 -1.1863077 1.7756923
6 -3.2023077 -1.1863077
7 -4.8723077 -3.2023077
8 -2.7123077 -4.8723077
9 -0.6323077 -2.7123077
10 -1.0923077 -0.6323077
11 -0.0943077 -1.0923077
12 -1.8815944 -0.0943077
13 -0.6355944 -1.8815944
14 10.4961678 -0.6355944
15 1.1421678 10.4961678
16 -4.1738322 1.1421678
17 -3.5258322 -4.1738322
18 -5.2918322 -3.5258322
19 -3.0318322 -5.2918322
20 -1.3818322 -3.0318322
21 -2.7318322 -1.3818322
22 0.7081678 -2.7318322
23 1.5061678 0.7081678
24 -3.0711189 1.5061678
25 -4.3951189 -3.0711189
26 -6.8455594 -4.3951189
27 -6.6495594 -6.8455594
28 -0.2355594 -6.6495594
29 -1.4575594 -0.2355594
30 -2.2535594 -1.4575594
31 -1.2835594 -2.2535594
32 -0.6735594 -1.2835594
33 5.0364406 -0.6735594
34 4.4364406 5.0364406
35 1.0044406 4.4364406
36 -6.1028462 1.0044406
37 -2.9668462 -6.1028462
38 -3.8972867 -2.9668462
39 0.5187133 -3.8972867
40 -0.9172867 0.5187133
41 3.4207133 -0.9172867
42 8.5147133 3.4207133
43 8.7847133 8.5147133
44 14.8147133 8.7847133
45 13.5747133 14.8147133
46 7.2347133 13.5747133
47 6.1327133 7.2347133
48 5.4354266 6.1327133
49 3.4414266 5.4354266
50 -0.7990140 3.4414266
51 1.6769860 -0.7990140
52 3.5509860 1.6769860
53 2.7489860 3.5509860
54 2.2329860 2.7489860
55 0.4029860 2.2329860
56 -10.0470140 0.4029860
57 -15.2470140 -10.0470140
58 -11.2870140 -15.2470140
59 -8.5490140 -11.2870140
> 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/74kyo1197637260.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/8zhid1197637260.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/9pln21197637260.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/103q7l1197637260.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/11ygoy1197637260.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/12t02b1197637260.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/13emgk1197637260.tab")
>
> system("convert tmp/1bn721197637260.ps tmp/1bn721197637260.png")
> system("convert tmp/2q6x11197637260.ps tmp/2q6x11197637260.png")
> system("convert tmp/38hlf1197637260.ps tmp/38hlf1197637260.png")
> system("convert tmp/4ng371197637260.ps tmp/4ng371197637260.png")
> system("convert tmp/51jsk1197637260.ps tmp/51jsk1197637260.png")
> system("convert tmp/6f2mp1197637260.ps tmp/6f2mp1197637260.png")
> system("convert tmp/74kyo1197637260.ps tmp/74kyo1197637260.png")
> system("convert tmp/8zhid1197637260.ps tmp/8zhid1197637260.png")
> system("convert tmp/9pln21197637260.ps tmp/9pln21197637260.png")
>
>
> proc.time()
user system elapsed
4.650 3.112 5.051