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(117,0,103.8,0,100.8,0,110.6,0,104,0,112.6,0,107.3,0,98.9,0,109.8,0,104.9,0,102.2,0,123.9,0,124.9,0,112.7,0,121.9,0,100.6,0,104.3,0,120.4,0,107.5,0,102.9,0,125.6,0,107.5,0,108.8,0,128.4,1,121.1,1,119.5,1,128.7,1,108.7,1,105.5,1,119.8,1,111.3,1,110.6,1,120.1,1,97.5,1,107.7,1,127.3,1,117.2,1,119.8,1,116.2,1,111,1,112.4,1,130.6,1,109.1,1,118.8,1,123.9,1,101.6,1,112.8,1,128,1,129.6,1,125.8,1,119.5,1,115.7,1,113.6,1,129.7,1,112,1,116.8,1,127,1,112.9,1,113.3,1,121.7,1),dim=c(2,60),dimnames=list(c('Cons','Wetg'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Cons','Wetg'),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 = 'No 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
Cons Wetg M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 117.0 0 1 0 0 0 0 0 0 0 0 0 0
2 103.8 0 0 1 0 0 0 0 0 0 0 0 0
3 100.8 0 0 0 1 0 0 0 0 0 0 0 0
4 110.6 0 0 0 0 1 0 0 0 0 0 0 0
5 104.0 0 0 0 0 0 1 0 0 0 0 0 0
6 112.6 0 0 0 0 0 0 1 0 0 0 0 0
7 107.3 0 0 0 0 0 0 0 1 0 0 0 0
8 98.9 0 0 0 0 0 0 0 0 1 0 0 0
9 109.8 0 0 0 0 0 0 0 0 0 1 0 0
10 104.9 0 0 0 0 0 0 0 0 0 0 1 0
11 102.2 0 0 0 0 0 0 0 0 0 0 0 1
12 123.9 0 0 0 0 0 0 0 0 0 0 0 0
13 124.9 0 1 0 0 0 0 0 0 0 0 0 0
14 112.7 0 0 1 0 0 0 0 0 0 0 0 0
15 121.9 0 0 0 1 0 0 0 0 0 0 0 0
16 100.6 0 0 0 0 1 0 0 0 0 0 0 0
17 104.3 0 0 0 0 0 1 0 0 0 0 0 0
18 120.4 0 0 0 0 0 0 1 0 0 0 0 0
19 107.5 0 0 0 0 0 0 0 1 0 0 0 0
20 102.9 0 0 0 0 0 0 0 0 1 0 0 0
21 125.6 0 0 0 0 0 0 0 0 0 1 0 0
22 107.5 0 0 0 0 0 0 0 0 0 0 1 0
23 108.8 0 0 0 0 0 0 0 0 0 0 0 1
24 128.4 1 0 0 0 0 0 0 0 0 0 0 0
25 121.1 1 1 0 0 0 0 0 0 0 0 0 0
26 119.5 1 0 1 0 0 0 0 0 0 0 0 0
27 128.7 1 0 0 1 0 0 0 0 0 0 0 0
28 108.7 1 0 0 0 1 0 0 0 0 0 0 0
29 105.5 1 0 0 0 0 1 0 0 0 0 0 0
30 119.8 1 0 0 0 0 0 1 0 0 0 0 0
31 111.3 1 0 0 0 0 0 0 1 0 0 0 0
32 110.6 1 0 0 0 0 0 0 0 1 0 0 0
33 120.1 1 0 0 0 0 0 0 0 0 1 0 0
34 97.5 1 0 0 0 0 0 0 0 0 0 1 0
35 107.7 1 0 0 0 0 0 0 0 0 0 0 1
36 127.3 1 0 0 0 0 0 0 0 0 0 0 0
37 117.2 1 1 0 0 0 0 0 0 0 0 0 0
38 119.8 1 0 1 0 0 0 0 0 0 0 0 0
39 116.2 1 0 0 1 0 0 0 0 0 0 0 0
40 111.0 1 0 0 0 1 0 0 0 0 0 0 0
41 112.4 1 0 0 0 0 1 0 0 0 0 0 0
42 130.6 1 0 0 0 0 0 1 0 0 0 0 0
43 109.1 1 0 0 0 0 0 0 1 0 0 0 0
44 118.8 1 0 0 0 0 0 0 0 1 0 0 0
45 123.9 1 0 0 0 0 0 0 0 0 1 0 0
46 101.6 1 0 0 0 0 0 0 0 0 0 1 0
47 112.8 1 0 0 0 0 0 0 0 0 0 0 1
48 128.0 1 0 0 0 0 0 0 0 0 0 0 0
49 129.6 1 1 0 0 0 0 0 0 0 0 0 0
50 125.8 1 0 1 0 0 0 0 0 0 0 0 0
51 119.5 1 0 0 1 0 0 0 0 0 0 0 0
52 115.7 1 0 0 0 1 0 0 0 0 0 0 0
53 113.6 1 0 0 0 0 1 0 0 0 0 0 0
54 129.7 1 0 0 0 0 0 1 0 0 0 0 0
55 112.0 1 0 0 0 0 0 0 1 0 0 0 0
56 116.8 1 0 0 0 0 0 0 0 1 0 0 0
57 127.0 1 0 0 0 0 0 0 0 0 1 0 0
58 112.9 1 0 0 0 0 0 0 0 0 0 1 0
59 113.3 1 0 0 0 0 0 0 0 0 0 0 1
60 121.7 1 0 0 0 0 0 0 0 0 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Wetg M1 M2 M3 M4
120.575 6.606 -2.579 -8.219 -7.119 -15.219
M5 M6 M7 M8 M9 M10
-16.579 -1.919 -15.099 -14.939 -3.259 -19.659
M11
-15.579
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-12.6566 -3.5823 0.3234 3.7541 8.6377
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 120.575 2.714 44.425 < 2e-16 ***
Wetg 6.606 1.463 4.514 4.26e-05 ***
M1 -2.579 3.475 -0.742 0.4617
M2 -8.219 3.475 -2.365 0.0222 *
M3 -7.119 3.475 -2.048 0.0461 *
M4 -15.219 3.475 -4.379 6.62e-05 ***
M5 -16.579 3.475 -4.771 1.82e-05 ***
M6 -1.919 3.475 -0.552 0.5835
M7 -15.099 3.475 -4.345 7.40e-05 ***
M8 -14.939 3.475 -4.299 8.59e-05 ***
M9 -3.259 3.475 -0.938 0.3532
M10 -19.659 3.475 -5.657 8.87e-07 ***
M11 -15.579 3.475 -4.483 4.72e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 5.475 on 47 degrees of freedom
Multiple R-Squared: 0.7048, Adjusted R-squared: 0.6294
F-statistic: 9.352 on 12 and 47 DF, p-value: 7.24e-09
> postscript(file="/var/www/html/rcomp/tmp/1v3he1198187775.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/259mn1198187775.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/34v8s1198187775.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/4u22x1198187775.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/5u4c41198187775.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
-0.996571429 -8.556571429 -12.656571429 5.243428571 0.003428571
6 7 8 9 10
-6.056571429 1.823428571 -6.736571429 -7.516571429 3.983428571
11 12 13 14 15
-2.796571429 3.324571429 6.903428571 0.343428571 8.443428571
16 17 18 19 20
-4.756571429 0.303428571 1.743428571 2.023428571 -2.736571429
21 22 23 24 25
8.283428571 6.583428571 3.803428571 1.218857143 -3.502285714
26 27 28 29 30
0.537714286 8.637714286 -3.262285714 -5.102285714 -5.462285714
31 32 33 34 35
-0.782285714 -1.642285714 -3.822285714 -10.022285714 -3.902285714
36 37 38 39 40
0.118857143 -7.402285714 0.837714286 -3.862285714 -0.962285714
41 42 43 44 45
1.797714286 5.337714286 -2.982285714 6.557714286 -0.022285714
46 47 48 49 50
-5.922285714 1.197714286 0.818857143 4.997714286 6.837714286
51 52 53 54 55
-0.562285714 3.737714286 2.997714286 4.437714286 -0.082285714
56 57 58 59 60
4.557714286 3.077714286 5.377714286 1.697714286 -5.481142857
> postscript(file="/var/www/html/rcomp/tmp/664ys1198187775.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 -0.996571429 NA
1 -8.556571429 -0.996571429
2 -12.656571429 -8.556571429
3 5.243428571 -12.656571429
4 0.003428571 5.243428571
5 -6.056571429 0.003428571
6 1.823428571 -6.056571429
7 -6.736571429 1.823428571
8 -7.516571429 -6.736571429
9 3.983428571 -7.516571429
10 -2.796571429 3.983428571
11 3.324571429 -2.796571429
12 6.903428571 3.324571429
13 0.343428571 6.903428571
14 8.443428571 0.343428571
15 -4.756571429 8.443428571
16 0.303428571 -4.756571429
17 1.743428571 0.303428571
18 2.023428571 1.743428571
19 -2.736571429 2.023428571
20 8.283428571 -2.736571429
21 6.583428571 8.283428571
22 3.803428571 6.583428571
23 1.218857143 3.803428571
24 -3.502285714 1.218857143
25 0.537714286 -3.502285714
26 8.637714286 0.537714286
27 -3.262285714 8.637714286
28 -5.102285714 -3.262285714
29 -5.462285714 -5.102285714
30 -0.782285714 -5.462285714
31 -1.642285714 -0.782285714
32 -3.822285714 -1.642285714
33 -10.022285714 -3.822285714
34 -3.902285714 -10.022285714
35 0.118857143 -3.902285714
36 -7.402285714 0.118857143
37 0.837714286 -7.402285714
38 -3.862285714 0.837714286
39 -0.962285714 -3.862285714
40 1.797714286 -0.962285714
41 5.337714286 1.797714286
42 -2.982285714 5.337714286
43 6.557714286 -2.982285714
44 -0.022285714 6.557714286
45 -5.922285714 -0.022285714
46 1.197714286 -5.922285714
47 0.818857143 1.197714286
48 4.997714286 0.818857143
49 6.837714286 4.997714286
50 -0.562285714 6.837714286
51 3.737714286 -0.562285714
52 2.997714286 3.737714286
53 4.437714286 2.997714286
54 -0.082285714 4.437714286
55 4.557714286 -0.082285714
56 3.077714286 4.557714286
57 5.377714286 3.077714286
58 1.697714286 5.377714286
59 -5.481142857 1.697714286
60 NA -5.481142857
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -8.556571429 -0.996571429
[2,] -12.656571429 -8.556571429
[3,] 5.243428571 -12.656571429
[4,] 0.003428571 5.243428571
[5,] -6.056571429 0.003428571
[6,] 1.823428571 -6.056571429
[7,] -6.736571429 1.823428571
[8,] -7.516571429 -6.736571429
[9,] 3.983428571 -7.516571429
[10,] -2.796571429 3.983428571
[11,] 3.324571429 -2.796571429
[12,] 6.903428571 3.324571429
[13,] 0.343428571 6.903428571
[14,] 8.443428571 0.343428571
[15,] -4.756571429 8.443428571
[16,] 0.303428571 -4.756571429
[17,] 1.743428571 0.303428571
[18,] 2.023428571 1.743428571
[19,] -2.736571429 2.023428571
[20,] 8.283428571 -2.736571429
[21,] 6.583428571 8.283428571
[22,] 3.803428571 6.583428571
[23,] 1.218857143 3.803428571
[24,] -3.502285714 1.218857143
[25,] 0.537714286 -3.502285714
[26,] 8.637714286 0.537714286
[27,] -3.262285714 8.637714286
[28,] -5.102285714 -3.262285714
[29,] -5.462285714 -5.102285714
[30,] -0.782285714 -5.462285714
[31,] -1.642285714 -0.782285714
[32,] -3.822285714 -1.642285714
[33,] -10.022285714 -3.822285714
[34,] -3.902285714 -10.022285714
[35,] 0.118857143 -3.902285714
[36,] -7.402285714 0.118857143
[37,] 0.837714286 -7.402285714
[38,] -3.862285714 0.837714286
[39,] -0.962285714 -3.862285714
[40,] 1.797714286 -0.962285714
[41,] 5.337714286 1.797714286
[42,] -2.982285714 5.337714286
[43,] 6.557714286 -2.982285714
[44,] -0.022285714 6.557714286
[45,] -5.922285714 -0.022285714
[46,] 1.197714286 -5.922285714
[47,] 0.818857143 1.197714286
[48,] 4.997714286 0.818857143
[49,] 6.837714286 4.997714286
[50,] -0.562285714 6.837714286
[51,] 3.737714286 -0.562285714
[52,] 2.997714286 3.737714286
[53,] 4.437714286 2.997714286
[54,] -0.082285714 4.437714286
[55,] 4.557714286 -0.082285714
[56,] 3.077714286 4.557714286
[57,] 5.377714286 3.077714286
[58,] 1.697714286 5.377714286
[59,] -5.481142857 1.697714286
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -8.556571429 -0.996571429
2 -12.656571429 -8.556571429
3 5.243428571 -12.656571429
4 0.003428571 5.243428571
5 -6.056571429 0.003428571
6 1.823428571 -6.056571429
7 -6.736571429 1.823428571
8 -7.516571429 -6.736571429
9 3.983428571 -7.516571429
10 -2.796571429 3.983428571
11 3.324571429 -2.796571429
12 6.903428571 3.324571429
13 0.343428571 6.903428571
14 8.443428571 0.343428571
15 -4.756571429 8.443428571
16 0.303428571 -4.756571429
17 1.743428571 0.303428571
18 2.023428571 1.743428571
19 -2.736571429 2.023428571
20 8.283428571 -2.736571429
21 6.583428571 8.283428571
22 3.803428571 6.583428571
23 1.218857143 3.803428571
24 -3.502285714 1.218857143
25 0.537714286 -3.502285714
26 8.637714286 0.537714286
27 -3.262285714 8.637714286
28 -5.102285714 -3.262285714
29 -5.462285714 -5.102285714
30 -0.782285714 -5.462285714
31 -1.642285714 -0.782285714
32 -3.822285714 -1.642285714
33 -10.022285714 -3.822285714
34 -3.902285714 -10.022285714
35 0.118857143 -3.902285714
36 -7.402285714 0.118857143
37 0.837714286 -7.402285714
38 -3.862285714 0.837714286
39 -0.962285714 -3.862285714
40 1.797714286 -0.962285714
41 5.337714286 1.797714286
42 -2.982285714 5.337714286
43 6.557714286 -2.982285714
44 -0.022285714 6.557714286
45 -5.922285714 -0.022285714
46 1.197714286 -5.922285714
47 0.818857143 1.197714286
48 4.997714286 0.818857143
49 6.837714286 4.997714286
50 -0.562285714 6.837714286
51 3.737714286 -0.562285714
52 2.997714286 3.737714286
53 4.437714286 2.997714286
54 -0.082285714 4.437714286
55 4.557714286 -0.082285714
56 3.077714286 4.557714286
57 5.377714286 3.077714286
58 1.697714286 5.377714286
59 -5.481142857 1.697714286
> 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/72kua1198187775.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/8sb391198187775.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/9fekc1198187775.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/1066m21198187775.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/11hksa1198187775.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/12kci21198187776.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/13dskq1198187776.tab")
>
> system("convert tmp/1v3he1198187775.ps tmp/1v3he1198187775.png")
> system("convert tmp/259mn1198187775.ps tmp/259mn1198187775.png")
> system("convert tmp/34v8s1198187775.ps tmp/34v8s1198187775.png")
> system("convert tmp/4u22x1198187775.ps tmp/4u22x1198187775.png")
> system("convert tmp/5u4c41198187775.ps tmp/5u4c41198187775.png")
> system("convert tmp/664ys1198187775.ps tmp/664ys1198187775.png")
> system("convert tmp/72kua1198187775.ps tmp/72kua1198187775.png")
> system("convert tmp/8sb391198187775.ps tmp/8sb391198187775.png")
> system("convert tmp/9fekc1198187775.ps tmp/9fekc1198187775.png")
>
>
> proc.time()
user system elapsed
3.978 2.440 4.312