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(523,0,519,1,509,1,512,1,519,0,517,0,510,1,509,1,501,0,507,1,569,0,580,0,578,1,565,1,547,0,555,0,562,0,561,0,555,1,544,1,537,1,543,1,594,1,611,0,613,1,611,1,594,1,595,0,591,0,589,0,584,1,573,1,567,0,569,1,621,0,629,0,628,1,612,1,595,1,597,0,593,1,590,0,580,1,574,1,573,1,573,1,620,0,626,0,620,1,588,1,566,1,557,0,561,1,549,1,532,1,526,1,511,1,499,1,555,0,565,1,542,1),dim=c(2,61),dimnames=list(c('y','x'),1:61))
> y <- array(NA,dim=c(2,61),dimnames=list(c('y','x'),1:61))
> 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
y x M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 523 0 1 0 0 0 0 0 0 0 0 0 0
2 519 1 0 1 0 0 0 0 0 0 0 0 0
3 509 1 0 0 1 0 0 0 0 0 0 0 0
4 512 1 0 0 0 1 0 0 0 0 0 0 0
5 519 0 0 0 0 0 1 0 0 0 0 0 0
6 517 0 0 0 0 0 0 1 0 0 0 0 0
7 510 1 0 0 0 0 0 0 1 0 0 0 0
8 509 1 0 0 0 0 0 0 0 1 0 0 0
9 501 0 0 0 0 0 0 0 0 0 1 0 0
10 507 1 0 0 0 0 0 0 0 0 0 1 0
11 569 0 0 0 0 0 0 0 0 0 0 0 1
12 580 0 0 0 0 0 0 0 0 0 0 0 0
13 578 1 1 0 0 0 0 0 0 0 0 0 0
14 565 1 0 1 0 0 0 0 0 0 0 0 0
15 547 0 0 0 1 0 0 0 0 0 0 0 0
16 555 0 0 0 0 1 0 0 0 0 0 0 0
17 562 0 0 0 0 0 1 0 0 0 0 0 0
18 561 0 0 0 0 0 0 1 0 0 0 0 0
19 555 1 0 0 0 0 0 0 1 0 0 0 0
20 544 1 0 0 0 0 0 0 0 1 0 0 0
21 537 1 0 0 0 0 0 0 0 0 1 0 0
22 543 1 0 0 0 0 0 0 0 0 0 1 0
23 594 1 0 0 0 0 0 0 0 0 0 0 1
24 611 0 0 0 0 0 0 0 0 0 0 0 0
25 613 1 1 0 0 0 0 0 0 0 0 0 0
26 611 1 0 1 0 0 0 0 0 0 0 0 0
27 594 1 0 0 1 0 0 0 0 0 0 0 0
28 595 0 0 0 0 1 0 0 0 0 0 0 0
29 591 0 0 0 0 0 1 0 0 0 0 0 0
30 589 0 0 0 0 0 0 1 0 0 0 0 0
31 584 1 0 0 0 0 0 0 1 0 0 0 0
32 573 1 0 0 0 0 0 0 0 1 0 0 0
33 567 0 0 0 0 0 0 0 0 0 1 0 0
34 569 1 0 0 0 0 0 0 0 0 0 1 0
35 621 0 0 0 0 0 0 0 0 0 0 0 1
36 629 0 0 0 0 0 0 0 0 0 0 0 0
37 628 1 1 0 0 0 0 0 0 0 0 0 0
38 612 1 0 1 0 0 0 0 0 0 0 0 0
39 595 1 0 0 1 0 0 0 0 0 0 0 0
40 597 0 0 0 0 1 0 0 0 0 0 0 0
41 593 1 0 0 0 0 1 0 0 0 0 0 0
42 590 0 0 0 0 0 0 1 0 0 0 0 0
43 580 1 0 0 0 0 0 0 1 0 0 0 0
44 574 1 0 0 0 0 0 0 0 1 0 0 0
45 573 1 0 0 0 0 0 0 0 0 1 0 0
46 573 1 0 0 0 0 0 0 0 0 0 1 0
47 620 0 0 0 0 0 0 0 0 0 0 0 1
48 626 0 0 0 0 0 0 0 0 0 0 0 0
49 620 1 1 0 0 0 0 0 0 0 0 0 0
50 588 1 0 1 0 0 0 0 0 0 0 0 0
51 566 1 0 0 1 0 0 0 0 0 0 0 0
52 557 0 0 0 0 1 0 0 0 0 0 0 0
53 561 1 0 0 0 0 1 0 0 0 0 0 0
54 549 1 0 0 0 0 0 1 0 0 0 0 0
55 532 1 0 0 0 0 0 0 1 0 0 0 0
56 526 1 0 0 0 0 0 0 0 1 0 0 0
57 511 1 0 0 0 0 0 0 0 0 1 0 0
58 499 1 0 0 0 0 0 0 0 0 0 1 0
59 555 0 0 0 0 0 0 0 0 0 0 0 1
60 565 1 0 0 0 0 0 0 0 0 0 0 0
61 542 1 1 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) x M1 M2 M3 M4
601.951 1.244 -18.988 -24.195 -40.747 -39.000
M5 M6 M7 M8 M9 M10
-37.249 -41.000 -50.995 -57.995 -64.898 -64.995
M11
-10.400
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-60.000 -22.551 1.205 28.800 43.793
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 601.951 15.459 38.940 < 2e-16 ***
x 1.244 12.678 0.098 0.92223
M1 -18.988 22.154 -0.857 0.39565
M2 -24.195 23.832 -1.015 0.31507
M3 -40.747 22.868 -1.782 0.08110 .
M4 -39.000 21.566 -1.808 0.07680 .
M5 -37.249 21.714 -1.715 0.09272 .
M6 -41.000 21.566 -1.901 0.06329 .
M7 -50.995 23.832 -2.140 0.03748 *
M8 -57.995 23.832 -2.434 0.01872 *
M9 -64.898 22.154 -2.929 0.00518 **
M10 -64.995 23.832 -2.727 0.00889 **
M11 -10.400 21.566 -0.482 0.63182
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 34.1 on 48 degrees of freedom
Multiple R-Squared: 0.2994, Adjusted R-squared: 0.1243
F-statistic: 1.709 on 12 and 48 DF, p-value: 0.09431
> postscript(file="/var/www/html/rcomp/tmp/1368h1195682629.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/2f3q81195682629.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/3lezx1195682629.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/4rm601195682629.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/5hs7h1195682629.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 = 61
Frequency = 1
1 2 3 4 5 6
-59.96313364 -60.00000000 -53.44884793 -52.19539171 -45.70230415 -43.95115207
7 8 9 10 11 12
-42.20000000 -36.20000000 -36.05345622 -31.20000000 -22.55115207 -21.95115207
13 14 15 16 17 18
-6.20737327 -14.00000000 -14.20460829 -7.95115207 -2.70230415 0.04884793
19 20 21 22 23 24
2.80000000 -1.20000000 -1.29769585 4.80000000 1.20460829 9.04884793
25 26 27 28 29 30
28.79262673 32.00000000 31.55115207 32.04884793 26.29769585 28.04884793
31 32 33 34 35 36
31.80000000 27.80000000 29.94654378 30.80000000 29.44884793 27.04884793
37 38 39 40 41 42
43.79262673 33.00000000 32.55115207 34.04884793 27.05345622 29.04884793
43 44 45 46 47 48
27.80000000 28.80000000 34.70230415 34.80000000 28.44884793 24.04884793
49 50 51 52 53 54
35.79262673 9.00000000 3.55115207 -5.95115207 -4.94654378 -13.19539171
55 56 57 58 59 60
-20.20000000 -19.20000000 -27.29769585 -39.20000000 -36.55115207 -38.19539171
61
-42.20737327
> postscript(file="/var/www/html/rcomp/tmp/6q6wn1195682629.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 = 61
Frequency = 1
lag(myerror, k = 1) myerror
0 -59.96313364 NA
1 -60.00000000 -59.96313364
2 -53.44884793 -60.00000000
3 -52.19539171 -53.44884793
4 -45.70230415 -52.19539171
5 -43.95115207 -45.70230415
6 -42.20000000 -43.95115207
7 -36.20000000 -42.20000000
8 -36.05345622 -36.20000000
9 -31.20000000 -36.05345622
10 -22.55115207 -31.20000000
11 -21.95115207 -22.55115207
12 -6.20737327 -21.95115207
13 -14.00000000 -6.20737327
14 -14.20460829 -14.00000000
15 -7.95115207 -14.20460829
16 -2.70230415 -7.95115207
17 0.04884793 -2.70230415
18 2.80000000 0.04884793
19 -1.20000000 2.80000000
20 -1.29769585 -1.20000000
21 4.80000000 -1.29769585
22 1.20460829 4.80000000
23 9.04884793 1.20460829
24 28.79262673 9.04884793
25 32.00000000 28.79262673
26 31.55115207 32.00000000
27 32.04884793 31.55115207
28 26.29769585 32.04884793
29 28.04884793 26.29769585
30 31.80000000 28.04884793
31 27.80000000 31.80000000
32 29.94654378 27.80000000
33 30.80000000 29.94654378
34 29.44884793 30.80000000
35 27.04884793 29.44884793
36 43.79262673 27.04884793
37 33.00000000 43.79262673
38 32.55115207 33.00000000
39 34.04884793 32.55115207
40 27.05345622 34.04884793
41 29.04884793 27.05345622
42 27.80000000 29.04884793
43 28.80000000 27.80000000
44 34.70230415 28.80000000
45 34.80000000 34.70230415
46 28.44884793 34.80000000
47 24.04884793 28.44884793
48 35.79262673 24.04884793
49 9.00000000 35.79262673
50 3.55115207 9.00000000
51 -5.95115207 3.55115207
52 -4.94654378 -5.95115207
53 -13.19539171 -4.94654378
54 -20.20000000 -13.19539171
55 -19.20000000 -20.20000000
56 -27.29769585 -19.20000000
57 -39.20000000 -27.29769585
58 -36.55115207 -39.20000000
59 -38.19539171 -36.55115207
60 -42.20737327 -38.19539171
61 NA -42.20737327
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -60.00000000 -59.96313364
[2,] -53.44884793 -60.00000000
[3,] -52.19539171 -53.44884793
[4,] -45.70230415 -52.19539171
[5,] -43.95115207 -45.70230415
[6,] -42.20000000 -43.95115207
[7,] -36.20000000 -42.20000000
[8,] -36.05345622 -36.20000000
[9,] -31.20000000 -36.05345622
[10,] -22.55115207 -31.20000000
[11,] -21.95115207 -22.55115207
[12,] -6.20737327 -21.95115207
[13,] -14.00000000 -6.20737327
[14,] -14.20460829 -14.00000000
[15,] -7.95115207 -14.20460829
[16,] -2.70230415 -7.95115207
[17,] 0.04884793 -2.70230415
[18,] 2.80000000 0.04884793
[19,] -1.20000000 2.80000000
[20,] -1.29769585 -1.20000000
[21,] 4.80000000 -1.29769585
[22,] 1.20460829 4.80000000
[23,] 9.04884793 1.20460829
[24,] 28.79262673 9.04884793
[25,] 32.00000000 28.79262673
[26,] 31.55115207 32.00000000
[27,] 32.04884793 31.55115207
[28,] 26.29769585 32.04884793
[29,] 28.04884793 26.29769585
[30,] 31.80000000 28.04884793
[31,] 27.80000000 31.80000000
[32,] 29.94654378 27.80000000
[33,] 30.80000000 29.94654378
[34,] 29.44884793 30.80000000
[35,] 27.04884793 29.44884793
[36,] 43.79262673 27.04884793
[37,] 33.00000000 43.79262673
[38,] 32.55115207 33.00000000
[39,] 34.04884793 32.55115207
[40,] 27.05345622 34.04884793
[41,] 29.04884793 27.05345622
[42,] 27.80000000 29.04884793
[43,] 28.80000000 27.80000000
[44,] 34.70230415 28.80000000
[45,] 34.80000000 34.70230415
[46,] 28.44884793 34.80000000
[47,] 24.04884793 28.44884793
[48,] 35.79262673 24.04884793
[49,] 9.00000000 35.79262673
[50,] 3.55115207 9.00000000
[51,] -5.95115207 3.55115207
[52,] -4.94654378 -5.95115207
[53,] -13.19539171 -4.94654378
[54,] -20.20000000 -13.19539171
[55,] -19.20000000 -20.20000000
[56,] -27.29769585 -19.20000000
[57,] -39.20000000 -27.29769585
[58,] -36.55115207 -39.20000000
[59,] -38.19539171 -36.55115207
[60,] -42.20737327 -38.19539171
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -60.00000000 -59.96313364
2 -53.44884793 -60.00000000
3 -52.19539171 -53.44884793
4 -45.70230415 -52.19539171
5 -43.95115207 -45.70230415
6 -42.20000000 -43.95115207
7 -36.20000000 -42.20000000
8 -36.05345622 -36.20000000
9 -31.20000000 -36.05345622
10 -22.55115207 -31.20000000
11 -21.95115207 -22.55115207
12 -6.20737327 -21.95115207
13 -14.00000000 -6.20737327
14 -14.20460829 -14.00000000
15 -7.95115207 -14.20460829
16 -2.70230415 -7.95115207
17 0.04884793 -2.70230415
18 2.80000000 0.04884793
19 -1.20000000 2.80000000
20 -1.29769585 -1.20000000
21 4.80000000 -1.29769585
22 1.20460829 4.80000000
23 9.04884793 1.20460829
24 28.79262673 9.04884793
25 32.00000000 28.79262673
26 31.55115207 32.00000000
27 32.04884793 31.55115207
28 26.29769585 32.04884793
29 28.04884793 26.29769585
30 31.80000000 28.04884793
31 27.80000000 31.80000000
32 29.94654378 27.80000000
33 30.80000000 29.94654378
34 29.44884793 30.80000000
35 27.04884793 29.44884793
36 43.79262673 27.04884793
37 33.00000000 43.79262673
38 32.55115207 33.00000000
39 34.04884793 32.55115207
40 27.05345622 34.04884793
41 29.04884793 27.05345622
42 27.80000000 29.04884793
43 28.80000000 27.80000000
44 34.70230415 28.80000000
45 34.80000000 34.70230415
46 28.44884793 34.80000000
47 24.04884793 28.44884793
48 35.79262673 24.04884793
49 9.00000000 35.79262673
50 3.55115207 9.00000000
51 -5.95115207 3.55115207
52 -4.94654378 -5.95115207
53 -13.19539171 -4.94654378
54 -20.20000000 -13.19539171
55 -19.20000000 -20.20000000
56 -27.29769585 -19.20000000
57 -39.20000000 -27.29769585
58 -36.55115207 -39.20000000
59 -38.19539171 -36.55115207
60 -42.20737327 -38.19539171
> 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/7eqa41195682629.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/8mxmc1195682630.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/99wf31195682630.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/10tinz1195682630.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/11lwuj1195682630.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/120mz01195682631.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/1353ph1195682631.tab")
>
> system("convert tmp/1368h1195682629.ps tmp/1368h1195682629.png")
> system("convert tmp/2f3q81195682629.ps tmp/2f3q81195682629.png")
> system("convert tmp/3lezx1195682629.ps tmp/3lezx1195682629.png")
> system("convert tmp/4rm601195682629.ps tmp/4rm601195682629.png")
> system("convert tmp/5hs7h1195682629.ps tmp/5hs7h1195682629.png")
> system("convert tmp/6q6wn1195682629.ps tmp/6q6wn1195682629.png")
> system("convert tmp/7eqa41195682629.ps tmp/7eqa41195682629.png")
> system("convert tmp/8mxmc1195682630.ps tmp/8mxmc1195682630.png")
> system("convert tmp/99wf31195682630.ps tmp/99wf31195682630.png")
>
>
> proc.time()
user system elapsed
2.241 1.424 2.601