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(8.1,359,8.3,304.6,8.2,297.7,8.1,303.3,7.7,304.7,7.6,331.3,7.7,318.8,8.2,306.8,8.4,331.1,8.4,284.1,8.6,259.7,8.4,335.8,8.5,338.5,8.7,310.3,8.7,322.1,8.6,289.3,7.4,300.8,7.3,360.6,7.4,327.3,9,304.1,9.2,362,9.2,287.8,8.5,286.1,8.3,358.2,8.3,346,8.6,329.9,8.6,334.3,8.5,303.7,8.1,307.6,8.1,351.7,8,324.6,8.6,311.9,8.7,361.5,8.7,271.1,8.6,286.5,8.4,352.8,8.4,322.4,8.7,335,8.7,322.2,8.5,313.6,8.3,323.3,8.3,379.1,8.3,315.6,8.1,353.6,8.2,371.7,8.1,282.9,8.1,298.8,7.9,361.8,7.7,365.9,8.1,357.6,8,335.4,7.7,340.1,7.8,337.8,7.6,389.6,7.4,342.5,7.7,354.6,7.8,391.6,7.5,317.7,7.2,312.8,7,356.2),dim=c(2,60),dimnames=list(c('Y','X'),1:60))
> y <- array(NA,dim=c(2,60),dimnames=list(c('Y','X'),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 = '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
X Y M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 359.0 8.1 1 0 0 0 0 0 0 0 0 0 0 1
2 304.6 8.3 0 1 0 0 0 0 0 0 0 0 0 2
3 297.7 8.2 0 0 1 0 0 0 0 0 0 0 0 3
4 303.3 8.1 0 0 0 1 0 0 0 0 0 0 0 4
5 304.7 7.7 0 0 0 0 1 0 0 0 0 0 0 5
6 331.3 7.6 0 0 0 0 0 1 0 0 0 0 0 6
7 318.8 7.7 0 0 0 0 0 0 1 0 0 0 0 7
8 306.8 8.2 0 0 0 0 0 0 0 1 0 0 0 8
9 331.1 8.4 0 0 0 0 0 0 0 0 1 0 0 9
10 284.1 8.4 0 0 0 0 0 0 0 0 0 1 0 10
11 259.7 8.6 0 0 0 0 0 0 0 0 0 0 1 11
12 335.8 8.4 0 0 0 0 0 0 0 0 0 0 0 12
13 338.5 8.5 1 0 0 0 0 0 0 0 0 0 0 13
14 310.3 8.7 0 1 0 0 0 0 0 0 0 0 0 14
15 322.1 8.7 0 0 1 0 0 0 0 0 0 0 0 15
16 289.3 8.6 0 0 0 1 0 0 0 0 0 0 0 16
17 300.8 7.4 0 0 0 0 1 0 0 0 0 0 0 17
18 360.6 7.3 0 0 0 0 0 1 0 0 0 0 0 18
19 327.3 7.4 0 0 0 0 0 0 1 0 0 0 0 19
20 304.1 9.0 0 0 0 0 0 0 0 1 0 0 0 20
21 362.0 9.2 0 0 0 0 0 0 0 0 1 0 0 21
22 287.8 9.2 0 0 0 0 0 0 0 0 0 1 0 22
23 286.1 8.5 0 0 0 0 0 0 0 0 0 0 1 23
24 358.2 8.3 0 0 0 0 0 0 0 0 0 0 0 24
25 346.0 8.3 1 0 0 0 0 0 0 0 0 0 0 25
26 329.9 8.6 0 1 0 0 0 0 0 0 0 0 0 26
27 334.3 8.6 0 0 1 0 0 0 0 0 0 0 0 27
28 303.7 8.5 0 0 0 1 0 0 0 0 0 0 0 28
29 307.6 8.1 0 0 0 0 1 0 0 0 0 0 0 29
30 351.7 8.1 0 0 0 0 0 1 0 0 0 0 0 30
31 324.6 8.0 0 0 0 0 0 0 1 0 0 0 0 31
32 311.9 8.6 0 0 0 0 0 0 0 1 0 0 0 32
33 361.5 8.7 0 0 0 0 0 0 0 0 1 0 0 33
34 271.1 8.7 0 0 0 0 0 0 0 0 0 1 0 34
35 286.5 8.6 0 0 0 0 0 0 0 0 0 0 1 35
36 352.8 8.4 0 0 0 0 0 0 0 0 0 0 0 36
37 322.4 8.4 1 0 0 0 0 0 0 0 0 0 0 37
38 335.0 8.7 0 1 0 0 0 0 0 0 0 0 0 38
39 322.2 8.7 0 0 1 0 0 0 0 0 0 0 0 39
40 313.6 8.5 0 0 0 1 0 0 0 0 0 0 0 40
41 323.3 8.3 0 0 0 0 1 0 0 0 0 0 0 41
42 379.1 8.3 0 0 0 0 0 1 0 0 0 0 0 42
43 315.6 8.3 0 0 0 0 0 0 1 0 0 0 0 43
44 353.6 8.1 0 0 0 0 0 0 0 1 0 0 0 44
45 371.7 8.2 0 0 0 0 0 0 0 0 1 0 0 45
46 282.9 8.1 0 0 0 0 0 0 0 0 0 1 0 46
47 298.8 8.1 0 0 0 0 0 0 0 0 0 0 1 47
48 361.8 7.9 0 0 0 0 0 0 0 0 0 0 0 48
49 365.9 7.7 1 0 0 0 0 0 0 0 0 0 0 49
50 357.6 8.1 0 1 0 0 0 0 0 0 0 0 0 50
51 335.4 8.0 0 0 1 0 0 0 0 0 0 0 0 51
52 340.1 7.7 0 0 0 1 0 0 0 0 0 0 0 52
53 337.8 7.8 0 0 0 0 1 0 0 0 0 0 0 53
54 389.6 7.6 0 0 0 0 0 1 0 0 0 0 0 54
55 342.5 7.4 0 0 0 0 0 0 1 0 0 0 0 55
56 354.6 7.7 0 0 0 0 0 0 0 1 0 0 0 56
57 391.6 7.8 0 0 0 0 0 0 0 0 1 0 0 57
58 317.7 7.5 0 0 0 0 0 0 0 0 0 1 0 58
59 312.8 7.2 0 0 0 0 0 0 0 0 0 0 1 59
60 356.2 7.0 0 0 0 0 0 0 0 0 0 0 0 60
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Y M1 M2 M3 M4
389.1559 -7.5256 2.2411 -15.1986 -21.3065 -35.5175
M5 M6 M7 M8 M9 M10
-34.5052 11.8458 -25.6716 -21.6842 16.0825 -60.0465
M11 t
-62.0080 0.6669
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-30.4578 -7.6983 0.6882 7.6175 27.8933
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 389.15593 34.92917 11.141 1.17e-14 ***
Y -7.52559 4.11976 -1.827 0.07424 .
M1 2.24114 7.65788 0.293 0.77110
M2 -15.19861 7.79966 -1.949 0.05746 .
M3 -21.30654 7.76483 -2.744 0.00863 **
M4 -35.51755 7.66301 -4.635 2.96e-05 ***
M5 -34.50521 7.65562 -4.507 4.50e-05 ***
M6 11.84584 7.68626 1.541 0.13013
M7 -25.67159 7.68688 -3.340 0.00167 **
M8 -21.68417 7.67886 -2.824 0.00699 **
M9 16.08250 7.79214 2.064 0.04469 *
M10 -60.04645 7.72829 -7.770 6.48e-10 ***
M11 -62.00797 7.62264 -8.135 1.87e-10 ***
t 0.66691 0.09915 6.727 2.35e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 11.99 on 46 degrees of freedom
Multiple R-Squared: 0.872, Adjusted R-squared: 0.8358
F-statistic: 24.11 on 13 and 46 DF, p-value: 3.124e-16
> postscript(file="/var/www/html/rcomp/tmp/1f79t1198006942.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/2ne941198006942.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/32spc1198006942.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/4n7yr1198006942.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/5otbm1198006943.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
27.89330709 -8.22874016 -10.44027559 7.95125984 4.66177165 -16.50874016
7 8 9 10 11 12
8.59433071 -4.29720472 -16.92566929 11.53637795 -10.06389764 1.85610236
13 14 15 16 17 18
2.40061024 -7.52143701 9.71958661 -10.28887795 -9.49883858 2.53064961
19 20 21 22 23 24
6.83372047 -8.97966535 11.99187008 13.25391732 7.58061024 15.50061024
25 26 27 28 29 30
0.39255906 3.32307087 13.16409449 -4.64437008 -5.43385827 -8.35181102
31 32 33 34 35 36
0.64614173 -12.19283465 -0.27385827 -15.21181102 0.73023622 2.85023622
37 38 39 40 41 42
-30.45781496 1.17269685 -6.18627953 -2.74730315 3.76832677 12.55037402
43 44 45 46 47 48
-14.09911417 17.74143701 -1.83958661 -15.93009843 1.26450787 0.08450787
49 50 51 52 53 54
-0.22866142 11.25440945 -6.25712598 9.72929134 6.50259843 9.77952756
55 56 57 58 59 60
-1.97507874 7.72826772 7.04724409 6.35161417 0.48854331 -20.29145669
> postscript(file="/var/www/html/rcomp/tmp/6z8w61198006943.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 27.89330709 NA
1 -8.22874016 27.89330709
2 -10.44027559 -8.22874016
3 7.95125984 -10.44027559
4 4.66177165 7.95125984
5 -16.50874016 4.66177165
6 8.59433071 -16.50874016
7 -4.29720472 8.59433071
8 -16.92566929 -4.29720472
9 11.53637795 -16.92566929
10 -10.06389764 11.53637795
11 1.85610236 -10.06389764
12 2.40061024 1.85610236
13 -7.52143701 2.40061024
14 9.71958661 -7.52143701
15 -10.28887795 9.71958661
16 -9.49883858 -10.28887795
17 2.53064961 -9.49883858
18 6.83372047 2.53064961
19 -8.97966535 6.83372047
20 11.99187008 -8.97966535
21 13.25391732 11.99187008
22 7.58061024 13.25391732
23 15.50061024 7.58061024
24 0.39255906 15.50061024
25 3.32307087 0.39255906
26 13.16409449 3.32307087
27 -4.64437008 13.16409449
28 -5.43385827 -4.64437008
29 -8.35181102 -5.43385827
30 0.64614173 -8.35181102
31 -12.19283465 0.64614173
32 -0.27385827 -12.19283465
33 -15.21181102 -0.27385827
34 0.73023622 -15.21181102
35 2.85023622 0.73023622
36 -30.45781496 2.85023622
37 1.17269685 -30.45781496
38 -6.18627953 1.17269685
39 -2.74730315 -6.18627953
40 3.76832677 -2.74730315
41 12.55037402 3.76832677
42 -14.09911417 12.55037402
43 17.74143701 -14.09911417
44 -1.83958661 17.74143701
45 -15.93009843 -1.83958661
46 1.26450787 -15.93009843
47 0.08450787 1.26450787
48 -0.22866142 0.08450787
49 11.25440945 -0.22866142
50 -6.25712598 11.25440945
51 9.72929134 -6.25712598
52 6.50259843 9.72929134
53 9.77952756 6.50259843
54 -1.97507874 9.77952756
55 7.72826772 -1.97507874
56 7.04724409 7.72826772
57 6.35161417 7.04724409
58 0.48854331 6.35161417
59 -20.29145669 0.48854331
60 NA -20.29145669
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -8.22874016 27.89330709
[2,] -10.44027559 -8.22874016
[3,] 7.95125984 -10.44027559
[4,] 4.66177165 7.95125984
[5,] -16.50874016 4.66177165
[6,] 8.59433071 -16.50874016
[7,] -4.29720472 8.59433071
[8,] -16.92566929 -4.29720472
[9,] 11.53637795 -16.92566929
[10,] -10.06389764 11.53637795
[11,] 1.85610236 -10.06389764
[12,] 2.40061024 1.85610236
[13,] -7.52143701 2.40061024
[14,] 9.71958661 -7.52143701
[15,] -10.28887795 9.71958661
[16,] -9.49883858 -10.28887795
[17,] 2.53064961 -9.49883858
[18,] 6.83372047 2.53064961
[19,] -8.97966535 6.83372047
[20,] 11.99187008 -8.97966535
[21,] 13.25391732 11.99187008
[22,] 7.58061024 13.25391732
[23,] 15.50061024 7.58061024
[24,] 0.39255906 15.50061024
[25,] 3.32307087 0.39255906
[26,] 13.16409449 3.32307087
[27,] -4.64437008 13.16409449
[28,] -5.43385827 -4.64437008
[29,] -8.35181102 -5.43385827
[30,] 0.64614173 -8.35181102
[31,] -12.19283465 0.64614173
[32,] -0.27385827 -12.19283465
[33,] -15.21181102 -0.27385827
[34,] 0.73023622 -15.21181102
[35,] 2.85023622 0.73023622
[36,] -30.45781496 2.85023622
[37,] 1.17269685 -30.45781496
[38,] -6.18627953 1.17269685
[39,] -2.74730315 -6.18627953
[40,] 3.76832677 -2.74730315
[41,] 12.55037402 3.76832677
[42,] -14.09911417 12.55037402
[43,] 17.74143701 -14.09911417
[44,] -1.83958661 17.74143701
[45,] -15.93009843 -1.83958661
[46,] 1.26450787 -15.93009843
[47,] 0.08450787 1.26450787
[48,] -0.22866142 0.08450787
[49,] 11.25440945 -0.22866142
[50,] -6.25712598 11.25440945
[51,] 9.72929134 -6.25712598
[52,] 6.50259843 9.72929134
[53,] 9.77952756 6.50259843
[54,] -1.97507874 9.77952756
[55,] 7.72826772 -1.97507874
[56,] 7.04724409 7.72826772
[57,] 6.35161417 7.04724409
[58,] 0.48854331 6.35161417
[59,] -20.29145669 0.48854331
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -8.22874016 27.89330709
2 -10.44027559 -8.22874016
3 7.95125984 -10.44027559
4 4.66177165 7.95125984
5 -16.50874016 4.66177165
6 8.59433071 -16.50874016
7 -4.29720472 8.59433071
8 -16.92566929 -4.29720472
9 11.53637795 -16.92566929
10 -10.06389764 11.53637795
11 1.85610236 -10.06389764
12 2.40061024 1.85610236
13 -7.52143701 2.40061024
14 9.71958661 -7.52143701
15 -10.28887795 9.71958661
16 -9.49883858 -10.28887795
17 2.53064961 -9.49883858
18 6.83372047 2.53064961
19 -8.97966535 6.83372047
20 11.99187008 -8.97966535
21 13.25391732 11.99187008
22 7.58061024 13.25391732
23 15.50061024 7.58061024
24 0.39255906 15.50061024
25 3.32307087 0.39255906
26 13.16409449 3.32307087
27 -4.64437008 13.16409449
28 -5.43385827 -4.64437008
29 -8.35181102 -5.43385827
30 0.64614173 -8.35181102
31 -12.19283465 0.64614173
32 -0.27385827 -12.19283465
33 -15.21181102 -0.27385827
34 0.73023622 -15.21181102
35 2.85023622 0.73023622
36 -30.45781496 2.85023622
37 1.17269685 -30.45781496
38 -6.18627953 1.17269685
39 -2.74730315 -6.18627953
40 3.76832677 -2.74730315
41 12.55037402 3.76832677
42 -14.09911417 12.55037402
43 17.74143701 -14.09911417
44 -1.83958661 17.74143701
45 -15.93009843 -1.83958661
46 1.26450787 -15.93009843
47 0.08450787 1.26450787
48 -0.22866142 0.08450787
49 11.25440945 -0.22866142
50 -6.25712598 11.25440945
51 9.72929134 -6.25712598
52 6.50259843 9.72929134
53 9.77952756 6.50259843
54 -1.97507874 9.77952756
55 7.72826772 -1.97507874
56 7.04724409 7.72826772
57 6.35161417 7.04724409
58 0.48854331 6.35161417
59 -20.29145669 0.48854331
> 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/7f8xm1198006943.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/81ldk1198006943.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/9ixu01198006943.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/10w54y1198006943.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/11y5jj1198006943.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/12yi621198006943.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/13riql1198006943.tab")
>
> system("convert tmp/1f79t1198006942.ps tmp/1f79t1198006942.png")
> system("convert tmp/2ne941198006942.ps tmp/2ne941198006942.png")
> system("convert tmp/32spc1198006942.ps tmp/32spc1198006942.png")
> system("convert tmp/4n7yr1198006942.ps tmp/4n7yr1198006942.png")
> system("convert tmp/5otbm1198006943.ps tmp/5otbm1198006943.png")
> system("convert tmp/6z8w61198006943.ps tmp/6z8w61198006943.png")
> system("convert tmp/7f8xm1198006943.ps tmp/7f8xm1198006943.png")
> system("convert tmp/81ldk1198006943.ps tmp/81ldk1198006943.png")
> system("convert tmp/9ixu01198006943.ps tmp/9ixu01198006943.png")
>
>
> proc.time()
user system elapsed
2.275 1.466 2.564