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(1178,0,2141,0,2238,0,2685,0,4341,0,5376,0,4478,0,6404,0,4617,0,3024,0,1897,0,2075,0,1351,0,2211,1,2453,1,3042,1,4765,1,4992,1,4601,1,6266,1,4812,1,3159,1,1916,1,2237,1,1595,1,2453,1,2226,1,3597,1,4706,1,4974,1,5756,1,5493,1,5004,1,3225,1,2006,1,2291,1,1588,1,2105,1,2191,1,3591,1,4668,1,4885,1,5822,1,5599,1,5340,1,3082,1,2010,1,2301,1,1514,1,1979,1,2480,1,3499,1,4676,1,5585,1,5610,1,5796,1,6199,1,3030,1,1930,1,2552,1),dim=c(2,60),dimnames=list(c('HuwelijkenBelgië','WetHomohuwelijken
'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('HuwelijkenBelgië','WetHomohuwelijken
'),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
HuwelijkenBelgi\353 WetHomohuwelijken\r M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 1178 0 1 0 0 0 0 0 0 0 0 0 0
2 2141 0 0 1 0 0 0 0 0 0 0 0 0
3 2238 0 0 0 1 0 0 0 0 0 0 0 0
4 2685 0 0 0 0 1 0 0 0 0 0 0 0
5 4341 0 0 0 0 0 1 0 0 0 0 0 0
6 5376 0 0 0 0 0 0 1 0 0 0 0 0
7 4478 0 0 0 0 0 0 0 1 0 0 0 0
8 6404 0 0 0 0 0 0 0 0 1 0 0 0
9 4617 0 0 0 0 0 0 0 0 0 1 0 0
10 3024 0 0 0 0 0 0 0 0 0 0 1 0
11 1897 0 0 0 0 0 0 0 0 0 0 0 1
12 2075 0 0 0 0 0 0 0 0 0 0 0 0
13 1351 0 1 0 0 0 0 0 0 0 0 0 0
14 2211 1 0 1 0 0 0 0 0 0 0 0 0
15 2453 1 0 0 1 0 0 0 0 0 0 0 0
16 3042 1 0 0 0 1 0 0 0 0 0 0 0
17 4765 1 0 0 0 0 1 0 0 0 0 0 0
18 4992 1 0 0 0 0 0 1 0 0 0 0 0
19 4601 1 0 0 0 0 0 0 1 0 0 0 0
20 6266 1 0 0 0 0 0 0 0 1 0 0 0
21 4812 1 0 0 0 0 0 0 0 0 1 0 0
22 3159 1 0 0 0 0 0 0 0 0 0 1 0
23 1916 1 0 0 0 0 0 0 0 0 0 0 1
24 2237 1 0 0 0 0 0 0 0 0 0 0 0
25 1595 1 1 0 0 0 0 0 0 0 0 0 0
26 2453 1 0 1 0 0 0 0 0 0 0 0 0
27 2226 1 0 0 1 0 0 0 0 0 0 0 0
28 3597 1 0 0 0 1 0 0 0 0 0 0 0
29 4706 1 0 0 0 0 1 0 0 0 0 0 0
30 4974 1 0 0 0 0 0 1 0 0 0 0 0
31 5756 1 0 0 0 0 0 0 1 0 0 0 0
32 5493 1 0 0 0 0 0 0 0 1 0 0 0
33 5004 1 0 0 0 0 0 0 0 0 1 0 0
34 3225 1 0 0 0 0 0 0 0 0 0 1 0
35 2006 1 0 0 0 0 0 0 0 0 0 0 1
36 2291 1 0 0 0 0 0 0 0 0 0 0 0
37 1588 1 1 0 0 0 0 0 0 0 0 0 0
38 2105 1 0 1 0 0 0 0 0 0 0 0 0
39 2191 1 0 0 1 0 0 0 0 0 0 0 0
40 3591 1 0 0 0 1 0 0 0 0 0 0 0
41 4668 1 0 0 0 0 1 0 0 0 0 0 0
42 4885 1 0 0 0 0 0 1 0 0 0 0 0
43 5822 1 0 0 0 0 0 0 1 0 0 0 0
44 5599 1 0 0 0 0 0 0 0 1 0 0 0
45 5340 1 0 0 0 0 0 0 0 0 1 0 0
46 3082 1 0 0 0 0 0 0 0 0 0 1 0
47 2010 1 0 0 0 0 0 0 0 0 0 0 1
48 2301 1 0 0 0 0 0 0 0 0 0 0 0
49 1514 1 1 0 0 0 0 0 0 0 0 0 0
50 1979 1 0 1 0 0 0 0 0 0 0 0 0
51 2480 1 0 0 1 0 0 0 0 0 0 0 0
52 3499 1 0 0 0 1 0 0 0 0 0 0 0
53 4676 1 0 0 0 0 1 0 0 0 0 0 0
54 5585 1 0 0 0 0 0 1 0 0 0 0 0
55 5610 1 0 0 0 0 0 0 1 0 0 0 0
56 5796 1 0 0 0 0 0 0 0 1 0 0 0
57 6199 1 0 0 0 0 0 0 0 0 1 0 0
58 3030 1 0 0 0 0 0 0 0 0 0 1 0
59 1930 1 0 0 0 0 0 0 0 0 0 0 1
60 2552 1 0 0 0 0 0 0 0 0 0 0 0
t
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
51 51
52 52
53 53
54 54
55 55
56 56
57 57
58 58
59 59
60 60
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `WetHomohuwelijken\r` M1
2028.025 51.143 -767.858
M2 M3 M4
-51.661 81.965 1040.991
M5 M6 M7
2383.217 2908.243 2993.070
M8 M9 M10
3645.096 2921.722 825.148
M11 t
-333.226 6.174
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-588.542 -177.757 6.828 130.579 846.198
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2028.025 169.093 11.994 9.24e-16 ***
`WetHomohuwelijken\r` 51.143 145.622 0.351 0.727041
M1 -767.858 203.366 -3.776 0.000456 ***
M2 -51.661 204.626 -0.252 0.801806
M3 81.965 204.055 0.402 0.689779
M4 1040.991 203.543 5.114 5.98e-06 ***
M5 2383.217 203.091 11.735 1.98e-15 ***
M6 2908.243 202.698 14.348 < 2e-16 ***
M7 2993.070 202.364 14.791 < 2e-16 ***
M8 3645.096 202.091 18.037 < 2e-16 ***
M9 2921.722 201.879 14.473 < 2e-16 ***
M10 825.148 201.727 4.090 0.000172 ***
M11 -333.226 201.635 -1.653 0.105219
t 6.174 3.503 1.762 0.084645 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 318.8 on 46 degrees of freedom
Multiple R-Squared: 0.967, Adjusted R-squared: 0.9576
F-statistic: 103.6 on 13 and 46 DF, p-value: < 2.2e-16
> postscript(file="/var/www/html/rcomp/tmp/1yacm1195415902.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/22wlz1195415902.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/3xoj01195415902.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/4zunb1195415902.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/5itt81195415902.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
-88.340522 152.288000 109.488000 -408.712000 -101.112000 402.688000
7 8 9 10 11 12
-586.312000 681.488000 -388.312000 109.088000 134.288000 -27.112000
13 14 15 16 17 18
10.572522 97.058435 199.258435 -176.941565 197.658435 -106.541565
19 20 21 22 23 24
-588.541565 418.258435 -318.541565 118.858435 28.058435 9.658435
25 26 27 28 29 30
129.342957 264.971478 -101.828522 303.971478 64.571478 -198.628522
31 32 33 34 35 36
492.371478 -428.828522 -200.628522 110.771478 43.971478 -10.428522
37 38 39 40 41 42
48.256000 -157.115478 -210.915478 223.884522 -47.515478 -361.715478
43 44 45 46 47 48
484.284522 -396.915478 61.284522 -106.315478 -26.115478 -74.515478
49 50 51 52 53 54
-99.830957 -357.202435 3.997565 57.797565 -113.602435 264.197565
55 56 57 58 59 60
198.197565 -274.002435 846.197565 -232.402435 -180.202435 102.397565
> postscript(file="/var/www/html/rcomp/tmp/6e6271195415902.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 -88.340522 NA
1 152.288000 -88.340522
2 109.488000 152.288000
3 -408.712000 109.488000
4 -101.112000 -408.712000
5 402.688000 -101.112000
6 -586.312000 402.688000
7 681.488000 -586.312000
8 -388.312000 681.488000
9 109.088000 -388.312000
10 134.288000 109.088000
11 -27.112000 134.288000
12 10.572522 -27.112000
13 97.058435 10.572522
14 199.258435 97.058435
15 -176.941565 199.258435
16 197.658435 -176.941565
17 -106.541565 197.658435
18 -588.541565 -106.541565
19 418.258435 -588.541565
20 -318.541565 418.258435
21 118.858435 -318.541565
22 28.058435 118.858435
23 9.658435 28.058435
24 129.342957 9.658435
25 264.971478 129.342957
26 -101.828522 264.971478
27 303.971478 -101.828522
28 64.571478 303.971478
29 -198.628522 64.571478
30 492.371478 -198.628522
31 -428.828522 492.371478
32 -200.628522 -428.828522
33 110.771478 -200.628522
34 43.971478 110.771478
35 -10.428522 43.971478
36 48.256000 -10.428522
37 -157.115478 48.256000
38 -210.915478 -157.115478
39 223.884522 -210.915478
40 -47.515478 223.884522
41 -361.715478 -47.515478
42 484.284522 -361.715478
43 -396.915478 484.284522
44 61.284522 -396.915478
45 -106.315478 61.284522
46 -26.115478 -106.315478
47 -74.515478 -26.115478
48 -99.830957 -74.515478
49 -357.202435 -99.830957
50 3.997565 -357.202435
51 57.797565 3.997565
52 -113.602435 57.797565
53 264.197565 -113.602435
54 198.197565 264.197565
55 -274.002435 198.197565
56 846.197565 -274.002435
57 -232.402435 846.197565
58 -180.202435 -232.402435
59 102.397565 -180.202435
60 NA 102.397565
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 152.288000 -88.340522
[2,] 109.488000 152.288000
[3,] -408.712000 109.488000
[4,] -101.112000 -408.712000
[5,] 402.688000 -101.112000
[6,] -586.312000 402.688000
[7,] 681.488000 -586.312000
[8,] -388.312000 681.488000
[9,] 109.088000 -388.312000
[10,] 134.288000 109.088000
[11,] -27.112000 134.288000
[12,] 10.572522 -27.112000
[13,] 97.058435 10.572522
[14,] 199.258435 97.058435
[15,] -176.941565 199.258435
[16,] 197.658435 -176.941565
[17,] -106.541565 197.658435
[18,] -588.541565 -106.541565
[19,] 418.258435 -588.541565
[20,] -318.541565 418.258435
[21,] 118.858435 -318.541565
[22,] 28.058435 118.858435
[23,] 9.658435 28.058435
[24,] 129.342957 9.658435
[25,] 264.971478 129.342957
[26,] -101.828522 264.971478
[27,] 303.971478 -101.828522
[28,] 64.571478 303.971478
[29,] -198.628522 64.571478
[30,] 492.371478 -198.628522
[31,] -428.828522 492.371478
[32,] -200.628522 -428.828522
[33,] 110.771478 -200.628522
[34,] 43.971478 110.771478
[35,] -10.428522 43.971478
[36,] 48.256000 -10.428522
[37,] -157.115478 48.256000
[38,] -210.915478 -157.115478
[39,] 223.884522 -210.915478
[40,] -47.515478 223.884522
[41,] -361.715478 -47.515478
[42,] 484.284522 -361.715478
[43,] -396.915478 484.284522
[44,] 61.284522 -396.915478
[45,] -106.315478 61.284522
[46,] -26.115478 -106.315478
[47,] -74.515478 -26.115478
[48,] -99.830957 -74.515478
[49,] -357.202435 -99.830957
[50,] 3.997565 -357.202435
[51,] 57.797565 3.997565
[52,] -113.602435 57.797565
[53,] 264.197565 -113.602435
[54,] 198.197565 264.197565
[55,] -274.002435 198.197565
[56,] 846.197565 -274.002435
[57,] -232.402435 846.197565
[58,] -180.202435 -232.402435
[59,] 102.397565 -180.202435
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 152.288000 -88.340522
2 109.488000 152.288000
3 -408.712000 109.488000
4 -101.112000 -408.712000
5 402.688000 -101.112000
6 -586.312000 402.688000
7 681.488000 -586.312000
8 -388.312000 681.488000
9 109.088000 -388.312000
10 134.288000 109.088000
11 -27.112000 134.288000
12 10.572522 -27.112000
13 97.058435 10.572522
14 199.258435 97.058435
15 -176.941565 199.258435
16 197.658435 -176.941565
17 -106.541565 197.658435
18 -588.541565 -106.541565
19 418.258435 -588.541565
20 -318.541565 418.258435
21 118.858435 -318.541565
22 28.058435 118.858435
23 9.658435 28.058435
24 129.342957 9.658435
25 264.971478 129.342957
26 -101.828522 264.971478
27 303.971478 -101.828522
28 64.571478 303.971478
29 -198.628522 64.571478
30 492.371478 -198.628522
31 -428.828522 492.371478
32 -200.628522 -428.828522
33 110.771478 -200.628522
34 43.971478 110.771478
35 -10.428522 43.971478
36 48.256000 -10.428522
37 -157.115478 48.256000
38 -210.915478 -157.115478
39 223.884522 -210.915478
40 -47.515478 223.884522
41 -361.715478 -47.515478
42 484.284522 -361.715478
43 -396.915478 484.284522
44 61.284522 -396.915478
45 -106.315478 61.284522
46 -26.115478 -106.315478
47 -74.515478 -26.115478
48 -99.830957 -74.515478
49 -357.202435 -99.830957
50 3.997565 -357.202435
51 57.797565 3.997565
52 -113.602435 57.797565
53 264.197565 -113.602435
54 198.197565 264.197565
55 -274.002435 198.197565
56 846.197565 -274.002435
57 -232.402435 846.197565
58 -180.202435 -232.402435
59 102.397565 -180.202435
> 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/7dkwh1195415902.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/8dmt31195415902.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/9rjig1195415902.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/10g8dx1195415902.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/117vfn1195415902.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/126pe41195415903.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/13dcz31195415903.tab")
>
> system("convert tmp/1yacm1195415902.ps tmp/1yacm1195415902.png")
> system("convert tmp/22wlz1195415902.ps tmp/22wlz1195415902.png")
> system("convert tmp/3xoj01195415902.ps tmp/3xoj01195415902.png")
> system("convert tmp/4zunb1195415902.ps tmp/4zunb1195415902.png")
> system("convert tmp/5itt81195415902.ps tmp/5itt81195415902.png")
> system("convert tmp/6e6271195415902.ps tmp/6e6271195415902.png")
> system("convert tmp/7dkwh1195415902.ps tmp/7dkwh1195415902.png")
> system("convert tmp/8dmt31195415902.ps tmp/8dmt31195415902.png")
> system("convert tmp/9rjig1195415902.ps tmp/9rjig1195415902.png")
>
>
> proc.time()
user system elapsed
2.274 1.464 2.729