R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(119.5,0,125,0,145,0,105.3,0,116.9,0,120.1,0,88.9,0,78.4,0,114.6,0,113.3,0,117,0,99.6,0,99.4,0,101.9,0,115.2,0,108.5,0,113.8,0,121,0,92.2,0,90.2,0,101.5,0,126.6,0,93.9,0,89.8,0,93.4,0,101.5,0,110.4,0,105.9,0,108.4,0,113.9,0,86.1,0,69.4,0,101.2,0,100.5,0,98,0,106.6,0,90.1,0,96.9,0,125.9,0,112,0,100,0,123.9,0,79.8,0,83.4,0,113.6,0,112.9,0,104,0,109.9,0,99,0,106.3,0,128.9,0,111.1,0,102.9,0,130,0,87,0,87.5,0,117.6,0,103.4,0,110.8,0,112.6,0,102.5,0,112.4,0,135.6,0,105.1,0,127.7,0,137,0,91,0,90.5,0,122.4,1,123.3,1,124.3,1,120,1,118.1,1,119,1,142.7,1,123.6,1,129.6,1,151.6,1,110.4,1,99.2,1,130.5,1,136.2,1,129.7,1,128,1,121.6,1),dim=c(2,85),dimnames=list(c('y','x'),1:85)) > y <- array(NA,dim=c(2,85),dimnames=list(c('y','x'),1:85)) > 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 = 'Do not include Seasonal 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 1 119.5 0 2 125.0 0 3 145.0 0 4 105.3 0 5 116.9 0 6 120.1 0 7 88.9 0 8 78.4 0 9 114.6 0 10 113.3 0 11 117.0 0 12 99.6 0 13 99.4 0 14 101.9 0 15 115.2 0 16 108.5 0 17 113.8 0 18 121.0 0 19 92.2 0 20 90.2 0 21 101.5 0 22 126.6 0 23 93.9 0 24 89.8 0 25 93.4 0 26 101.5 0 27 110.4 0 28 105.9 0 29 108.4 0 30 113.9 0 31 86.1 0 32 69.4 0 33 101.2 0 34 100.5 0 35 98.0 0 36 106.6 0 37 90.1 0 38 96.9 0 39 125.9 0 40 112.0 0 41 100.0 0 42 123.9 0 43 79.8 0 44 83.4 0 45 113.6 0 46 112.9 0 47 104.0 0 48 109.9 0 49 99.0 0 50 106.3 0 51 128.9 0 52 111.1 0 53 102.9 0 54 130.0 0 55 87.0 0 56 87.5 0 57 117.6 0 58 103.4 0 59 110.8 0 60 112.6 0 61 102.5 0 62 112.4 0 63 135.6 0 64 105.1 0 65 127.7 0 66 137.0 0 67 91.0 0 68 90.5 0 69 122.4 1 70 123.3 1 71 124.3 1 72 120.0 1 73 118.1 1 74 119.0 1 75 142.7 1 76 123.6 1 77 129.6 1 78 151.6 1 79 110.4 1 80 99.2 1 81 130.5 1 82 136.2 1 83 129.7 1 84 128.0 1 85 121.6 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x 106.53 18.77 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -37.132 -7.206 -1.006 7.368 38.468 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 106.532 1.744 61.088 < 2e-16 *** x 18.774 3.899 4.814 6.55e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 14.38 on 83 degrees of freedom Multiple R-squared: 0.2183, Adjusted R-squared: 0.2089 F-statistic: 23.18 on 1 and 83 DF, p-value: 6.549e-06 > postscript(file="/var/www/html/rcomp/tmp/1jv201227800839.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/2x47h1227800839.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/3hjsm1227800839.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/4au4l1227800839.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/55bff1227800839.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 = 85 Frequency = 1 1 2 3 4 5 6 12.96764706 18.46764706 38.46764706 -1.23235294 10.36764706 13.56764706 7 8 9 10 11 12 -17.63235294 -28.13235294 8.06764706 6.76764706 10.46764706 -6.93235294 13 14 15 16 17 18 -7.13235294 -4.63235294 8.66764706 1.96764706 7.26764706 14.46764706 19 20 21 22 23 24 -14.33235294 -16.33235294 -5.03235294 20.06764706 -12.63235294 -16.73235294 25 26 27 28 29 30 -13.13235294 -5.03235294 3.86764706 -0.63235294 1.86764706 7.36764706 31 32 33 34 35 36 -20.43235294 -37.13235294 -5.33235294 -6.03235294 -8.53235294 0.06764706 37 38 39 40 41 42 -16.43235294 -9.63235294 19.36764706 5.46764706 -6.53235294 17.36764706 43 44 45 46 47 48 -26.73235294 -23.13235294 7.06764706 6.36764706 -2.53235294 3.36764706 49 50 51 52 53 54 -7.53235294 -0.23235294 22.36764706 4.56764706 -3.63235294 23.46764706 55 56 57 58 59 60 -19.53235294 -19.03235294 11.06764706 -3.13235294 4.26764706 6.06764706 61 62 63 64 65 66 -4.03235294 5.86764706 29.06764706 -1.43235294 21.16764706 30.46764706 67 68 69 70 71 72 -15.53235294 -16.03235294 -2.90588235 -2.00588235 -1.00588235 -5.30588235 73 74 75 76 77 78 -7.20588235 -6.30588235 17.39411765 -1.70588235 4.29411765 26.29411765 79 80 81 82 83 84 -14.90588235 -26.10588235 5.19411765 10.89411765 4.39411765 2.69411765 85 -3.70588235 > postscript(file="/var/www/html/rcomp/tmp/6buis1227800840.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 = 85 Frequency = 1 lag(myerror, k = 1) myerror 0 12.96764706 NA 1 18.46764706 12.96764706 2 38.46764706 18.46764706 3 -1.23235294 38.46764706 4 10.36764706 -1.23235294 5 13.56764706 10.36764706 6 -17.63235294 13.56764706 7 -28.13235294 -17.63235294 8 8.06764706 -28.13235294 9 6.76764706 8.06764706 10 10.46764706 6.76764706 11 -6.93235294 10.46764706 12 -7.13235294 -6.93235294 13 -4.63235294 -7.13235294 14 8.66764706 -4.63235294 15 1.96764706 8.66764706 16 7.26764706 1.96764706 17 14.46764706 7.26764706 18 -14.33235294 14.46764706 19 -16.33235294 -14.33235294 20 -5.03235294 -16.33235294 21 20.06764706 -5.03235294 22 -12.63235294 20.06764706 23 -16.73235294 -12.63235294 24 -13.13235294 -16.73235294 25 -5.03235294 -13.13235294 26 3.86764706 -5.03235294 27 -0.63235294 3.86764706 28 1.86764706 -0.63235294 29 7.36764706 1.86764706 30 -20.43235294 7.36764706 31 -37.13235294 -20.43235294 32 -5.33235294 -37.13235294 33 -6.03235294 -5.33235294 34 -8.53235294 -6.03235294 35 0.06764706 -8.53235294 36 -16.43235294 0.06764706 37 -9.63235294 -16.43235294 38 19.36764706 -9.63235294 39 5.46764706 19.36764706 40 -6.53235294 5.46764706 41 17.36764706 -6.53235294 42 -26.73235294 17.36764706 43 -23.13235294 -26.73235294 44 7.06764706 -23.13235294 45 6.36764706 7.06764706 46 -2.53235294 6.36764706 47 3.36764706 -2.53235294 48 -7.53235294 3.36764706 49 -0.23235294 -7.53235294 50 22.36764706 -0.23235294 51 4.56764706 22.36764706 52 -3.63235294 4.56764706 53 23.46764706 -3.63235294 54 -19.53235294 23.46764706 55 -19.03235294 -19.53235294 56 11.06764706 -19.03235294 57 -3.13235294 11.06764706 58 4.26764706 -3.13235294 59 6.06764706 4.26764706 60 -4.03235294 6.06764706 61 5.86764706 -4.03235294 62 29.06764706 5.86764706 63 -1.43235294 29.06764706 64 21.16764706 -1.43235294 65 30.46764706 21.16764706 66 -15.53235294 30.46764706 67 -16.03235294 -15.53235294 68 -2.90588235 -16.03235294 69 -2.00588235 -2.90588235 70 -1.00588235 -2.00588235 71 -5.30588235 -1.00588235 72 -7.20588235 -5.30588235 73 -6.30588235 -7.20588235 74 17.39411765 -6.30588235 75 -1.70588235 17.39411765 76 4.29411765 -1.70588235 77 26.29411765 4.29411765 78 -14.90588235 26.29411765 79 -26.10588235 -14.90588235 80 5.19411765 -26.10588235 81 10.89411765 5.19411765 82 4.39411765 10.89411765 83 2.69411765 4.39411765 84 -3.70588235 2.69411765 85 NA -3.70588235 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 18.46764706 12.96764706 [2,] 38.46764706 18.46764706 [3,] -1.23235294 38.46764706 [4,] 10.36764706 -1.23235294 [5,] 13.56764706 10.36764706 [6,] -17.63235294 13.56764706 [7,] -28.13235294 -17.63235294 [8,] 8.06764706 -28.13235294 [9,] 6.76764706 8.06764706 [10,] 10.46764706 6.76764706 [11,] -6.93235294 10.46764706 [12,] -7.13235294 -6.93235294 [13,] -4.63235294 -7.13235294 [14,] 8.66764706 -4.63235294 [15,] 1.96764706 8.66764706 [16,] 7.26764706 1.96764706 [17,] 14.46764706 7.26764706 [18,] -14.33235294 14.46764706 [19,] -16.33235294 -14.33235294 [20,] -5.03235294 -16.33235294 [21,] 20.06764706 -5.03235294 [22,] -12.63235294 20.06764706 [23,] -16.73235294 -12.63235294 [24,] -13.13235294 -16.73235294 [25,] -5.03235294 -13.13235294 [26,] 3.86764706 -5.03235294 [27,] -0.63235294 3.86764706 [28,] 1.86764706 -0.63235294 [29,] 7.36764706 1.86764706 [30,] -20.43235294 7.36764706 [31,] -37.13235294 -20.43235294 [32,] -5.33235294 -37.13235294 [33,] -6.03235294 -5.33235294 [34,] -8.53235294 -6.03235294 [35,] 0.06764706 -8.53235294 [36,] -16.43235294 0.06764706 [37,] -9.63235294 -16.43235294 [38,] 19.36764706 -9.63235294 [39,] 5.46764706 19.36764706 [40,] -6.53235294 5.46764706 [41,] 17.36764706 -6.53235294 [42,] -26.73235294 17.36764706 [43,] -23.13235294 -26.73235294 [44,] 7.06764706 -23.13235294 [45,] 6.36764706 7.06764706 [46,] -2.53235294 6.36764706 [47,] 3.36764706 -2.53235294 [48,] -7.53235294 3.36764706 [49,] -0.23235294 -7.53235294 [50,] 22.36764706 -0.23235294 [51,] 4.56764706 22.36764706 [52,] -3.63235294 4.56764706 [53,] 23.46764706 -3.63235294 [54,] -19.53235294 23.46764706 [55,] -19.03235294 -19.53235294 [56,] 11.06764706 -19.03235294 [57,] -3.13235294 11.06764706 [58,] 4.26764706 -3.13235294 [59,] 6.06764706 4.26764706 [60,] -4.03235294 6.06764706 [61,] 5.86764706 -4.03235294 [62,] 29.06764706 5.86764706 [63,] -1.43235294 29.06764706 [64,] 21.16764706 -1.43235294 [65,] 30.46764706 21.16764706 [66,] -15.53235294 30.46764706 [67,] -16.03235294 -15.53235294 [68,] -2.90588235 -16.03235294 [69,] -2.00588235 -2.90588235 [70,] -1.00588235 -2.00588235 [71,] -5.30588235 -1.00588235 [72,] -7.20588235 -5.30588235 [73,] -6.30588235 -7.20588235 [74,] 17.39411765 -6.30588235 [75,] -1.70588235 17.39411765 [76,] 4.29411765 -1.70588235 [77,] 26.29411765 4.29411765 [78,] -14.90588235 26.29411765 [79,] -26.10588235 -14.90588235 [80,] 5.19411765 -26.10588235 [81,] 10.89411765 5.19411765 [82,] 4.39411765 10.89411765 [83,] 2.69411765 4.39411765 [84,] -3.70588235 2.69411765 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 18.46764706 12.96764706 2 38.46764706 18.46764706 3 -1.23235294 38.46764706 4 10.36764706 -1.23235294 5 13.56764706 10.36764706 6 -17.63235294 13.56764706 7 -28.13235294 -17.63235294 8 8.06764706 -28.13235294 9 6.76764706 8.06764706 10 10.46764706 6.76764706 11 -6.93235294 10.46764706 12 -7.13235294 -6.93235294 13 -4.63235294 -7.13235294 14 8.66764706 -4.63235294 15 1.96764706 8.66764706 16 7.26764706 1.96764706 17 14.46764706 7.26764706 18 -14.33235294 14.46764706 19 -16.33235294 -14.33235294 20 -5.03235294 -16.33235294 21 20.06764706 -5.03235294 22 -12.63235294 20.06764706 23 -16.73235294 -12.63235294 24 -13.13235294 -16.73235294 25 -5.03235294 -13.13235294 26 3.86764706 -5.03235294 27 -0.63235294 3.86764706 28 1.86764706 -0.63235294 29 7.36764706 1.86764706 30 -20.43235294 7.36764706 31 -37.13235294 -20.43235294 32 -5.33235294 -37.13235294 33 -6.03235294 -5.33235294 34 -8.53235294 -6.03235294 35 0.06764706 -8.53235294 36 -16.43235294 0.06764706 37 -9.63235294 -16.43235294 38 19.36764706 -9.63235294 39 5.46764706 19.36764706 40 -6.53235294 5.46764706 41 17.36764706 -6.53235294 42 -26.73235294 17.36764706 43 -23.13235294 -26.73235294 44 7.06764706 -23.13235294 45 6.36764706 7.06764706 46 -2.53235294 6.36764706 47 3.36764706 -2.53235294 48 -7.53235294 3.36764706 49 -0.23235294 -7.53235294 50 22.36764706 -0.23235294 51 4.56764706 22.36764706 52 -3.63235294 4.56764706 53 23.46764706 -3.63235294 54 -19.53235294 23.46764706 55 -19.03235294 -19.53235294 56 11.06764706 -19.03235294 57 -3.13235294 11.06764706 58 4.26764706 -3.13235294 59 6.06764706 4.26764706 60 -4.03235294 6.06764706 61 5.86764706 -4.03235294 62 29.06764706 5.86764706 63 -1.43235294 29.06764706 64 21.16764706 -1.43235294 65 30.46764706 21.16764706 66 -15.53235294 30.46764706 67 -16.03235294 -15.53235294 68 -2.90588235 -16.03235294 69 -2.00588235 -2.90588235 70 -1.00588235 -2.00588235 71 -5.30588235 -1.00588235 72 -7.20588235 -5.30588235 73 -6.30588235 -7.20588235 74 17.39411765 -6.30588235 75 -1.70588235 17.39411765 76 4.29411765 -1.70588235 77 26.29411765 4.29411765 78 -14.90588235 26.29411765 79 -26.10588235 -14.90588235 80 5.19411765 -26.10588235 81 10.89411765 5.19411765 82 4.39411765 10.89411765 83 2.69411765 4.39411765 84 -3.70588235 2.69411765 > 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/7xhgo1227800840.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/80n0x1227800840.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/9io8e1227800840.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 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > 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/107jx61227800840.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/11hnnn1227800840.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/1233d61227800840.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/13crf71227800840.tab") > > system("convert tmp/1jv201227800839.ps tmp/1jv201227800839.png") > system("convert tmp/2x47h1227800839.ps tmp/2x47h1227800839.png") > system("convert tmp/3hjsm1227800839.ps tmp/3hjsm1227800839.png") > system("convert tmp/4au4l1227800839.ps tmp/4au4l1227800839.png") > system("convert tmp/55bff1227800839.ps tmp/55bff1227800839.png") > system("convert tmp/6buis1227800840.ps tmp/6buis1227800840.png") > system("convert tmp/7xhgo1227800840.ps tmp/7xhgo1227800840.png") > system("convert tmp/80n0x1227800840.ps tmp/80n0x1227800840.png") > system("convert tmp/9io8e1227800840.ps tmp/9io8e1227800840.png") > > > proc.time() user system elapsed 1.976 1.415 2.821