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(86.5,109.2,104.1,126.3,110.9,104,114.5,96,112.2,262,96.4,89.8,92,86,102,92.7,99.7,126.8,102,92.8,98.9,87.8,87.4,100,94.4,72.4,109.3,104.9,116.4,52.3,101,65.3,105.5,110.2,97.8,54.4,95.5,47.5,113.7,65.2,103.7,69.8,100.8,53.6,113.8,116.1,84.6,56.6,95.3,47.2,110,90.6,107.5,60.4,107.6,59.3,116,131.6,96.9,59.4,97,65.5,108.1,70.5,101.9,81,107.2,73.3,110.2,107.5,78.7,88.9,96.5,55.8,115.2,80.5,104.7,86.3,109.1,112.6,108.4,148.6,95.5,47.1,97.8,57.8,115.1,81,96.2,60.1,112,76.1,111.8,82.5,82.5,66.8,100.8,58.7,116,54.2,116.3,103.3,116.6,77.8,112.9,118.4,100.9,64.9,104.1,40.8,117.4,77.7,103.3,66.8,111.6,69.2,115,82.4,92.6,62.7,105.2,58.2),dim=c(2,61),dimnames=list(c('Indpr','Inv'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Indpr','Inv'),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 = '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 Indpr Inv M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 86.5 109.2 1 0 0 0 0 0 0 0 0 0 0 1 2 104.1 126.3 0 1 0 0 0 0 0 0 0 0 0 2 3 110.9 104.0 0 0 1 0 0 0 0 0 0 0 0 3 4 114.5 96.0 0 0 0 1 0 0 0 0 0 0 0 4 5 112.2 262.0 0 0 0 0 1 0 0 0 0 0 0 5 6 96.4 89.8 0 0 0 0 0 1 0 0 0 0 0 6 7 92.0 86.0 0 0 0 0 0 0 1 0 0 0 0 7 8 102.0 92.7 0 0 0 0 0 0 0 1 0 0 0 8 9 99.7 126.8 0 0 0 0 0 0 0 0 1 0 0 9 10 102.0 92.8 0 0 0 0 0 0 0 0 0 1 0 10 11 98.9 87.8 0 0 0 0 0 0 0 0 0 0 1 11 12 87.4 100.0 0 0 0 0 0 0 0 0 0 0 0 12 13 94.4 72.4 1 0 0 0 0 0 0 0 0 0 0 13 14 109.3 104.9 0 1 0 0 0 0 0 0 0 0 0 14 15 116.4 52.3 0 0 1 0 0 0 0 0 0 0 0 15 16 101.0 65.3 0 0 0 1 0 0 0 0 0 0 0 16 17 105.5 110.2 0 0 0 0 1 0 0 0 0 0 0 17 18 97.8 54.4 0 0 0 0 0 1 0 0 0 0 0 18 19 95.5 47.5 0 0 0 0 0 0 1 0 0 0 0 19 20 113.7 65.2 0 0 0 0 0 0 0 1 0 0 0 20 21 103.7 69.8 0 0 0 0 0 0 0 0 1 0 0 21 22 100.8 53.6 0 0 0 0 0 0 0 0 0 1 0 22 23 113.8 116.1 0 0 0 0 0 0 0 0 0 0 1 23 24 84.6 56.6 0 0 0 0 0 0 0 0 0 0 0 24 25 95.3 47.2 1 0 0 0 0 0 0 0 0 0 0 25 26 110.0 90.6 0 1 0 0 0 0 0 0 0 0 0 26 27 107.5 60.4 0 0 1 0 0 0 0 0 0 0 0 27 28 107.6 59.3 0 0 0 1 0 0 0 0 0 0 0 28 29 116.0 131.6 0 0 0 0 1 0 0 0 0 0 0 29 30 96.9 59.4 0 0 0 0 0 1 0 0 0 0 0 30 31 97.0 65.5 0 0 0 0 0 0 1 0 0 0 0 31 32 108.1 70.5 0 0 0 0 0 0 0 1 0 0 0 32 33 101.9 81.0 0 0 0 0 0 0 0 0 1 0 0 33 34 107.2 73.3 0 0 0 0 0 0 0 0 0 1 0 34 35 110.2 107.5 0 0 0 0 0 0 0 0 0 0 1 35 36 78.7 88.9 0 0 0 0 0 0 0 0 0 0 0 36 37 96.5 55.8 1 0 0 0 0 0 0 0 0 0 0 37 38 115.2 80.5 0 1 0 0 0 0 0 0 0 0 0 38 39 104.7 86.3 0 0 1 0 0 0 0 0 0 0 0 39 40 109.1 112.6 0 0 0 1 0 0 0 0 0 0 0 40 41 108.4 148.6 0 0 0 0 1 0 0 0 0 0 0 41 42 95.5 47.1 0 0 0 0 0 1 0 0 0 0 0 42 43 97.8 57.8 0 0 0 0 0 0 1 0 0 0 0 43 44 115.1 81.0 0 0 0 0 0 0 0 1 0 0 0 44 45 96.2 60.1 0 0 0 0 0 0 0 0 1 0 0 45 46 112.0 76.1 0 0 0 0 0 0 0 0 0 1 0 46 47 111.8 82.5 0 0 0 0 0 0 0 0 0 0 1 47 48 82.5 66.8 0 0 0 0 0 0 0 0 0 0 0 48 49 100.8 58.7 1 0 0 0 0 0 0 0 0 0 0 49 50 116.0 54.2 0 1 0 0 0 0 0 0 0 0 0 50 51 116.3 103.3 0 0 1 0 0 0 0 0 0 0 0 51 52 116.6 77.8 0 0 0 1 0 0 0 0 0 0 0 52 53 112.9 118.4 0 0 0 0 1 0 0 0 0 0 0 53 54 100.9 64.9 0 0 0 0 0 1 0 0 0 0 0 54 55 104.1 40.8 0 0 0 0 0 0 1 0 0 0 0 55 56 117.4 77.7 0 0 0 0 0 0 0 1 0 0 0 56 57 103.3 66.8 0 0 0 0 0 0 0 0 1 0 0 57 58 111.6 69.2 0 0 0 0 0 0 0 0 0 1 0 58 59 115.0 82.4 0 0 0 0 0 0 0 0 0 0 1 59 60 92.6 62.7 0 0 0 0 0 0 0 0 0 0 0 60 61 105.2 58.2 1 0 0 0 0 0 0 0 0 0 0 61 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Inv M1 M2 M3 M4 76.95083 0.02732 12.36642 27.02595 27.36909 25.77229 M5 M6 M7 M8 M9 M10 24.87543 13.69126 13.39848 26.71838 16.15219 21.95688 M11 t 24.39768 0.17112 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -8.6511 -2.2457 0.4153 2.3610 8.4699 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 76.95083 3.31804 23.192 < 2e-16 *** Inv 0.02732 0.02569 1.063 0.293 M1 12.36642 2.57319 4.806 1.62e-05 *** M2 27.02595 2.69689 10.021 2.99e-13 *** M3 27.36909 2.68076 10.209 1.63e-13 *** M4 25.77229 2.67828 9.623 1.09e-12 *** M5 24.87543 3.29499 7.549 1.21e-09 *** M6 13.69126 2.70218 5.067 6.71e-06 *** M7 13.39848 2.71263 4.939 1.03e-05 *** M8 26.71838 2.66892 10.011 3.09e-13 *** M9 16.15219 2.66970 6.050 2.26e-07 *** M10 21.95688 2.66803 8.230 1.16e-10 *** M11 24.39768 2.71357 8.991 8.83e-12 *** t 0.17112 0.03483 4.914 1.13e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.215 on 47 degrees of freedom Multiple R-Squared: 0.8417, Adjusted R-squared: 0.7979 F-statistic: 19.23 on 13 and 47 DF, p-value: 1.517e-14 > postscript(file="/var/www/html/rcomp/tmp/17xix1199490842.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/2u3nc1199490842.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/3u97a1199490842.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/4gpyj1199490842.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/54v731199490842.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 -5.97140411 -3.66917537 3.22573244 8.46994743 2.36104614 2.27810301 7 8 9 10 11 12 -1.89643356 -5.57048190 1.59306811 -1.15395525 -6.72929076 5.66399576 13 14 15 16 17 18 0.88040385 0.06194906 8.08456538 -6.24487900 -2.24567793 2.59166702 19 20 21 22 23 24 0.60181349 4.82727691 5.09668174 -3.33658622 5.34417316 1.99609667 25 26 27 28 29 30 0.41533330 -0.90087802 -3.09016503 -1.53443812 5.61627406 -0.49838034 31 32 33 34 35 36 -0.44335633 -2.97096558 0.93726829 0.47180487 -0.07436146 -6.83970787 37 38 39 40 41 42 -0.67305566 2.52156303 -8.65114004 -3.54390202 -4.50157864 -3.61584164 43 44 45 46 47 48 -1.48647636 1.68874294 -6.24526585 3.14185516 0.15510457 -4.48946147 49 50 51 52 53 54 1.49426292 1.98654130 0.43100725 2.85327171 -1.23006363 -0.75554804 55 56 57 58 59 60 3.22445277 2.02542763 -1.38175229 0.87688145 1.30437449 3.66907690 61 3.85445969 > postscript(file="/var/www/html/rcomp/tmp/6prey1199490843.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 -5.97140411 NA 1 -3.66917537 -5.97140411 2 3.22573244 -3.66917537 3 8.46994743 3.22573244 4 2.36104614 8.46994743 5 2.27810301 2.36104614 6 -1.89643356 2.27810301 7 -5.57048190 -1.89643356 8 1.59306811 -5.57048190 9 -1.15395525 1.59306811 10 -6.72929076 -1.15395525 11 5.66399576 -6.72929076 12 0.88040385 5.66399576 13 0.06194906 0.88040385 14 8.08456538 0.06194906 15 -6.24487900 8.08456538 16 -2.24567793 -6.24487900 17 2.59166702 -2.24567793 18 0.60181349 2.59166702 19 4.82727691 0.60181349 20 5.09668174 4.82727691 21 -3.33658622 5.09668174 22 5.34417316 -3.33658622 23 1.99609667 5.34417316 24 0.41533330 1.99609667 25 -0.90087802 0.41533330 26 -3.09016503 -0.90087802 27 -1.53443812 -3.09016503 28 5.61627406 -1.53443812 29 -0.49838034 5.61627406 30 -0.44335633 -0.49838034 31 -2.97096558 -0.44335633 32 0.93726829 -2.97096558 33 0.47180487 0.93726829 34 -0.07436146 0.47180487 35 -6.83970787 -0.07436146 36 -0.67305566 -6.83970787 37 2.52156303 -0.67305566 38 -8.65114004 2.52156303 39 -3.54390202 -8.65114004 40 -4.50157864 -3.54390202 41 -3.61584164 -4.50157864 42 -1.48647636 -3.61584164 43 1.68874294 -1.48647636 44 -6.24526585 1.68874294 45 3.14185516 -6.24526585 46 0.15510457 3.14185516 47 -4.48946147 0.15510457 48 1.49426292 -4.48946147 49 1.98654130 1.49426292 50 0.43100725 1.98654130 51 2.85327171 0.43100725 52 -1.23006363 2.85327171 53 -0.75554804 -1.23006363 54 3.22445277 -0.75554804 55 2.02542763 3.22445277 56 -1.38175229 2.02542763 57 0.87688145 -1.38175229 58 1.30437449 0.87688145 59 3.66907690 1.30437449 60 3.85445969 3.66907690 61 NA 3.85445969 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.66917537 -5.97140411 [2,] 3.22573244 -3.66917537 [3,] 8.46994743 3.22573244 [4,] 2.36104614 8.46994743 [5,] 2.27810301 2.36104614 [6,] -1.89643356 2.27810301 [7,] -5.57048190 -1.89643356 [8,] 1.59306811 -5.57048190 [9,] -1.15395525 1.59306811 [10,] -6.72929076 -1.15395525 [11,] 5.66399576 -6.72929076 [12,] 0.88040385 5.66399576 [13,] 0.06194906 0.88040385 [14,] 8.08456538 0.06194906 [15,] -6.24487900 8.08456538 [16,] -2.24567793 -6.24487900 [17,] 2.59166702 -2.24567793 [18,] 0.60181349 2.59166702 [19,] 4.82727691 0.60181349 [20,] 5.09668174 4.82727691 [21,] -3.33658622 5.09668174 [22,] 5.34417316 -3.33658622 [23,] 1.99609667 5.34417316 [24,] 0.41533330 1.99609667 [25,] -0.90087802 0.41533330 [26,] -3.09016503 -0.90087802 [27,] -1.53443812 -3.09016503 [28,] 5.61627406 -1.53443812 [29,] -0.49838034 5.61627406 [30,] -0.44335633 -0.49838034 [31,] -2.97096558 -0.44335633 [32,] 0.93726829 -2.97096558 [33,] 0.47180487 0.93726829 [34,] -0.07436146 0.47180487 [35,] -6.83970787 -0.07436146 [36,] -0.67305566 -6.83970787 [37,] 2.52156303 -0.67305566 [38,] -8.65114004 2.52156303 [39,] -3.54390202 -8.65114004 [40,] -4.50157864 -3.54390202 [41,] -3.61584164 -4.50157864 [42,] -1.48647636 -3.61584164 [43,] 1.68874294 -1.48647636 [44,] -6.24526585 1.68874294 [45,] 3.14185516 -6.24526585 [46,] 0.15510457 3.14185516 [47,] -4.48946147 0.15510457 [48,] 1.49426292 -4.48946147 [49,] 1.98654130 1.49426292 [50,] 0.43100725 1.98654130 [51,] 2.85327171 0.43100725 [52,] -1.23006363 2.85327171 [53,] -0.75554804 -1.23006363 [54,] 3.22445277 -0.75554804 [55,] 2.02542763 3.22445277 [56,] -1.38175229 2.02542763 [57,] 0.87688145 -1.38175229 [58,] 1.30437449 0.87688145 [59,] 3.66907690 1.30437449 [60,] 3.85445969 3.66907690 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.66917537 -5.97140411 2 3.22573244 -3.66917537 3 8.46994743 3.22573244 4 2.36104614 8.46994743 5 2.27810301 2.36104614 6 -1.89643356 2.27810301 7 -5.57048190 -1.89643356 8 1.59306811 -5.57048190 9 -1.15395525 1.59306811 10 -6.72929076 -1.15395525 11 5.66399576 -6.72929076 12 0.88040385 5.66399576 13 0.06194906 0.88040385 14 8.08456538 0.06194906 15 -6.24487900 8.08456538 16 -2.24567793 -6.24487900 17 2.59166702 -2.24567793 18 0.60181349 2.59166702 19 4.82727691 0.60181349 20 5.09668174 4.82727691 21 -3.33658622 5.09668174 22 5.34417316 -3.33658622 23 1.99609667 5.34417316 24 0.41533330 1.99609667 25 -0.90087802 0.41533330 26 -3.09016503 -0.90087802 27 -1.53443812 -3.09016503 28 5.61627406 -1.53443812 29 -0.49838034 5.61627406 30 -0.44335633 -0.49838034 31 -2.97096558 -0.44335633 32 0.93726829 -2.97096558 33 0.47180487 0.93726829 34 -0.07436146 0.47180487 35 -6.83970787 -0.07436146 36 -0.67305566 -6.83970787 37 2.52156303 -0.67305566 38 -8.65114004 2.52156303 39 -3.54390202 -8.65114004 40 -4.50157864 -3.54390202 41 -3.61584164 -4.50157864 42 -1.48647636 -3.61584164 43 1.68874294 -1.48647636 44 -6.24526585 1.68874294 45 3.14185516 -6.24526585 46 0.15510457 3.14185516 47 -4.48946147 0.15510457 48 1.49426292 -4.48946147 49 1.98654130 1.49426292 50 0.43100725 1.98654130 51 2.85327171 0.43100725 52 -1.23006363 2.85327171 53 -0.75554804 -1.23006363 54 3.22445277 -0.75554804 55 2.02542763 3.22445277 56 -1.38175229 2.02542763 57 0.87688145 -1.38175229 58 1.30437449 0.87688145 59 3.66907690 1.30437449 60 3.85445969 3.66907690 > 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/74wht1199490843.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/8xdwp1199490843.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/9jx3i1199490843.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/107j351199490843.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/113wp71199490843.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/12y5p31199490843.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/13rgpk1199490844.tab") > > system("convert tmp/17xix1199490842.ps tmp/17xix1199490842.png") > system("convert tmp/2u3nc1199490842.ps tmp/2u3nc1199490842.png") > system("convert tmp/3u97a1199490842.ps tmp/3u97a1199490842.png") > system("convert tmp/4gpyj1199490842.ps tmp/4gpyj1199490842.png") > system("convert tmp/54v731199490842.ps tmp/54v731199490842.png") > system("convert tmp/6prey1199490843.ps tmp/6prey1199490843.png") > system("convert tmp/74wht1199490843.ps tmp/74wht1199490843.png") > system("convert tmp/8xdwp1199490843.ps tmp/8xdwp1199490843.png") > system("convert tmp/9jx3i1199490843.ps tmp/9jx3i1199490843.png") > > > proc.time() user system elapsed 2.238 1.414 3.415