R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(286602,0,283042,0,276687,0,277915,0,277128,0,277103,0,275037,0,270150,0,267140,0,264993,0,287259,0,291186,0,292300,0,288186,0,281477,0,282656,0,280190,0,280408,0,276836,0,275216,0,274352,0,271311,0,289802,0,290726,0,292300,0,278506,0,269826,0,265861,0,269034,0,264176,0,255198,0,253353,0,246057,0,235372,0,258556,0,260993,0,254663,0,250643,0,243422,0,247105,0,248541,0,245039,0,237080,0,237085,0,225554,0,226839,0,247934,0,248333,1,246969,1,245098,1,246263,1,255765,1,264319,1,268347,1,273046,1,273963,1,267430,1,271993,1,292710,1,295881,1),dim=c(2,60),dimnames=list(c('nwwmb','dummy_variable'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('nwwmb','dummy_variable'),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 = '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 nwwmb dummy_variable M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 286602 0 1 0 0 0 0 0 0 0 0 0 0 1 2 283042 0 0 1 0 0 0 0 0 0 0 0 0 2 3 276687 0 0 0 1 0 0 0 0 0 0 0 0 3 4 277915 0 0 0 0 1 0 0 0 0 0 0 0 4 5 277128 0 0 0 0 0 1 0 0 0 0 0 0 5 6 277103 0 0 0 0 0 0 1 0 0 0 0 0 6 7 275037 0 0 0 0 0 0 0 1 0 0 0 0 7 8 270150 0 0 0 0 0 0 0 0 1 0 0 0 8 9 267140 0 0 0 0 0 0 0 0 0 1 0 0 9 10 264993 0 0 0 0 0 0 0 0 0 0 1 0 10 11 287259 0 0 0 0 0 0 0 0 0 0 0 1 11 12 291186 0 0 0 0 0 0 0 0 0 0 0 0 12 13 292300 0 1 0 0 0 0 0 0 0 0 0 0 13 14 288186 0 0 1 0 0 0 0 0 0 0 0 0 14 15 281477 0 0 0 1 0 0 0 0 0 0 0 0 15 16 282656 0 0 0 0 1 0 0 0 0 0 0 0 16 17 280190 0 0 0 0 0 1 0 0 0 0 0 0 17 18 280408 0 0 0 0 0 0 1 0 0 0 0 0 18 19 276836 0 0 0 0 0 0 0 1 0 0 0 0 19 20 275216 0 0 0 0 0 0 0 0 1 0 0 0 20 21 274352 0 0 0 0 0 0 0 0 0 1 0 0 21 22 271311 0 0 0 0 0 0 0 0 0 0 1 0 22 23 289802 0 0 0 0 0 0 0 0 0 0 0 1 23 24 290726 0 0 0 0 0 0 0 0 0 0 0 0 24 25 292300 0 1 0 0 0 0 0 0 0 0 0 0 25 26 278506 0 0 1 0 0 0 0 0 0 0 0 0 26 27 269826 0 0 0 1 0 0 0 0 0 0 0 0 27 28 265861 0 0 0 0 1 0 0 0 0 0 0 0 28 29 269034 0 0 0 0 0 1 0 0 0 0 0 0 29 30 264176 0 0 0 0 0 0 1 0 0 0 0 0 30 31 255198 0 0 0 0 0 0 0 1 0 0 0 0 31 32 253353 0 0 0 0 0 0 0 0 1 0 0 0 32 33 246057 0 0 0 0 0 0 0 0 0 1 0 0 33 34 235372 0 0 0 0 0 0 0 0 0 0 1 0 34 35 258556 0 0 0 0 0 0 0 0 0 0 0 1 35 36 260993 0 0 0 0 0 0 0 0 0 0 0 0 36 37 254663 0 1 0 0 0 0 0 0 0 0 0 0 37 38 250643 0 0 1 0 0 0 0 0 0 0 0 0 38 39 243422 0 0 0 1 0 0 0 0 0 0 0 0 39 40 247105 0 0 0 0 1 0 0 0 0 0 0 0 40 41 248541 0 0 0 0 0 1 0 0 0 0 0 0 41 42 245039 0 0 0 0 0 0 1 0 0 0 0 0 42 43 237080 0 0 0 0 0 0 0 1 0 0 0 0 43 44 237085 0 0 0 0 0 0 0 0 1 0 0 0 44 45 225554 0 0 0 0 0 0 0 0 0 1 0 0 45 46 226839 0 0 0 0 0 0 0 0 0 0 1 0 46 47 247934 0 0 0 0 0 0 0 0 0 0 0 1 47 48 248333 1 0 0 0 0 0 0 0 0 0 0 0 48 49 246969 1 1 0 0 0 0 0 0 0 0 0 0 49 50 245098 1 0 1 0 0 0 0 0 0 0 0 0 50 51 246263 1 0 0 1 0 0 0 0 0 0 0 0 51 52 255765 1 0 0 0 1 0 0 0 0 0 0 0 52 53 264319 1 0 0 0 0 1 0 0 0 0 0 0 53 54 268347 1 0 0 0 0 0 1 0 0 0 0 0 54 55 273046 1 0 0 0 0 0 0 1 0 0 0 0 55 56 273963 1 0 0 0 0 0 0 0 1 0 0 0 56 57 267430 1 0 0 0 0 0 0 0 0 1 0 0 57 58 271993 1 0 0 0 0 0 0 0 0 0 1 0 58 59 292710 1 0 0 0 0 0 0 0 0 0 0 1 59 60 295881 1 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) dummy_variable M1 M2 M3 301925.2 27102.1 -8235.6 -12725.7 -17303.9 M4 M5 M6 M7 M8 -13996.8 -11033.1 -10879.2 -13472.6 -13976.9 M9 M10 M11 t -18842.0 -19865.2 2267.1 -981.7 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -33571 -7354 -2401 10539 25757 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 301925.2 7126.7 42.366 < 2e-16 *** dummy_variable 27102.1 6092.4 4.448 5.44e-05 *** M1 -8235.6 8508.3 -0.968 0.3381 M2 -12725.7 8496.9 -1.498 0.1410 M3 -17303.9 8488.0 -2.039 0.0473 * M4 -13996.8 8481.7 -1.650 0.1057 M5 -11033.1 8477.9 -1.301 0.1996 M6 -10879.2 8476.6 -1.283 0.2058 M7 -13472.6 8477.9 -1.589 0.1189 M8 -13976.9 8481.7 -1.648 0.1062 M9 -18842.0 8488.0 -2.220 0.0314 * M10 -19865.2 8496.9 -2.338 0.0238 * M11 2267.1 8508.3 0.266 0.7911 t -981.7 146.6 -6.698 2.58e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13340 on 46 degrees of freedom Multiple R-squared: 0.571, Adjusted R-squared: 0.4497 F-statistic: 4.709 on 13 and 46 DF, p-value: 4.254e-05 > postscript(file="/var/www/html/rcomp/tmp/15axx1258641286.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/2b3on1258641286.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/3ks8v1258641286.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/4or6n1258641286.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/5egj31258641286.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 7 -6105.882 -4194.082 -4989.082 -6086.482 -8855.482 -8052.682 -6543.482 8 9 10 11 12 13 14 -9944.482 -7107.682 -7249.682 -6134.282 1041.532 11372.866 12730.666 15 16 17 18 19 20 21 11581.666 10435.266 5987.266 7033.066 7036.266 6902.266 11885.066 22 23 24 25 26 27 28 10849.066 8189.466 12362.280 23153.614 14831.414 11711.414 5421.014 29 30 31 32 33 34 35 6612.014 2581.814 -2820.986 -3179.986 -4629.186 -13309.186 -11275.786 36 37 38 39 40 41 42 -5589.972 -2702.638 -1250.838 -2911.838 -1554.238 -2100.238 -4774.438 43 44 45 46 47 48 49 -9158.238 -7667.238 -13351.438 -10061.438 -10117.038 -33571.294 -25717.960 50 51 52 53 54 55 56 -22117.160 -15392.160 -8215.560 -1643.560 3212.240 11486.440 13889.440 57 58 59 60 13203.240 19771.240 19337.640 25757.454 > postscript(file="/var/www/html/rcomp/tmp/62h8w1258641286.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 -6105.882 NA 1 -4194.082 -6105.882 2 -4989.082 -4194.082 3 -6086.482 -4989.082 4 -8855.482 -6086.482 5 -8052.682 -8855.482 6 -6543.482 -8052.682 7 -9944.482 -6543.482 8 -7107.682 -9944.482 9 -7249.682 -7107.682 10 -6134.282 -7249.682 11 1041.532 -6134.282 12 11372.866 1041.532 13 12730.666 11372.866 14 11581.666 12730.666 15 10435.266 11581.666 16 5987.266 10435.266 17 7033.066 5987.266 18 7036.266 7033.066 19 6902.266 7036.266 20 11885.066 6902.266 21 10849.066 11885.066 22 8189.466 10849.066 23 12362.280 8189.466 24 23153.614 12362.280 25 14831.414 23153.614 26 11711.414 14831.414 27 5421.014 11711.414 28 6612.014 5421.014 29 2581.814 6612.014 30 -2820.986 2581.814 31 -3179.986 -2820.986 32 -4629.186 -3179.986 33 -13309.186 -4629.186 34 -11275.786 -13309.186 35 -5589.972 -11275.786 36 -2702.638 -5589.972 37 -1250.838 -2702.638 38 -2911.838 -1250.838 39 -1554.238 -2911.838 40 -2100.238 -1554.238 41 -4774.438 -2100.238 42 -9158.238 -4774.438 43 -7667.238 -9158.238 44 -13351.438 -7667.238 45 -10061.438 -13351.438 46 -10117.038 -10061.438 47 -33571.294 -10117.038 48 -25717.960 -33571.294 49 -22117.160 -25717.960 50 -15392.160 -22117.160 51 -8215.560 -15392.160 52 -1643.560 -8215.560 53 3212.240 -1643.560 54 11486.440 3212.240 55 13889.440 11486.440 56 13203.240 13889.440 57 19771.240 13203.240 58 19337.640 19771.240 59 25757.454 19337.640 60 NA 25757.454 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4194.082 -6105.882 [2,] -4989.082 -4194.082 [3,] -6086.482 -4989.082 [4,] -8855.482 -6086.482 [5,] -8052.682 -8855.482 [6,] -6543.482 -8052.682 [7,] -9944.482 -6543.482 [8,] -7107.682 -9944.482 [9,] -7249.682 -7107.682 [10,] -6134.282 -7249.682 [11,] 1041.532 -6134.282 [12,] 11372.866 1041.532 [13,] 12730.666 11372.866 [14,] 11581.666 12730.666 [15,] 10435.266 11581.666 [16,] 5987.266 10435.266 [17,] 7033.066 5987.266 [18,] 7036.266 7033.066 [19,] 6902.266 7036.266 [20,] 11885.066 6902.266 [21,] 10849.066 11885.066 [22,] 8189.466 10849.066 [23,] 12362.280 8189.466 [24,] 23153.614 12362.280 [25,] 14831.414 23153.614 [26,] 11711.414 14831.414 [27,] 5421.014 11711.414 [28,] 6612.014 5421.014 [29,] 2581.814 6612.014 [30,] -2820.986 2581.814 [31,] -3179.986 -2820.986 [32,] -4629.186 -3179.986 [33,] -13309.186 -4629.186 [34,] -11275.786 -13309.186 [35,] -5589.972 -11275.786 [36,] -2702.638 -5589.972 [37,] -1250.838 -2702.638 [38,] -2911.838 -1250.838 [39,] -1554.238 -2911.838 [40,] -2100.238 -1554.238 [41,] -4774.438 -2100.238 [42,] -9158.238 -4774.438 [43,] -7667.238 -9158.238 [44,] -13351.438 -7667.238 [45,] -10061.438 -13351.438 [46,] -10117.038 -10061.438 [47,] -33571.294 -10117.038 [48,] -25717.960 -33571.294 [49,] -22117.160 -25717.960 [50,] -15392.160 -22117.160 [51,] -8215.560 -15392.160 [52,] -1643.560 -8215.560 [53,] 3212.240 -1643.560 [54,] 11486.440 3212.240 [55,] 13889.440 11486.440 [56,] 13203.240 13889.440 [57,] 19771.240 13203.240 [58,] 19337.640 19771.240 [59,] 25757.454 19337.640 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4194.082 -6105.882 2 -4989.082 -4194.082 3 -6086.482 -4989.082 4 -8855.482 -6086.482 5 -8052.682 -8855.482 6 -6543.482 -8052.682 7 -9944.482 -6543.482 8 -7107.682 -9944.482 9 -7249.682 -7107.682 10 -6134.282 -7249.682 11 1041.532 -6134.282 12 11372.866 1041.532 13 12730.666 11372.866 14 11581.666 12730.666 15 10435.266 11581.666 16 5987.266 10435.266 17 7033.066 5987.266 18 7036.266 7033.066 19 6902.266 7036.266 20 11885.066 6902.266 21 10849.066 11885.066 22 8189.466 10849.066 23 12362.280 8189.466 24 23153.614 12362.280 25 14831.414 23153.614 26 11711.414 14831.414 27 5421.014 11711.414 28 6612.014 5421.014 29 2581.814 6612.014 30 -2820.986 2581.814 31 -3179.986 -2820.986 32 -4629.186 -3179.986 33 -13309.186 -4629.186 34 -11275.786 -13309.186 35 -5589.972 -11275.786 36 -2702.638 -5589.972 37 -1250.838 -2702.638 38 -2911.838 -1250.838 39 -1554.238 -2911.838 40 -2100.238 -1554.238 41 -4774.438 -2100.238 42 -9158.238 -4774.438 43 -7667.238 -9158.238 44 -13351.438 -7667.238 45 -10061.438 -13351.438 46 -10117.038 -10061.438 47 -33571.294 -10117.038 48 -25717.960 -33571.294 49 -22117.160 -25717.960 50 -15392.160 -22117.160 51 -8215.560 -15392.160 52 -1643.560 -8215.560 53 3212.240 -1643.560 54 11486.440 3212.240 55 13889.440 11486.440 56 13203.240 13889.440 57 19771.240 13203.240 58 19337.640 19771.240 59 25757.454 19337.640 > 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/75n0c1258641286.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/8n0q41258641286.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/9uzfw1258641286.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/10h1vl1258641286.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/11ph7e1258641286.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/1220ye1258641286.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/13jox11258641286.tab") > > system("convert tmp/15axx1258641286.ps tmp/15axx1258641286.png") > system("convert tmp/2b3on1258641286.ps tmp/2b3on1258641286.png") > system("convert tmp/3ks8v1258641286.ps tmp/3ks8v1258641286.png") > system("convert tmp/4or6n1258641286.ps tmp/4or6n1258641286.png") > system("convert tmp/5egj31258641286.ps tmp/5egj31258641286.png") > system("convert tmp/62h8w1258641286.ps tmp/62h8w1258641286.png") > system("convert tmp/75n0c1258641286.ps tmp/75n0c1258641286.png") > system("convert tmp/8n0q41258641286.ps tmp/8n0q41258641286.png") > system("convert tmp/9uzfw1258641286.ps tmp/9uzfw1258641286.png") > > > proc.time() user system elapsed 1.943 1.421 2.292