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(1.0137
+ ,89.97
+ ,0.9834
+ ,99.8
+ ,0.9643
+ ,112.99
+ ,0.947
+ ,93.69
+ ,0.906
+ ,108.02
+ ,0.9492
+ ,99.11
+ ,0.9397
+ ,94.33
+ ,0.9041
+ ,83.75
+ ,0.8721
+ ,106.37
+ ,0.8552
+ ,109.63
+ ,0.8564
+ ,105.5
+ ,0.8973
+ ,96.13
+ ,0.9383
+ ,102.48
+ ,0.9217
+ ,101.37
+ ,0.9095
+ ,112.76
+ ,0.892
+ ,95.57
+ ,0.8742
+ ,102.81
+ ,0.8532
+ ,104.13
+ ,0.8607
+ ,97.52
+ ,0.9005
+ ,85.29
+ ,0.9111
+ ,101.01
+ ,0.9059
+ ,108.48
+ ,0.8883
+ ,101.33
+ ,0.8924
+ ,87.57
+ ,0.8833
+ ,97.44
+ ,0.87
+ ,96.06
+ ,0.8758
+ ,106.67
+ ,0.8858
+ ,102.67
+ ,0.917
+ ,104.54
+ ,0.9554
+ ,102.46
+ ,0.9922
+ ,103.35
+ ,0.9778
+ ,83.27
+ ,0.9808
+ ,108.22
+ ,0.9811
+ ,115.23
+ ,1.0014
+ ,103.7
+ ,1.0183
+ ,93.61
+ ,1.0622
+ ,100.25
+ ,1.0773
+ ,100.56
+ ,1.0807
+ ,108.86
+ ,1.0848
+ ,105.43
+ ,1.1582
+ ,104.77
+ ,1.1663
+ ,109.13
+ ,1.1372
+ ,106.13
+ ,1.1139
+ ,82.27
+ ,1.1222
+ ,113.6
+ ,1.1692
+ ,117.73
+ ,1.1702
+ ,104.83
+ ,1.2286
+ ,104.61
+ ,1.2613
+ ,102.93
+ ,1.2646
+ ,106.95
+ ,1.2262
+ ,123.45
+ ,1.1985
+ ,111.99
+ ,1.2007
+ ,103.95
+ ,1.2138
+ ,122.05
+ ,1.2266
+ ,108.04
+ ,1.2176
+ ,93.72
+ ,1.2218
+ ,119.61
+ ,1.249
+ ,118.29
+ ,1.2991
+ ,117.14
+ ,1.3408
+ ,112.76
+ ,1.3119
+ ,105.97
+ ,1.3014
+ ,107.96
+ ,1.3201
+ ,122.27
+ ,1.2938
+ ,114.54
+ ,1.2694
+ ,110.15
+ ,1.2165
+ ,120.02
+ ,1.2037
+ ,103.94
+ ,1.2292
+ ,96.18
+ ,1.2256
+ ,121.01
+ ,1.2015
+ ,110.55
+ ,1.1786
+ ,120.04
+ ,1.1856
+ ,114.19)
+ ,dim=c(2
+ ,72)
+ ,dimnames=list(c('wk'
+ ,'uit')
+ ,1:72))
> y <- array(NA,dim=c(2,72),dimnames=list(c('wk','uit'),1:72))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'First Differences'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '2'
> #'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
(1-B)uit (1-B)wk
1 9.83 -0.0303
2 13.19 -0.0191
3 -19.30 -0.0173
4 14.33 -0.0410
5 -8.91 0.0432
6 -4.78 -0.0095
7 -10.58 -0.0356
8 22.62 -0.0320
9 3.26 -0.0169
10 -4.13 0.0012
11 -9.37 0.0409
12 6.35 0.0410
13 -1.11 -0.0166
14 11.39 -0.0122
15 -17.19 -0.0175
16 7.24 -0.0178
17 1.32 -0.0210
18 -6.61 0.0075
19 -12.23 0.0398
20 15.72 0.0106
21 7.47 -0.0052
22 -7.15 -0.0176
23 -13.76 0.0041
24 9.87 -0.0091
25 -1.38 -0.0133
26 10.61 0.0058
27 -4.00 0.0100
28 1.87 0.0312
29 -2.08 0.0384
30 0.89 0.0368
31 -20.08 -0.0144
32 24.95 0.0030
33 7.01 0.0003
34 -11.53 0.0203
35 -10.09 0.0169
36 6.64 0.0439
37 0.31 0.0151
38 8.30 0.0034
39 -3.43 0.0041
40 -0.66 0.0734
41 4.36 0.0081
42 -3.00 -0.0291
43 -23.86 -0.0233
44 31.33 0.0083
45 4.13 0.0470
46 -12.90 0.0010
47 -0.22 0.0584
48 -1.68 0.0327
49 4.02 0.0033
50 16.50 -0.0384
51 -11.46 -0.0277
52 -8.04 0.0022
53 18.10 0.0131
54 -14.01 0.0128
55 -14.32 -0.0090
56 25.89 0.0042
57 -1.32 0.0272
58 -1.15 0.0501
59 -4.38 0.0417
60 -6.79 -0.0289
61 1.99 -0.0105
62 14.31 0.0187
63 -7.73 -0.0263
64 -4.39 -0.0244
65 9.87 -0.0529
66 -16.08 -0.0128
67 -7.76 0.0255
68 24.83 -0.0036
69 -10.46 -0.0241
70 9.49 -0.0229
71 -5.85 0.0070
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `(1-B)wk`
0.3878 -19.2592
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-24.696 -8.426 -1.184 7.538 31.102
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.3878 1.4248 0.272 0.786
`(1-B)wk` -19.2592 53.3261 -0.361 0.719
Residual standard error: 11.96 on 69 degrees of freedom
Multiple R-Squared: 0.001887, Adjusted R-squared: -0.01258
F-statistic: 0.1304 on 1 and 69 DF, p-value: 0.7191
> postscript(file="/var/www/html/rcomp/tmp/17g6t1199880650.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/203cx1199880650.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/38yip1199880650.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/4o6zd1199880650.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/5ekn71199880650.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 = 71
Frequency = 1
1 2 3 4 5 6
8.8586896 12.4343929 -20.0209404 13.1526158 -8.4657571 -5.3507185
7 8 9 10 11 12
-11.6533843 21.6159489 2.5467632 -4.4946447 -8.9700534 6.7518726
13 14 15 16 17 18
-1.8174590 10.7672816 -17.9147923 6.5094299 0.5278004 -6.8533116
19 20 21 22 23 24
-11.8512385 15.5363920 6.9820962 -7.8767182 -14.0687930 9.3069852
25 26 27 28 29 30
-2.0239035 10.3339477 -4.1951635 2.0831321 -1.7282014 1.2109838
31 32 33 34 35 36
-20.7450887 24.6200219 6.6280220 -11.5267935 -10.1522748 7.0977243
37 38 39 40 41 42
0.2130586 7.9777256 -3.7387930 0.3658716 4.1282440 -3.9481993
43 44 45 46 47 48
-24.6964958 31.1020958 4.6474279 -13.2684966 0.5169831 -1.4379790
49 50 51 52 53 54
3.6957997 15.3726898 -12.3812364 -8.3853855 17.9645401 -14.1512377
55 56 57 58 59 60
-14.8810888 25.5831330 -1.1839048 -0.5728685 -3.9646460 -7.7343475
61 62 63 64 65 66
1.4000223 14.2823918 -8.6242735 -5.2476810 8.4634310 -16.7142739
67 68 69 70 71
-7.6566455 24.3729110 -11.3119032 8.6612079 -6.1029412
> postscript(file="/var/www/html/rcomp/tmp/63qfy1199880650.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 = 71
Frequency = 1
lag(myerror, k = 1) myerror
0 8.8586896 NA
1 12.4343929 8.8586896
2 -20.0209404 12.4343929
3 13.1526158 -20.0209404
4 -8.4657571 13.1526158
5 -5.3507185 -8.4657571
6 -11.6533843 -5.3507185
7 21.6159489 -11.6533843
8 2.5467632 21.6159489
9 -4.4946447 2.5467632
10 -8.9700534 -4.4946447
11 6.7518726 -8.9700534
12 -1.8174590 6.7518726
13 10.7672816 -1.8174590
14 -17.9147923 10.7672816
15 6.5094299 -17.9147923
16 0.5278004 6.5094299
17 -6.8533116 0.5278004
18 -11.8512385 -6.8533116
19 15.5363920 -11.8512385
20 6.9820962 15.5363920
21 -7.8767182 6.9820962
22 -14.0687930 -7.8767182
23 9.3069852 -14.0687930
24 -2.0239035 9.3069852
25 10.3339477 -2.0239035
26 -4.1951635 10.3339477
27 2.0831321 -4.1951635
28 -1.7282014 2.0831321
29 1.2109838 -1.7282014
30 -20.7450887 1.2109838
31 24.6200219 -20.7450887
32 6.6280220 24.6200219
33 -11.5267935 6.6280220
34 -10.1522748 -11.5267935
35 7.0977243 -10.1522748
36 0.2130586 7.0977243
37 7.9777256 0.2130586
38 -3.7387930 7.9777256
39 0.3658716 -3.7387930
40 4.1282440 0.3658716
41 -3.9481993 4.1282440
42 -24.6964958 -3.9481993
43 31.1020958 -24.6964958
44 4.6474279 31.1020958
45 -13.2684966 4.6474279
46 0.5169831 -13.2684966
47 -1.4379790 0.5169831
48 3.6957997 -1.4379790
49 15.3726898 3.6957997
50 -12.3812364 15.3726898
51 -8.3853855 -12.3812364
52 17.9645401 -8.3853855
53 -14.1512377 17.9645401
54 -14.8810888 -14.1512377
55 25.5831330 -14.8810888
56 -1.1839048 25.5831330
57 -0.5728685 -1.1839048
58 -3.9646460 -0.5728685
59 -7.7343475 -3.9646460
60 1.4000223 -7.7343475
61 14.2823918 1.4000223
62 -8.6242735 14.2823918
63 -5.2476810 -8.6242735
64 8.4634310 -5.2476810
65 -16.7142739 8.4634310
66 -7.6566455 -16.7142739
67 24.3729110 -7.6566455
68 -11.3119032 24.3729110
69 8.6612079 -11.3119032
70 -6.1029412 8.6612079
71 NA -6.1029412
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 12.4343929 8.8586896
[2,] -20.0209404 12.4343929
[3,] 13.1526158 -20.0209404
[4,] -8.4657571 13.1526158
[5,] -5.3507185 -8.4657571
[6,] -11.6533843 -5.3507185
[7,] 21.6159489 -11.6533843
[8,] 2.5467632 21.6159489
[9,] -4.4946447 2.5467632
[10,] -8.9700534 -4.4946447
[11,] 6.7518726 -8.9700534
[12,] -1.8174590 6.7518726
[13,] 10.7672816 -1.8174590
[14,] -17.9147923 10.7672816
[15,] 6.5094299 -17.9147923
[16,] 0.5278004 6.5094299
[17,] -6.8533116 0.5278004
[18,] -11.8512385 -6.8533116
[19,] 15.5363920 -11.8512385
[20,] 6.9820962 15.5363920
[21,] -7.8767182 6.9820962
[22,] -14.0687930 -7.8767182
[23,] 9.3069852 -14.0687930
[24,] -2.0239035 9.3069852
[25,] 10.3339477 -2.0239035
[26,] -4.1951635 10.3339477
[27,] 2.0831321 -4.1951635
[28,] -1.7282014 2.0831321
[29,] 1.2109838 -1.7282014
[30,] -20.7450887 1.2109838
[31,] 24.6200219 -20.7450887
[32,] 6.6280220 24.6200219
[33,] -11.5267935 6.6280220
[34,] -10.1522748 -11.5267935
[35,] 7.0977243 -10.1522748
[36,] 0.2130586 7.0977243
[37,] 7.9777256 0.2130586
[38,] -3.7387930 7.9777256
[39,] 0.3658716 -3.7387930
[40,] 4.1282440 0.3658716
[41,] -3.9481993 4.1282440
[42,] -24.6964958 -3.9481993
[43,] 31.1020958 -24.6964958
[44,] 4.6474279 31.1020958
[45,] -13.2684966 4.6474279
[46,] 0.5169831 -13.2684966
[47,] -1.4379790 0.5169831
[48,] 3.6957997 -1.4379790
[49,] 15.3726898 3.6957997
[50,] -12.3812364 15.3726898
[51,] -8.3853855 -12.3812364
[52,] 17.9645401 -8.3853855
[53,] -14.1512377 17.9645401
[54,] -14.8810888 -14.1512377
[55,] 25.5831330 -14.8810888
[56,] -1.1839048 25.5831330
[57,] -0.5728685 -1.1839048
[58,] -3.9646460 -0.5728685
[59,] -7.7343475 -3.9646460
[60,] 1.4000223 -7.7343475
[61,] 14.2823918 1.4000223
[62,] -8.6242735 14.2823918
[63,] -5.2476810 -8.6242735
[64,] 8.4634310 -5.2476810
[65,] -16.7142739 8.4634310
[66,] -7.6566455 -16.7142739
[67,] 24.3729110 -7.6566455
[68,] -11.3119032 24.3729110
[69,] 8.6612079 -11.3119032
[70,] -6.1029412 8.6612079
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 12.4343929 8.8586896
2 -20.0209404 12.4343929
3 13.1526158 -20.0209404
4 -8.4657571 13.1526158
5 -5.3507185 -8.4657571
6 -11.6533843 -5.3507185
7 21.6159489 -11.6533843
8 2.5467632 21.6159489
9 -4.4946447 2.5467632
10 -8.9700534 -4.4946447
11 6.7518726 -8.9700534
12 -1.8174590 6.7518726
13 10.7672816 -1.8174590
14 -17.9147923 10.7672816
15 6.5094299 -17.9147923
16 0.5278004 6.5094299
17 -6.8533116 0.5278004
18 -11.8512385 -6.8533116
19 15.5363920 -11.8512385
20 6.9820962 15.5363920
21 -7.8767182 6.9820962
22 -14.0687930 -7.8767182
23 9.3069852 -14.0687930
24 -2.0239035 9.3069852
25 10.3339477 -2.0239035
26 -4.1951635 10.3339477
27 2.0831321 -4.1951635
28 -1.7282014 2.0831321
29 1.2109838 -1.7282014
30 -20.7450887 1.2109838
31 24.6200219 -20.7450887
32 6.6280220 24.6200219
33 -11.5267935 6.6280220
34 -10.1522748 -11.5267935
35 7.0977243 -10.1522748
36 0.2130586 7.0977243
37 7.9777256 0.2130586
38 -3.7387930 7.9777256
39 0.3658716 -3.7387930
40 4.1282440 0.3658716
41 -3.9481993 4.1282440
42 -24.6964958 -3.9481993
43 31.1020958 -24.6964958
44 4.6474279 31.1020958
45 -13.2684966 4.6474279
46 0.5169831 -13.2684966
47 -1.4379790 0.5169831
48 3.6957997 -1.4379790
49 15.3726898 3.6957997
50 -12.3812364 15.3726898
51 -8.3853855 -12.3812364
52 17.9645401 -8.3853855
53 -14.1512377 17.9645401
54 -14.8810888 -14.1512377
55 25.5831330 -14.8810888
56 -1.1839048 25.5831330
57 -0.5728685 -1.1839048
58 -3.9646460 -0.5728685
59 -7.7343475 -3.9646460
60 1.4000223 -7.7343475
61 14.2823918 1.4000223
62 -8.6242735 14.2823918
63 -5.2476810 -8.6242735
64 8.4634310 -5.2476810
65 -16.7142739 8.4634310
66 -7.6566455 -16.7142739
67 24.3729110 -7.6566455
68 -11.3119032 24.3729110
69 8.6612079 -11.3119032
70 -6.1029412 8.6612079
> 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/7j6fn1199880650.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/88uae1199880650.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/9ux5m1199880650.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/103oox1199880650.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/11hzk01199880650.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/12hxow1199880651.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/13atnx1199880651.tab")
>
> system("convert tmp/17g6t1199880650.ps tmp/17g6t1199880650.png")
> system("convert tmp/203cx1199880650.ps tmp/203cx1199880650.png")
> system("convert tmp/38yip1199880650.ps tmp/38yip1199880650.png")
> system("convert tmp/4o6zd1199880650.ps tmp/4o6zd1199880650.png")
> system("convert tmp/5ekn71199880650.ps tmp/5ekn71199880650.png")
> system("convert tmp/63qfy1199880650.ps tmp/63qfy1199880650.png")
> system("convert tmp/7j6fn1199880650.ps tmp/7j6fn1199880650.png")
> system("convert tmp/88uae1199880650.ps tmp/88uae1199880650.png")
> system("convert tmp/9ux5m1199880650.ps tmp/9ux5m1199880650.png")
>
>
> proc.time()
user system elapsed
2.288 1.473 3.775