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(101.2,0,100.1,0,99,0,99.8,0,101,0,96.6,0,103.1,0,105.2,0,100,0,103.2,0,99.7,0,99.1,0,105.1,0,101.7,0,104.9,0,104.3,0,101.8,0,105.9,0,103.8,0,101.3,0,100.7,0,101.2,0,102.9,0,106.2,0,104.7,0,103.9,0,101.5,0,103.2,0,104.7,0,102.2,0,101.5,0,102.6,0,105.2,0,99.4,0,103.5,0,100.9,0,101.7,0,104.1,0,105.3,0,103.7,0,106.7,1,106.4,1,106,1,107,1,108.6,1,108.1,1,107.5,1,110,1,107.6,1,110,1,110,1,108.7,1,109.1,1,109.9,1,109.8,1,111.1,1,109.9,1,112.8,1,114.6,1,92.5,1),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 = '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 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 101.2 0 1 0 0 0 0 0 0 0 0 0 0 1 2 100.1 0 0 1 0 0 0 0 0 0 0 0 0 2 3 99.0 0 0 0 1 0 0 0 0 0 0 0 0 3 4 99.8 0 0 0 0 1 0 0 0 0 0 0 0 4 5 101.0 0 0 0 0 0 1 0 0 0 0 0 0 5 6 96.6 0 0 0 0 0 0 1 0 0 0 0 0 6 7 103.1 0 0 0 0 0 0 0 1 0 0 0 0 7 8 105.2 0 0 0 0 0 0 0 0 1 0 0 0 8 9 100.0 0 0 0 0 0 0 0 0 0 1 0 0 9 10 103.2 0 0 0 0 0 0 0 0 0 0 1 0 10 11 99.7 0 0 0 0 0 0 0 0 0 0 0 1 11 12 99.1 0 0 0 0 0 0 0 0 0 0 0 0 12 13 105.1 0 1 0 0 0 0 0 0 0 0 0 0 13 14 101.7 0 0 1 0 0 0 0 0 0 0 0 0 14 15 104.9 0 0 0 1 0 0 0 0 0 0 0 0 15 16 104.3 0 0 0 0 1 0 0 0 0 0 0 0 16 17 101.8 0 0 0 0 0 1 0 0 0 0 0 0 17 18 105.9 0 0 0 0 0 0 1 0 0 0 0 0 18 19 103.8 0 0 0 0 0 0 0 1 0 0 0 0 19 20 101.3 0 0 0 0 0 0 0 0 1 0 0 0 20 21 100.7 0 0 0 0 0 0 0 0 0 1 0 0 21 22 101.2 0 0 0 0 0 0 0 0 0 0 1 0 22 23 102.9 0 0 0 0 0 0 0 0 0 0 0 1 23 24 106.2 0 0 0 0 0 0 0 0 0 0 0 0 24 25 104.7 0 1 0 0 0 0 0 0 0 0 0 0 25 26 103.9 0 0 1 0 0 0 0 0 0 0 0 0 26 27 101.5 0 0 0 1 0 0 0 0 0 0 0 0 27 28 103.2 0 0 0 0 1 0 0 0 0 0 0 0 28 29 104.7 0 0 0 0 0 1 0 0 0 0 0 0 29 30 102.2 0 0 0 0 0 0 1 0 0 0 0 0 30 31 101.5 0 0 0 0 0 0 0 1 0 0 0 0 31 32 102.6 0 0 0 0 0 0 0 0 1 0 0 0 32 33 105.2 0 0 0 0 0 0 0 0 0 1 0 0 33 34 99.4 0 0 0 0 0 0 0 0 0 0 1 0 34 35 103.5 0 0 0 0 0 0 0 0 0 0 0 1 35 36 100.9 0 0 0 0 0 0 0 0 0 0 0 0 36 37 101.7 0 1 0 0 0 0 0 0 0 0 0 0 37 38 104.1 0 0 1 0 0 0 0 0 0 0 0 0 38 39 105.3 0 0 0 1 0 0 0 0 0 0 0 0 39 40 103.7 0 0 0 0 1 0 0 0 0 0 0 0 40 41 106.7 1 0 0 0 0 1 0 0 0 0 0 0 41 42 106.4 1 0 0 0 0 0 1 0 0 0 0 0 42 43 106.0 1 0 0 0 0 0 0 1 0 0 0 0 43 44 107.0 1 0 0 0 0 0 0 0 1 0 0 0 44 45 108.6 1 0 0 0 0 0 0 0 0 1 0 0 45 46 108.1 1 0 0 0 0 0 0 0 0 0 1 0 46 47 107.5 1 0 0 0 0 0 0 0 0 0 0 1 47 48 110.0 1 0 0 0 0 0 0 0 0 0 0 0 48 49 107.6 1 1 0 0 0 0 0 0 0 0 0 0 49 50 110.0 1 0 1 0 0 0 0 0 0 0 0 0 50 51 110.0 1 0 0 1 0 0 0 0 0 0 0 0 51 52 108.7 1 0 0 0 1 0 0 0 0 0 0 0 52 53 109.1 1 0 0 0 0 1 0 0 0 0 0 0 53 54 109.9 1 0 0 0 0 0 1 0 0 0 0 0 54 55 109.8 1 0 0 0 0 0 0 1 0 0 0 0 55 56 111.1 1 0 0 0 0 0 0 0 1 0 0 0 56 57 109.9 1 0 0 0 0 0 0 0 0 1 0 0 57 58 112.8 1 0 0 0 0 0 0 0 0 0 1 0 58 59 114.6 1 0 0 0 0 0 0 0 0 0 0 1 59 60 92.5 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) x M1 M2 M3 M4 97.44250 3.71250 3.92188 3.74375 3.84563 3.56750 M5 M6 M7 M8 M9 M10 3.46687 2.92875 3.49062 4.01250 3.37437 3.35625 M11 t 3.97812 0.07812 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -13.342 -1.327 -0.070 1.418 6.882 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 97.44250 1.74921 55.707 <2e-16 *** x 3.71250 1.51486 2.451 0.0181 * M1 3.92188 1.99738 1.964 0.0556 . M2 3.74375 1.99355 1.878 0.0667 . M3 3.84563 1.99056 1.932 0.0595 . M4 3.56750 1.98843 1.794 0.0794 . M5 3.46687 1.99993 1.733 0.0897 . M6 2.92875 1.99440 1.468 0.1488 M7 3.49062 1.98971 1.754 0.0860 . M8 4.01250 1.98586 2.021 0.0492 * M9 3.37437 1.98286 1.702 0.0955 . M10 3.35625 1.98072 1.694 0.0969 . M11 3.97812 1.97943 2.010 0.0503 . t 0.07812 0.04123 1.895 0.0644 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.129 on 46 degrees of freedom Multiple R-squared: 0.5543, Adjusted R-squared: 0.4283 F-statistic: 4.4 on 13 and 46 DF, p-value: 8.805e-05 > postscript(file="/var/www/html/rcomp/tmp/1jkl71227200188.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/2wut11227200188.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/3ze9j1227200188.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/4kszc1227200188.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/5x40a1227200188.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 8 -0.2425 -1.2425 -2.5225 -1.5225 -0.3000 -4.2400 1.6200 3.1200 9 10 11 12 13 14 15 16 -1.5200 1.6200 -2.5800 0.7200 2.7200 -0.5800 2.4400 2.0400 17 18 19 20 21 22 23 24 -0.4375 4.1225 1.3825 -1.7175 -1.7575 -1.3175 -0.3175 6.8825 25 26 27 28 29 30 31 32 1.3825 0.6825 -1.8975 0.0025 1.5250 -0.5150 -1.8550 -1.3550 33 34 35 36 37 38 39 40 1.8050 -4.0550 -0.6550 0.6450 -2.5550 -0.0550 0.9650 -0.4350 41 42 43 44 45 46 47 48 -1.1250 -0.9650 -2.0050 -1.6050 0.5550 -0.0050 -1.3050 5.0950 49 50 51 52 53 54 55 56 -1.3050 1.1950 1.0150 -0.0850 0.3375 1.5975 0.8575 1.5575 57 58 59 60 0.9175 3.7575 4.8575 -13.3425 > postscript(file="/var/www/html/rcomp/tmp/6xnks1227200188.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 -0.2425 NA 1 -1.2425 -0.2425 2 -2.5225 -1.2425 3 -1.5225 -2.5225 4 -0.3000 -1.5225 5 -4.2400 -0.3000 6 1.6200 -4.2400 7 3.1200 1.6200 8 -1.5200 3.1200 9 1.6200 -1.5200 10 -2.5800 1.6200 11 0.7200 -2.5800 12 2.7200 0.7200 13 -0.5800 2.7200 14 2.4400 -0.5800 15 2.0400 2.4400 16 -0.4375 2.0400 17 4.1225 -0.4375 18 1.3825 4.1225 19 -1.7175 1.3825 20 -1.7575 -1.7175 21 -1.3175 -1.7575 22 -0.3175 -1.3175 23 6.8825 -0.3175 24 1.3825 6.8825 25 0.6825 1.3825 26 -1.8975 0.6825 27 0.0025 -1.8975 28 1.5250 0.0025 29 -0.5150 1.5250 30 -1.8550 -0.5150 31 -1.3550 -1.8550 32 1.8050 -1.3550 33 -4.0550 1.8050 34 -0.6550 -4.0550 35 0.6450 -0.6550 36 -2.5550 0.6450 37 -0.0550 -2.5550 38 0.9650 -0.0550 39 -0.4350 0.9650 40 -1.1250 -0.4350 41 -0.9650 -1.1250 42 -2.0050 -0.9650 43 -1.6050 -2.0050 44 0.5550 -1.6050 45 -0.0050 0.5550 46 -1.3050 -0.0050 47 5.0950 -1.3050 48 -1.3050 5.0950 49 1.1950 -1.3050 50 1.0150 1.1950 51 -0.0850 1.0150 52 0.3375 -0.0850 53 1.5975 0.3375 54 0.8575 1.5975 55 1.5575 0.8575 56 0.9175 1.5575 57 3.7575 0.9175 58 4.8575 3.7575 59 -13.3425 4.8575 60 NA -13.3425 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.2425 -0.2425 [2,] -2.5225 -1.2425 [3,] -1.5225 -2.5225 [4,] -0.3000 -1.5225 [5,] -4.2400 -0.3000 [6,] 1.6200 -4.2400 [7,] 3.1200 1.6200 [8,] -1.5200 3.1200 [9,] 1.6200 -1.5200 [10,] -2.5800 1.6200 [11,] 0.7200 -2.5800 [12,] 2.7200 0.7200 [13,] -0.5800 2.7200 [14,] 2.4400 -0.5800 [15,] 2.0400 2.4400 [16,] -0.4375 2.0400 [17,] 4.1225 -0.4375 [18,] 1.3825 4.1225 [19,] -1.7175 1.3825 [20,] -1.7575 -1.7175 [21,] -1.3175 -1.7575 [22,] -0.3175 -1.3175 [23,] 6.8825 -0.3175 [24,] 1.3825 6.8825 [25,] 0.6825 1.3825 [26,] -1.8975 0.6825 [27,] 0.0025 -1.8975 [28,] 1.5250 0.0025 [29,] -0.5150 1.5250 [30,] -1.8550 -0.5150 [31,] -1.3550 -1.8550 [32,] 1.8050 -1.3550 [33,] -4.0550 1.8050 [34,] -0.6550 -4.0550 [35,] 0.6450 -0.6550 [36,] -2.5550 0.6450 [37,] -0.0550 -2.5550 [38,] 0.9650 -0.0550 [39,] -0.4350 0.9650 [40,] -1.1250 -0.4350 [41,] -0.9650 -1.1250 [42,] -2.0050 -0.9650 [43,] -1.6050 -2.0050 [44,] 0.5550 -1.6050 [45,] -0.0050 0.5550 [46,] -1.3050 -0.0050 [47,] 5.0950 -1.3050 [48,] -1.3050 5.0950 [49,] 1.1950 -1.3050 [50,] 1.0150 1.1950 [51,] -0.0850 1.0150 [52,] 0.3375 -0.0850 [53,] 1.5975 0.3375 [54,] 0.8575 1.5975 [55,] 1.5575 0.8575 [56,] 0.9175 1.5575 [57,] 3.7575 0.9175 [58,] 4.8575 3.7575 [59,] -13.3425 4.8575 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.2425 -0.2425 2 -2.5225 -1.2425 3 -1.5225 -2.5225 4 -0.3000 -1.5225 5 -4.2400 -0.3000 6 1.6200 -4.2400 7 3.1200 1.6200 8 -1.5200 3.1200 9 1.6200 -1.5200 10 -2.5800 1.6200 11 0.7200 -2.5800 12 2.7200 0.7200 13 -0.5800 2.7200 14 2.4400 -0.5800 15 2.0400 2.4400 16 -0.4375 2.0400 17 4.1225 -0.4375 18 1.3825 4.1225 19 -1.7175 1.3825 20 -1.7575 -1.7175 21 -1.3175 -1.7575 22 -0.3175 -1.3175 23 6.8825 -0.3175 24 1.3825 6.8825 25 0.6825 1.3825 26 -1.8975 0.6825 27 0.0025 -1.8975 28 1.5250 0.0025 29 -0.5150 1.5250 30 -1.8550 -0.5150 31 -1.3550 -1.8550 32 1.8050 -1.3550 33 -4.0550 1.8050 34 -0.6550 -4.0550 35 0.6450 -0.6550 36 -2.5550 0.6450 37 -0.0550 -2.5550 38 0.9650 -0.0550 39 -0.4350 0.9650 40 -1.1250 -0.4350 41 -0.9650 -1.1250 42 -2.0050 -0.9650 43 -1.6050 -2.0050 44 0.5550 -1.6050 45 -0.0050 0.5550 46 -1.3050 -0.0050 47 5.0950 -1.3050 48 -1.3050 5.0950 49 1.1950 -1.3050 50 1.0150 1.1950 51 -0.0850 1.0150 52 0.3375 -0.0850 53 1.5975 0.3375 54 0.8575 1.5975 55 1.5575 0.8575 56 0.9175 1.5575 57 3.7575 0.9175 58 4.8575 3.7575 59 -13.3425 4.8575 > 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/79aui1227200188.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/8k8u61227200188.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/9m3u51227200188.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/10vnaq1227200188.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/11iofi1227200188.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/12674z1227200188.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/13sff91227200188.tab") > > system("convert tmp/1jkl71227200188.ps tmp/1jkl71227200188.png") > system("convert tmp/2wut11227200188.ps tmp/2wut11227200188.png") > system("convert tmp/3ze9j1227200188.ps tmp/3ze9j1227200188.png") > system("convert tmp/4kszc1227200188.ps tmp/4kszc1227200188.png") > system("convert tmp/5x40a1227200188.ps tmp/5x40a1227200188.png") > system("convert tmp/6xnks1227200188.ps tmp/6xnks1227200188.png") > system("convert tmp/79aui1227200188.ps tmp/79aui1227200188.png") > system("convert tmp/8k8u61227200188.ps tmp/8k8u61227200188.png") > system("convert tmp/9m3u51227200188.ps tmp/9m3u51227200188.png") > > > proc.time() user system elapsed 1.924 1.400 2.306