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(97.3,0,101,0,113.2,0,101,0,105.7,0,113.9,0,86.4,0,96.5,0,103.3,0,114.9,0,105.8,0,94.2,0,98.4,0,99.4,0,108.8,0,112.6,0,104.4,0,112.2,0,81.1,0,97.1,0,112.6,0,113.8,0,107.8,0,103.2,0,103.3,0,101.2,0,107.7,0,110.4,0,101.9,0,115.9,0,89.9,0,88.6,0,117.2,0,123.9,0,100,0,103.6,0,94.1,0,98.7,0,119.5,0,112.7,0,104.4,0,124.7,0,89.1,0,97,0,121.6,0,118.8,0,114,0,111.5,0,97.2,0,102.5,0,113.4,0,109.8,0,104.9,0,126.1,0,80,0,96.8,0,117.2,1,112.3,1,117.3,1,111.1,1,102.2,1,104.3,1,122.9,1,107.6,1,121.3,1,131.5,1,89,1,104.4,1,128.9,1,135.9,1,133.3,1,121.3,1,120.5,1,120.4,1,137.9,1,126.1,1,133.2,1,146.6,1,103.4,1,117.2,1),dim=c(2,80),dimnames=list(c('y','x'),1:80)) > y <- array(NA,dim=c(2,80),dimnames=list(c('y','x'),1:80)) > 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 97.3 0 2 101.0 0 3 113.2 0 4 101.0 0 5 105.7 0 6 113.9 0 7 86.4 0 8 96.5 0 9 103.3 0 10 114.9 0 11 105.8 0 12 94.2 0 13 98.4 0 14 99.4 0 15 108.8 0 16 112.6 0 17 104.4 0 18 112.2 0 19 81.1 0 20 97.1 0 21 112.6 0 22 113.8 0 23 107.8 0 24 103.2 0 25 103.3 0 26 101.2 0 27 107.7 0 28 110.4 0 29 101.9 0 30 115.9 0 31 89.9 0 32 88.6 0 33 117.2 0 34 123.9 0 35 100.0 0 36 103.6 0 37 94.1 0 38 98.7 0 39 119.5 0 40 112.7 0 41 104.4 0 42 124.7 0 43 89.1 0 44 97.0 0 45 121.6 0 46 118.8 0 47 114.0 0 48 111.5 0 49 97.2 0 50 102.5 0 51 113.4 0 52 109.8 0 53 104.9 0 54 126.1 0 55 80.0 0 56 96.8 0 57 117.2 1 58 112.3 1 59 117.3 1 60 111.1 1 61 102.2 1 62 104.3 1 63 122.9 1 64 107.6 1 65 121.3 1 66 131.5 1 67 89.0 1 68 104.4 1 69 128.9 1 70 135.9 1 71 133.3 1 72 121.3 1 73 120.5 1 74 120.4 1 75 137.9 1 76 126.1 1 77 133.2 1 78 146.6 1 79 103.4 1 80 117.2 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x 105.09 14.32 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -30.4083 -7.8143 -0.4393 8.1607 27.1917 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 105.089 1.538 68.34 < 2e-16 *** x 14.319 2.808 5.10 2.32e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.51 on 78 degrees of freedom Multiple R-squared: 0.2501, Adjusted R-squared: 0.2405 F-statistic: 26.01 on 1 and 78 DF, p-value: 2.322e-06 > postscript(file="/var/www/html/freestat/rcomp/tmp/1bu5h1227551172.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/freestat/rcomp/tmp/2nig21227551172.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/freestat/rcomp/tmp/3cqud1227551172.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/freestat/rcomp/tmp/4kyo01227551172.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/freestat/rcomp/tmp/5elvw1227551172.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 = 80 Frequency = 1 1 2 3 4 5 6 -7.7892857 -4.0892857 8.1107143 -4.0892857 0.6107143 8.8107143 7 8 9 10 11 12 -18.6892857 -8.5892857 -1.7892857 9.8107143 0.7107143 -10.8892857 13 14 15 16 17 18 -6.6892857 -5.6892857 3.7107143 7.5107143 -0.6892857 7.1107143 19 20 21 22 23 24 -23.9892857 -7.9892857 7.5107143 8.7107143 2.7107143 -1.8892857 25 26 27 28 29 30 -1.7892857 -3.8892857 2.6107143 5.3107143 -3.1892857 10.8107143 31 32 33 34 35 36 -15.1892857 -16.4892857 12.1107143 18.8107143 -5.0892857 -1.4892857 37 38 39 40 41 42 -10.9892857 -6.3892857 14.4107143 7.6107143 -0.6892857 19.6107143 43 44 45 46 47 48 -15.9892857 -8.0892857 16.5107143 13.7107143 8.9107143 6.4107143 49 50 51 52 53 54 -7.8892857 -2.5892857 8.3107143 4.7107143 -0.1892857 21.0107143 55 56 57 58 59 60 -25.0892857 -8.2892857 -2.2083333 -7.1083333 -2.1083333 -8.3083333 61 62 63 64 65 66 -17.2083333 -15.1083333 3.4916667 -11.8083333 1.8916667 12.0916667 67 68 69 70 71 72 -30.4083333 -15.0083333 9.4916667 16.4916667 13.8916667 1.8916667 73 74 75 76 77 78 1.0916667 0.9916667 18.4916667 6.6916667 13.7916667 27.1916667 79 80 -16.0083333 -2.2083333 > postscript(file="/var/www/html/freestat/rcomp/tmp/6jl061227551172.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 = 80 Frequency = 1 lag(myerror, k = 1) myerror 0 -7.7892857 NA 1 -4.0892857 -7.7892857 2 8.1107143 -4.0892857 3 -4.0892857 8.1107143 4 0.6107143 -4.0892857 5 8.8107143 0.6107143 6 -18.6892857 8.8107143 7 -8.5892857 -18.6892857 8 -1.7892857 -8.5892857 9 9.8107143 -1.7892857 10 0.7107143 9.8107143 11 -10.8892857 0.7107143 12 -6.6892857 -10.8892857 13 -5.6892857 -6.6892857 14 3.7107143 -5.6892857 15 7.5107143 3.7107143 16 -0.6892857 7.5107143 17 7.1107143 -0.6892857 18 -23.9892857 7.1107143 19 -7.9892857 -23.9892857 20 7.5107143 -7.9892857 21 8.7107143 7.5107143 22 2.7107143 8.7107143 23 -1.8892857 2.7107143 24 -1.7892857 -1.8892857 25 -3.8892857 -1.7892857 26 2.6107143 -3.8892857 27 5.3107143 2.6107143 28 -3.1892857 5.3107143 29 10.8107143 -3.1892857 30 -15.1892857 10.8107143 31 -16.4892857 -15.1892857 32 12.1107143 -16.4892857 33 18.8107143 12.1107143 34 -5.0892857 18.8107143 35 -1.4892857 -5.0892857 36 -10.9892857 -1.4892857 37 -6.3892857 -10.9892857 38 14.4107143 -6.3892857 39 7.6107143 14.4107143 40 -0.6892857 7.6107143 41 19.6107143 -0.6892857 42 -15.9892857 19.6107143 43 -8.0892857 -15.9892857 44 16.5107143 -8.0892857 45 13.7107143 16.5107143 46 8.9107143 13.7107143 47 6.4107143 8.9107143 48 -7.8892857 6.4107143 49 -2.5892857 -7.8892857 50 8.3107143 -2.5892857 51 4.7107143 8.3107143 52 -0.1892857 4.7107143 53 21.0107143 -0.1892857 54 -25.0892857 21.0107143 55 -8.2892857 -25.0892857 56 -2.2083333 -8.2892857 57 -7.1083333 -2.2083333 58 -2.1083333 -7.1083333 59 -8.3083333 -2.1083333 60 -17.2083333 -8.3083333 61 -15.1083333 -17.2083333 62 3.4916667 -15.1083333 63 -11.8083333 3.4916667 64 1.8916667 -11.8083333 65 12.0916667 1.8916667 66 -30.4083333 12.0916667 67 -15.0083333 -30.4083333 68 9.4916667 -15.0083333 69 16.4916667 9.4916667 70 13.8916667 16.4916667 71 1.8916667 13.8916667 72 1.0916667 1.8916667 73 0.9916667 1.0916667 74 18.4916667 0.9916667 75 6.6916667 18.4916667 76 13.7916667 6.6916667 77 27.1916667 13.7916667 78 -16.0083333 27.1916667 79 -2.2083333 -16.0083333 80 NA -2.2083333 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4.0892857 -7.7892857 [2,] 8.1107143 -4.0892857 [3,] -4.0892857 8.1107143 [4,] 0.6107143 -4.0892857 [5,] 8.8107143 0.6107143 [6,] -18.6892857 8.8107143 [7,] -8.5892857 -18.6892857 [8,] -1.7892857 -8.5892857 [9,] 9.8107143 -1.7892857 [10,] 0.7107143 9.8107143 [11,] -10.8892857 0.7107143 [12,] -6.6892857 -10.8892857 [13,] -5.6892857 -6.6892857 [14,] 3.7107143 -5.6892857 [15,] 7.5107143 3.7107143 [16,] -0.6892857 7.5107143 [17,] 7.1107143 -0.6892857 [18,] -23.9892857 7.1107143 [19,] -7.9892857 -23.9892857 [20,] 7.5107143 -7.9892857 [21,] 8.7107143 7.5107143 [22,] 2.7107143 8.7107143 [23,] -1.8892857 2.7107143 [24,] -1.7892857 -1.8892857 [25,] -3.8892857 -1.7892857 [26,] 2.6107143 -3.8892857 [27,] 5.3107143 2.6107143 [28,] -3.1892857 5.3107143 [29,] 10.8107143 -3.1892857 [30,] -15.1892857 10.8107143 [31,] -16.4892857 -15.1892857 [32,] 12.1107143 -16.4892857 [33,] 18.8107143 12.1107143 [34,] -5.0892857 18.8107143 [35,] -1.4892857 -5.0892857 [36,] -10.9892857 -1.4892857 [37,] -6.3892857 -10.9892857 [38,] 14.4107143 -6.3892857 [39,] 7.6107143 14.4107143 [40,] -0.6892857 7.6107143 [41,] 19.6107143 -0.6892857 [42,] -15.9892857 19.6107143 [43,] -8.0892857 -15.9892857 [44,] 16.5107143 -8.0892857 [45,] 13.7107143 16.5107143 [46,] 8.9107143 13.7107143 [47,] 6.4107143 8.9107143 [48,] -7.8892857 6.4107143 [49,] -2.5892857 -7.8892857 [50,] 8.3107143 -2.5892857 [51,] 4.7107143 8.3107143 [52,] -0.1892857 4.7107143 [53,] 21.0107143 -0.1892857 [54,] -25.0892857 21.0107143 [55,] -8.2892857 -25.0892857 [56,] -2.2083333 -8.2892857 [57,] -7.1083333 -2.2083333 [58,] -2.1083333 -7.1083333 [59,] -8.3083333 -2.1083333 [60,] -17.2083333 -8.3083333 [61,] -15.1083333 -17.2083333 [62,] 3.4916667 -15.1083333 [63,] -11.8083333 3.4916667 [64,] 1.8916667 -11.8083333 [65,] 12.0916667 1.8916667 [66,] -30.4083333 12.0916667 [67,] -15.0083333 -30.4083333 [68,] 9.4916667 -15.0083333 [69,] 16.4916667 9.4916667 [70,] 13.8916667 16.4916667 [71,] 1.8916667 13.8916667 [72,] 1.0916667 1.8916667 [73,] 0.9916667 1.0916667 [74,] 18.4916667 0.9916667 [75,] 6.6916667 18.4916667 [76,] 13.7916667 6.6916667 [77,] 27.1916667 13.7916667 [78,] -16.0083333 27.1916667 [79,] -2.2083333 -16.0083333 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4.0892857 -7.7892857 2 8.1107143 -4.0892857 3 -4.0892857 8.1107143 4 0.6107143 -4.0892857 5 8.8107143 0.6107143 6 -18.6892857 8.8107143 7 -8.5892857 -18.6892857 8 -1.7892857 -8.5892857 9 9.8107143 -1.7892857 10 0.7107143 9.8107143 11 -10.8892857 0.7107143 12 -6.6892857 -10.8892857 13 -5.6892857 -6.6892857 14 3.7107143 -5.6892857 15 7.5107143 3.7107143 16 -0.6892857 7.5107143 17 7.1107143 -0.6892857 18 -23.9892857 7.1107143 19 -7.9892857 -23.9892857 20 7.5107143 -7.9892857 21 8.7107143 7.5107143 22 2.7107143 8.7107143 23 -1.8892857 2.7107143 24 -1.7892857 -1.8892857 25 -3.8892857 -1.7892857 26 2.6107143 -3.8892857 27 5.3107143 2.6107143 28 -3.1892857 5.3107143 29 10.8107143 -3.1892857 30 -15.1892857 10.8107143 31 -16.4892857 -15.1892857 32 12.1107143 -16.4892857 33 18.8107143 12.1107143 34 -5.0892857 18.8107143 35 -1.4892857 -5.0892857 36 -10.9892857 -1.4892857 37 -6.3892857 -10.9892857 38 14.4107143 -6.3892857 39 7.6107143 14.4107143 40 -0.6892857 7.6107143 41 19.6107143 -0.6892857 42 -15.9892857 19.6107143 43 -8.0892857 -15.9892857 44 16.5107143 -8.0892857 45 13.7107143 16.5107143 46 8.9107143 13.7107143 47 6.4107143 8.9107143 48 -7.8892857 6.4107143 49 -2.5892857 -7.8892857 50 8.3107143 -2.5892857 51 4.7107143 8.3107143 52 -0.1892857 4.7107143 53 21.0107143 -0.1892857 54 -25.0892857 21.0107143 55 -8.2892857 -25.0892857 56 -2.2083333 -8.2892857 57 -7.1083333 -2.2083333 58 -2.1083333 -7.1083333 59 -8.3083333 -2.1083333 60 -17.2083333 -8.3083333 61 -15.1083333 -17.2083333 62 3.4916667 -15.1083333 63 -11.8083333 3.4916667 64 1.8916667 -11.8083333 65 12.0916667 1.8916667 66 -30.4083333 12.0916667 67 -15.0083333 -30.4083333 68 9.4916667 -15.0083333 69 16.4916667 9.4916667 70 13.8916667 16.4916667 71 1.8916667 13.8916667 72 1.0916667 1.8916667 73 0.9916667 1.0916667 74 18.4916667 0.9916667 75 6.6916667 18.4916667 76 13.7916667 6.6916667 77 27.1916667 13.7916667 78 -16.0083333 27.1916667 79 -2.2083333 -16.0083333 > 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/freestat/rcomp/tmp/7iuen1227551172.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/freestat/rcomp/tmp/8se401227551172.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/freestat/rcomp/tmp/9zsc51227551172.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/10t9aj1227551172.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/freestat/rcomp/tmp/11qsk41227551172.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/freestat/rcomp/tmp/12jmhm1227551172.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/freestat/rcomp/tmp/138qkv1227551172.tab") > > system("convert tmp/1bu5h1227551172.ps tmp/1bu5h1227551172.png") > system("convert tmp/2nig21227551172.ps tmp/2nig21227551172.png") > system("convert tmp/3cqud1227551172.ps tmp/3cqud1227551172.png") > system("convert tmp/4kyo01227551172.ps tmp/4kyo01227551172.png") > system("convert tmp/5elvw1227551172.ps tmp/5elvw1227551172.png") > system("convert tmp/6jl061227551172.ps tmp/6jl061227551172.png") > system("convert tmp/7iuen1227551172.ps tmp/7iuen1227551172.png") > system("convert tmp/8se401227551172.ps tmp/8se401227551172.png") > system("convert tmp/9zsc51227551172.ps tmp/9zsc51227551172.png") > > > proc.time() user system elapsed 3.068 2.299 3.369