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.
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(7.4,0,7.2,0,7.0,0,6.6,0,6.4,0,6.4,0,6.8,0,7.3,0,7.0,0,7.0,0,6.7,0,6.7,0,6.3,0,6.2,0,6.0,0,6.3,0,6.2,0,6.1,0,6.2,0,6.6,0,6.6,0,7.8,0,7.4,0,7.4,1,7.5,1,7.4,1,7.4,1,7.0,1,6.9,1,6.9,1,7.6,1,7.7,1,7.6,1,8.2,1,8.0,1,8.1,1,8.3,1,8.2,1,8.1,1,7.7,1,7.6,1,7.7,1,8.2,1,8.4,1,8.4,1,8.6,1,8.4,1,8.5,1,8.7,1,8.7,1,8.6,1,7.4,1,7.3,1,7.4,1,9.0,1,9.2,1,9.2,1,8.5,1,8.3,1,8.3,1,8.6,1,8.6,1,8.5,1,8.1,1,8.1,1,8.0,1,8.6,1,8.7,1,8.7,1,8.6,1,8.4,1,8.4,1,8.7,1,8.7,1,8.5,1,8.3,1,8.3,1,8.3,1,8.1,1,8.2,1,8.1,1,8.1,1,7.9,1,7.7,1,8.1,1,8.0,1,7.7,1,7.8,1,7.6,1,7.4,1,7.7,1,7.9,1,7.6,1),dim=c(2,93),dimnames=list(c('x','y'),1:93))
> y <- array(NA,dim=c(2,93),dimnames=list(c('x','y'),1:93))
> 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 = 'Do not include Seasonal 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
x y
1 7.4 0
2 7.2 0
3 7.0 0
4 6.6 0
5 6.4 0
6 6.4 0
7 6.8 0
8 7.3 0
9 7.0 0
10 7.0 0
11 6.7 0
12 6.7 0
13 6.3 0
14 6.2 0
15 6.0 0
16 6.3 0
17 6.2 0
18 6.1 0
19 6.2 0
20 6.6 0
21 6.6 0
22 7.8 0
23 7.4 0
24 7.4 1
25 7.5 1
26 7.4 1
27 7.4 1
28 7.0 1
29 6.9 1
30 6.9 1
31 7.6 1
32 7.7 1
33 7.6 1
34 8.2 1
35 8.0 1
36 8.1 1
37 8.3 1
38 8.2 1
39 8.1 1
40 7.7 1
41 7.6 1
42 7.7 1
43 8.2 1
44 8.4 1
45 8.4 1
46 8.6 1
47 8.4 1
48 8.5 1
49 8.7 1
50 8.7 1
51 8.6 1
52 7.4 1
53 7.3 1
54 7.4 1
55 9.0 1
56 9.2 1
57 9.2 1
58 8.5 1
59 8.3 1
60 8.3 1
61 8.6 1
62 8.6 1
63 8.5 1
64 8.1 1
65 8.1 1
66 8.0 1
67 8.6 1
68 8.7 1
69 8.7 1
70 8.6 1
71 8.4 1
72 8.4 1
73 8.7 1
74 8.7 1
75 8.5 1
76 8.3 1
77 8.3 1
78 8.3 1
79 8.1 1
80 8.2 1
81 8.1 1
82 8.1 1
83 7.9 1
84 7.7 1
85 8.1 1
86 8.0 1
87 7.7 1
88 7.8 1
89 7.6 1
90 7.4 1
91 7.7 1
92 7.9 1
93 7.6 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) y
6.704 1.387
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.191429 -0.391429 0.008571 0.408571 1.108571
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.7043 0.1069 62.73 <2e-16 ***
y 1.3871 0.1232 11.26 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.5125 on 91 degrees of freedom
Multiple R-Squared: 0.5822, Adjusted R-squared: 0.5776
F-statistic: 126.8 on 1 and 91 DF, p-value: < 2.2e-16
> postscript(file="/var/www/html/rcomp/tmp/1lpht1195386650.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/2ivl81195386650.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/35frh1195386650.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/46uuv1195386650.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/5mm6f1195386650.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 = 93
Frequency = 1
1 2 3 4 5 6
0.695652174 0.495652174 0.295652174 -0.104347826 -0.304347826 -0.304347826
7 8 9 10 11 12
0.095652174 0.595652174 0.295652174 0.295652174 -0.004347826 -0.004347826
13 14 15 16 17 18
-0.404347826 -0.504347826 -0.704347826 -0.404347826 -0.504347826 -0.604347826
19 20 21 22 23 24
-0.504347826 -0.104347826 -0.104347826 1.095652174 0.695652174 -0.691428571
25 26 27 28 29 30
-0.591428571 -0.691428571 -0.691428571 -1.091428571 -1.191428571 -1.191428571
31 32 33 34 35 36
-0.491428571 -0.391428571 -0.491428571 0.108571429 -0.091428571 0.008571429
37 38 39 40 41 42
0.208571429 0.108571429 0.008571429 -0.391428571 -0.491428571 -0.391428571
43 44 45 46 47 48
0.108571429 0.308571429 0.308571429 0.508571429 0.308571429 0.408571429
49 50 51 52 53 54
0.608571429 0.608571429 0.508571429 -0.691428571 -0.791428571 -0.691428571
55 56 57 58 59 60
0.908571429 1.108571429 1.108571429 0.408571429 0.208571429 0.208571429
61 62 63 64 65 66
0.508571429 0.508571429 0.408571429 0.008571429 0.008571429 -0.091428571
67 68 69 70 71 72
0.508571429 0.608571429 0.608571429 0.508571429 0.308571429 0.308571429
73 74 75 76 77 78
0.608571429 0.608571429 0.408571429 0.208571429 0.208571429 0.208571429
79 80 81 82 83 84
0.008571429 0.108571429 0.008571429 0.008571429 -0.191428571 -0.391428571
85 86 87 88 89 90
0.008571429 -0.091428571 -0.391428571 -0.291428571 -0.491428571 -0.691428571
91 92 93
-0.391428571 -0.191428571 -0.491428571
> postscript(file="/var/www/html/rcomp/tmp/6s5kp1195386650.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 = 93
Frequency = 1
lag(myerror, k = 1) myerror
0 0.695652174 NA
1 0.495652174 0.695652174
2 0.295652174 0.495652174
3 -0.104347826 0.295652174
4 -0.304347826 -0.104347826
5 -0.304347826 -0.304347826
6 0.095652174 -0.304347826
7 0.595652174 0.095652174
8 0.295652174 0.595652174
9 0.295652174 0.295652174
10 -0.004347826 0.295652174
11 -0.004347826 -0.004347826
12 -0.404347826 -0.004347826
13 -0.504347826 -0.404347826
14 -0.704347826 -0.504347826
15 -0.404347826 -0.704347826
16 -0.504347826 -0.404347826
17 -0.604347826 -0.504347826
18 -0.504347826 -0.604347826
19 -0.104347826 -0.504347826
20 -0.104347826 -0.104347826
21 1.095652174 -0.104347826
22 0.695652174 1.095652174
23 -0.691428571 0.695652174
24 -0.591428571 -0.691428571
25 -0.691428571 -0.591428571
26 -0.691428571 -0.691428571
27 -1.091428571 -0.691428571
28 -1.191428571 -1.091428571
29 -1.191428571 -1.191428571
30 -0.491428571 -1.191428571
31 -0.391428571 -0.491428571
32 -0.491428571 -0.391428571
33 0.108571429 -0.491428571
34 -0.091428571 0.108571429
35 0.008571429 -0.091428571
36 0.208571429 0.008571429
37 0.108571429 0.208571429
38 0.008571429 0.108571429
39 -0.391428571 0.008571429
40 -0.491428571 -0.391428571
41 -0.391428571 -0.491428571
42 0.108571429 -0.391428571
43 0.308571429 0.108571429
44 0.308571429 0.308571429
45 0.508571429 0.308571429
46 0.308571429 0.508571429
47 0.408571429 0.308571429
48 0.608571429 0.408571429
49 0.608571429 0.608571429
50 0.508571429 0.608571429
51 -0.691428571 0.508571429
52 -0.791428571 -0.691428571
53 -0.691428571 -0.791428571
54 0.908571429 -0.691428571
55 1.108571429 0.908571429
56 1.108571429 1.108571429
57 0.408571429 1.108571429
58 0.208571429 0.408571429
59 0.208571429 0.208571429
60 0.508571429 0.208571429
61 0.508571429 0.508571429
62 0.408571429 0.508571429
63 0.008571429 0.408571429
64 0.008571429 0.008571429
65 -0.091428571 0.008571429
66 0.508571429 -0.091428571
67 0.608571429 0.508571429
68 0.608571429 0.608571429
69 0.508571429 0.608571429
70 0.308571429 0.508571429
71 0.308571429 0.308571429
72 0.608571429 0.308571429
73 0.608571429 0.608571429
74 0.408571429 0.608571429
75 0.208571429 0.408571429
76 0.208571429 0.208571429
77 0.208571429 0.208571429
78 0.008571429 0.208571429
79 0.108571429 0.008571429
80 0.008571429 0.108571429
81 0.008571429 0.008571429
82 -0.191428571 0.008571429
83 -0.391428571 -0.191428571
84 0.008571429 -0.391428571
85 -0.091428571 0.008571429
86 -0.391428571 -0.091428571
87 -0.291428571 -0.391428571
88 -0.491428571 -0.291428571
89 -0.691428571 -0.491428571
90 -0.391428571 -0.691428571
91 -0.191428571 -0.391428571
92 -0.491428571 -0.191428571
93 NA -0.491428571
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.495652174 0.695652174
[2,] 0.295652174 0.495652174
[3,] -0.104347826 0.295652174
[4,] -0.304347826 -0.104347826
[5,] -0.304347826 -0.304347826
[6,] 0.095652174 -0.304347826
[7,] 0.595652174 0.095652174
[8,] 0.295652174 0.595652174
[9,] 0.295652174 0.295652174
[10,] -0.004347826 0.295652174
[11,] -0.004347826 -0.004347826
[12,] -0.404347826 -0.004347826
[13,] -0.504347826 -0.404347826
[14,] -0.704347826 -0.504347826
[15,] -0.404347826 -0.704347826
[16,] -0.504347826 -0.404347826
[17,] -0.604347826 -0.504347826
[18,] -0.504347826 -0.604347826
[19,] -0.104347826 -0.504347826
[20,] -0.104347826 -0.104347826
[21,] 1.095652174 -0.104347826
[22,] 0.695652174 1.095652174
[23,] -0.691428571 0.695652174
[24,] -0.591428571 -0.691428571
[25,] -0.691428571 -0.591428571
[26,] -0.691428571 -0.691428571
[27,] -1.091428571 -0.691428571
[28,] -1.191428571 -1.091428571
[29,] -1.191428571 -1.191428571
[30,] -0.491428571 -1.191428571
[31,] -0.391428571 -0.491428571
[32,] -0.491428571 -0.391428571
[33,] 0.108571429 -0.491428571
[34,] -0.091428571 0.108571429
[35,] 0.008571429 -0.091428571
[36,] 0.208571429 0.008571429
[37,] 0.108571429 0.208571429
[38,] 0.008571429 0.108571429
[39,] -0.391428571 0.008571429
[40,] -0.491428571 -0.391428571
[41,] -0.391428571 -0.491428571
[42,] 0.108571429 -0.391428571
[43,] 0.308571429 0.108571429
[44,] 0.308571429 0.308571429
[45,] 0.508571429 0.308571429
[46,] 0.308571429 0.508571429
[47,] 0.408571429 0.308571429
[48,] 0.608571429 0.408571429
[49,] 0.608571429 0.608571429
[50,] 0.508571429 0.608571429
[51,] -0.691428571 0.508571429
[52,] -0.791428571 -0.691428571
[53,] -0.691428571 -0.791428571
[54,] 0.908571429 -0.691428571
[55,] 1.108571429 0.908571429
[56,] 1.108571429 1.108571429
[57,] 0.408571429 1.108571429
[58,] 0.208571429 0.408571429
[59,] 0.208571429 0.208571429
[60,] 0.508571429 0.208571429
[61,] 0.508571429 0.508571429
[62,] 0.408571429 0.508571429
[63,] 0.008571429 0.408571429
[64,] 0.008571429 0.008571429
[65,] -0.091428571 0.008571429
[66,] 0.508571429 -0.091428571
[67,] 0.608571429 0.508571429
[68,] 0.608571429 0.608571429
[69,] 0.508571429 0.608571429
[70,] 0.308571429 0.508571429
[71,] 0.308571429 0.308571429
[72,] 0.608571429 0.308571429
[73,] 0.608571429 0.608571429
[74,] 0.408571429 0.608571429
[75,] 0.208571429 0.408571429
[76,] 0.208571429 0.208571429
[77,] 0.208571429 0.208571429
[78,] 0.008571429 0.208571429
[79,] 0.108571429 0.008571429
[80,] 0.008571429 0.108571429
[81,] 0.008571429 0.008571429
[82,] -0.191428571 0.008571429
[83,] -0.391428571 -0.191428571
[84,] 0.008571429 -0.391428571
[85,] -0.091428571 0.008571429
[86,] -0.391428571 -0.091428571
[87,] -0.291428571 -0.391428571
[88,] -0.491428571 -0.291428571
[89,] -0.691428571 -0.491428571
[90,] -0.391428571 -0.691428571
[91,] -0.191428571 -0.391428571
[92,] -0.491428571 -0.191428571
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.495652174 0.695652174
2 0.295652174 0.495652174
3 -0.104347826 0.295652174
4 -0.304347826 -0.104347826
5 -0.304347826 -0.304347826
6 0.095652174 -0.304347826
7 0.595652174 0.095652174
8 0.295652174 0.595652174
9 0.295652174 0.295652174
10 -0.004347826 0.295652174
11 -0.004347826 -0.004347826
12 -0.404347826 -0.004347826
13 -0.504347826 -0.404347826
14 -0.704347826 -0.504347826
15 -0.404347826 -0.704347826
16 -0.504347826 -0.404347826
17 -0.604347826 -0.504347826
18 -0.504347826 -0.604347826
19 -0.104347826 -0.504347826
20 -0.104347826 -0.104347826
21 1.095652174 -0.104347826
22 0.695652174 1.095652174
23 -0.691428571 0.695652174
24 -0.591428571 -0.691428571
25 -0.691428571 -0.591428571
26 -0.691428571 -0.691428571
27 -1.091428571 -0.691428571
28 -1.191428571 -1.091428571
29 -1.191428571 -1.191428571
30 -0.491428571 -1.191428571
31 -0.391428571 -0.491428571
32 -0.491428571 -0.391428571
33 0.108571429 -0.491428571
34 -0.091428571 0.108571429
35 0.008571429 -0.091428571
36 0.208571429 0.008571429
37 0.108571429 0.208571429
38 0.008571429 0.108571429
39 -0.391428571 0.008571429
40 -0.491428571 -0.391428571
41 -0.391428571 -0.491428571
42 0.108571429 -0.391428571
43 0.308571429 0.108571429
44 0.308571429 0.308571429
45 0.508571429 0.308571429
46 0.308571429 0.508571429
47 0.408571429 0.308571429
48 0.608571429 0.408571429
49 0.608571429 0.608571429
50 0.508571429 0.608571429
51 -0.691428571 0.508571429
52 -0.791428571 -0.691428571
53 -0.691428571 -0.791428571
54 0.908571429 -0.691428571
55 1.108571429 0.908571429
56 1.108571429 1.108571429
57 0.408571429 1.108571429
58 0.208571429 0.408571429
59 0.208571429 0.208571429
60 0.508571429 0.208571429
61 0.508571429 0.508571429
62 0.408571429 0.508571429
63 0.008571429 0.408571429
64 0.008571429 0.008571429
65 -0.091428571 0.008571429
66 0.508571429 -0.091428571
67 0.608571429 0.508571429
68 0.608571429 0.608571429
69 0.508571429 0.608571429
70 0.308571429 0.508571429
71 0.308571429 0.308571429
72 0.608571429 0.308571429
73 0.608571429 0.608571429
74 0.408571429 0.608571429
75 0.208571429 0.408571429
76 0.208571429 0.208571429
77 0.208571429 0.208571429
78 0.008571429 0.208571429
79 0.108571429 0.008571429
80 0.008571429 0.108571429
81 0.008571429 0.008571429
82 -0.191428571 0.008571429
83 -0.391428571 -0.191428571
84 0.008571429 -0.391428571
85 -0.091428571 0.008571429
86 -0.391428571 -0.091428571
87 -0.291428571 -0.391428571
88 -0.491428571 -0.291428571
89 -0.691428571 -0.491428571
90 -0.391428571 -0.691428571
91 -0.191428571 -0.391428571
92 -0.491428571 -0.191428571
> 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/7mdg31195386650.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/8plbj1195386650.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/9z2zd1195386650.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/102v4p1195386651.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/11794w1195386651.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/12dt7h1195386651.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/13sl091195386652.tab")
>
> system("convert tmp/1lpht1195386650.ps tmp/1lpht1195386650.png")
> system("convert tmp/2ivl81195386650.ps tmp/2ivl81195386650.png")
> system("convert tmp/35frh1195386650.ps tmp/35frh1195386650.png")
> system("convert tmp/46uuv1195386650.ps tmp/46uuv1195386650.png")
> system("convert tmp/5mm6f1195386650.ps tmp/5mm6f1195386650.png")
> system("convert tmp/6s5kp1195386650.ps tmp/6s5kp1195386650.png")
> system("convert tmp/7mdg31195386650.ps tmp/7mdg31195386650.png")
> system("convert tmp/8plbj1195386650.ps tmp/8plbj1195386650.png")
> system("convert tmp/9z2zd1195386650.ps tmp/9z2zd1195386650.png")
>
>
> proc.time()
user system elapsed
4.300 2.509 4.616