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(120.3,0,133.4,0,109.4,0,93.2,0,91.2,0,99.2,0,108.2,0,101.5,0,106.9,0,104.4,0,77.9,0,60,0,99.5,0,95,0,105.6,0,102.5,0,93.3,0,97.3,0,127,0,111.7,0,96.4,0,133,0,72.2,0,95.8,0,124.1,0,127.6,0,110.7,0,104.6,0,112.7,0,115.3,0,139.4,0,119,0,97.4,0,154,0,81.5,0,88.8,0,127.7,1,105.1,1,114.9,1,106.4,1,104.5,1,121.6,1,141.4,1,99,1,126.7,1,134.1,1,81.3,1,88.6,1,132.7,1,132.9,1,134.4,1,103.7,1,119.7,1,115,1,132.9,1,108.5,1,113.9,1,142.9,1,95.2,1,93,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 = 'No 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 1 120.3 0 1 0 0 0 0 0 0 0 0 0 0 2 133.4 0 0 1 0 0 0 0 0 0 0 0 0 3 109.4 0 0 0 1 0 0 0 0 0 0 0 0 4 93.2 0 0 0 0 1 0 0 0 0 0 0 0 5 91.2 0 0 0 0 0 1 0 0 0 0 0 0 6 99.2 0 0 0 0 0 0 1 0 0 0 0 0 7 108.2 0 0 0 0 0 0 0 1 0 0 0 0 8 101.5 0 0 0 0 0 0 0 0 1 0 0 0 9 106.9 0 0 0 0 0 0 0 0 0 1 0 0 10 104.4 0 0 0 0 0 0 0 0 0 0 1 0 11 77.9 0 0 0 0 0 0 0 0 0 0 0 1 12 60.0 0 0 0 0 0 0 0 0 0 0 0 0 13 99.5 0 1 0 0 0 0 0 0 0 0 0 0 14 95.0 0 0 1 0 0 0 0 0 0 0 0 0 15 105.6 0 0 0 1 0 0 0 0 0 0 0 0 16 102.5 0 0 0 0 1 0 0 0 0 0 0 0 17 93.3 0 0 0 0 0 1 0 0 0 0 0 0 18 97.3 0 0 0 0 0 0 1 0 0 0 0 0 19 127.0 0 0 0 0 0 0 0 1 0 0 0 0 20 111.7 0 0 0 0 0 0 0 0 1 0 0 0 21 96.4 0 0 0 0 0 0 0 0 0 1 0 0 22 133.0 0 0 0 0 0 0 0 0 0 0 1 0 23 72.2 0 0 0 0 0 0 0 0 0 0 0 1 24 95.8 0 0 0 0 0 0 0 0 0 0 0 0 25 124.1 0 1 0 0 0 0 0 0 0 0 0 0 26 127.6 0 0 1 0 0 0 0 0 0 0 0 0 27 110.7 0 0 0 1 0 0 0 0 0 0 0 0 28 104.6 0 0 0 0 1 0 0 0 0 0 0 0 29 112.7 0 0 0 0 0 1 0 0 0 0 0 0 30 115.3 0 0 0 0 0 0 1 0 0 0 0 0 31 139.4 0 0 0 0 0 0 0 1 0 0 0 0 32 119.0 0 0 0 0 0 0 0 0 1 0 0 0 33 97.4 0 0 0 0 0 0 0 0 0 1 0 0 34 154.0 0 0 0 0 0 0 0 0 0 0 1 0 35 81.5 0 0 0 0 0 0 0 0 0 0 0 1 36 88.8 0 0 0 0 0 0 0 0 0 0 0 0 37 127.7 1 1 0 0 0 0 0 0 0 0 0 0 38 105.1 1 0 1 0 0 0 0 0 0 0 0 0 39 114.9 1 0 0 1 0 0 0 0 0 0 0 0 40 106.4 1 0 0 0 1 0 0 0 0 0 0 0 41 104.5 1 0 0 0 0 1 0 0 0 0 0 0 42 121.6 1 0 0 0 0 0 1 0 0 0 0 0 43 141.4 1 0 0 0 0 0 0 1 0 0 0 0 44 99.0 1 0 0 0 0 0 0 0 1 0 0 0 45 126.7 1 0 0 0 0 0 0 0 0 1 0 0 46 134.1 1 0 0 0 0 0 0 0 0 0 1 0 47 81.3 1 0 0 0 0 0 0 0 0 0 0 1 48 88.6 1 0 0 0 0 0 0 0 0 0 0 0 49 132.7 1 1 0 0 0 0 0 0 0 0 0 0 50 132.9 1 0 1 0 0 0 0 0 0 0 0 0 51 134.4 1 0 0 1 0 0 0 0 0 0 0 0 52 103.7 1 0 0 0 1 0 0 0 0 0 0 0 53 119.7 1 0 0 0 0 1 0 0 0 0 0 0 54 115.0 1 0 0 0 0 0 1 0 0 0 0 0 55 132.9 1 0 0 0 0 0 0 1 0 0 0 0 56 108.5 1 0 0 0 0 0 0 0 1 0 0 0 57 113.9 1 0 0 0 0 0 0 0 0 1 0 0 58 142.9 1 0 0 0 0 0 0 0 0 0 1 0 59 95.2 1 0 0 0 0 0 0 0 0 0 0 1 60 93.0 1 0 0 0 0 0 0 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X M1 M2 M3 M4 81.305 9.838 35.620 33.560 29.760 16.840 M5 M6 M7 M8 M9 M10 19.040 24.440 44.540 22.700 23.020 48.440 M11 -3.620 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -25.34500 -5.76250 -0.02375 7.25500 24.25500 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 81.305 5.306 15.324 < 2e-16 *** X 9.838 3.043 3.233 0.002244 ** M1 35.620 7.304 4.877 1.27e-05 *** M2 33.560 7.304 4.595 3.26e-05 *** M3 29.760 7.304 4.075 0.000176 *** M4 16.840 7.304 2.306 0.025585 * M5 19.040 7.304 2.607 0.012202 * M6 24.440 7.304 3.346 0.001618 ** M7 44.540 7.304 6.098 1.91e-07 *** M8 22.700 7.304 3.108 0.003193 ** M9 23.020 7.304 3.152 0.002823 ** M10 48.440 7.304 6.632 2.95e-08 *** M11 -3.620 7.304 -0.496 0.622450 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.55 on 47 degrees of freedom Multiple R-squared: 0.7033, Adjusted R-squared: 0.6276 F-statistic: 9.285 on 12 and 47 DF, p-value: 8.063e-09 > postscript(file="/var/www/html/freestat/rcomp/tmp/1f6cf1229785781.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/2ie181229785781.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/3sk821229785781.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/4o3bw1229785781.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/5zgl51229785781.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 3.3750 18.5350 -1.6650 -4.9450 -9.1450 -6.5450 -17.6450 -2.5050 9 10 11 12 13 14 15 16 2.5750 -25.3450 0.2150 -21.3050 -17.4250 -19.8650 -5.4650 4.3550 17 18 19 20 21 22 23 24 -7.0450 -8.4450 1.1550 7.6950 -7.9250 3.2550 -5.4850 14.4950 25 26 27 28 29 30 31 32 7.1750 12.7350 -0.3650 6.4550 12.3550 9.5550 13.5550 14.9950 33 34 35 36 37 38 39 40 -6.9250 24.2550 3.8150 7.4950 0.9375 -19.6025 -6.0025 -1.5825 41 42 43 44 45 46 47 48 -5.6825 6.0175 5.7175 -14.8425 12.5375 -5.4825 -6.2225 -2.5425 49 50 51 52 53 54 55 56 5.9375 8.1975 13.4975 -4.2825 9.5175 -0.5825 -2.7825 -5.3425 57 58 59 60 -0.2625 3.3175 7.6775 1.8575 > postscript(file="/var/www/html/freestat/rcomp/tmp/6ushv1229785781.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 3.3750 NA 1 18.5350 3.3750 2 -1.6650 18.5350 3 -4.9450 -1.6650 4 -9.1450 -4.9450 5 -6.5450 -9.1450 6 -17.6450 -6.5450 7 -2.5050 -17.6450 8 2.5750 -2.5050 9 -25.3450 2.5750 10 0.2150 -25.3450 11 -21.3050 0.2150 12 -17.4250 -21.3050 13 -19.8650 -17.4250 14 -5.4650 -19.8650 15 4.3550 -5.4650 16 -7.0450 4.3550 17 -8.4450 -7.0450 18 1.1550 -8.4450 19 7.6950 1.1550 20 -7.9250 7.6950 21 3.2550 -7.9250 22 -5.4850 3.2550 23 14.4950 -5.4850 24 7.1750 14.4950 25 12.7350 7.1750 26 -0.3650 12.7350 27 6.4550 -0.3650 28 12.3550 6.4550 29 9.5550 12.3550 30 13.5550 9.5550 31 14.9950 13.5550 32 -6.9250 14.9950 33 24.2550 -6.9250 34 3.8150 24.2550 35 7.4950 3.8150 36 0.9375 7.4950 37 -19.6025 0.9375 38 -6.0025 -19.6025 39 -1.5825 -6.0025 40 -5.6825 -1.5825 41 6.0175 -5.6825 42 5.7175 6.0175 43 -14.8425 5.7175 44 12.5375 -14.8425 45 -5.4825 12.5375 46 -6.2225 -5.4825 47 -2.5425 -6.2225 48 5.9375 -2.5425 49 8.1975 5.9375 50 13.4975 8.1975 51 -4.2825 13.4975 52 9.5175 -4.2825 53 -0.5825 9.5175 54 -2.7825 -0.5825 55 -5.3425 -2.7825 56 -0.2625 -5.3425 57 3.3175 -0.2625 58 7.6775 3.3175 59 1.8575 7.6775 60 NA 1.8575 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 18.5350 3.3750 [2,] -1.6650 18.5350 [3,] -4.9450 -1.6650 [4,] -9.1450 -4.9450 [5,] -6.5450 -9.1450 [6,] -17.6450 -6.5450 [7,] -2.5050 -17.6450 [8,] 2.5750 -2.5050 [9,] -25.3450 2.5750 [10,] 0.2150 -25.3450 [11,] -21.3050 0.2150 [12,] -17.4250 -21.3050 [13,] -19.8650 -17.4250 [14,] -5.4650 -19.8650 [15,] 4.3550 -5.4650 [16,] -7.0450 4.3550 [17,] -8.4450 -7.0450 [18,] 1.1550 -8.4450 [19,] 7.6950 1.1550 [20,] -7.9250 7.6950 [21,] 3.2550 -7.9250 [22,] -5.4850 3.2550 [23,] 14.4950 -5.4850 [24,] 7.1750 14.4950 [25,] 12.7350 7.1750 [26,] -0.3650 12.7350 [27,] 6.4550 -0.3650 [28,] 12.3550 6.4550 [29,] 9.5550 12.3550 [30,] 13.5550 9.5550 [31,] 14.9950 13.5550 [32,] -6.9250 14.9950 [33,] 24.2550 -6.9250 [34,] 3.8150 24.2550 [35,] 7.4950 3.8150 [36,] 0.9375 7.4950 [37,] -19.6025 0.9375 [38,] -6.0025 -19.6025 [39,] -1.5825 -6.0025 [40,] -5.6825 -1.5825 [41,] 6.0175 -5.6825 [42,] 5.7175 6.0175 [43,] -14.8425 5.7175 [44,] 12.5375 -14.8425 [45,] -5.4825 12.5375 [46,] -6.2225 -5.4825 [47,] -2.5425 -6.2225 [48,] 5.9375 -2.5425 [49,] 8.1975 5.9375 [50,] 13.4975 8.1975 [51,] -4.2825 13.4975 [52,] 9.5175 -4.2825 [53,] -0.5825 9.5175 [54,] -2.7825 -0.5825 [55,] -5.3425 -2.7825 [56,] -0.2625 -5.3425 [57,] 3.3175 -0.2625 [58,] 7.6775 3.3175 [59,] 1.8575 7.6775 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 18.5350 3.3750 2 -1.6650 18.5350 3 -4.9450 -1.6650 4 -9.1450 -4.9450 5 -6.5450 -9.1450 6 -17.6450 -6.5450 7 -2.5050 -17.6450 8 2.5750 -2.5050 9 -25.3450 2.5750 10 0.2150 -25.3450 11 -21.3050 0.2150 12 -17.4250 -21.3050 13 -19.8650 -17.4250 14 -5.4650 -19.8650 15 4.3550 -5.4650 16 -7.0450 4.3550 17 -8.4450 -7.0450 18 1.1550 -8.4450 19 7.6950 1.1550 20 -7.9250 7.6950 21 3.2550 -7.9250 22 -5.4850 3.2550 23 14.4950 -5.4850 24 7.1750 14.4950 25 12.7350 7.1750 26 -0.3650 12.7350 27 6.4550 -0.3650 28 12.3550 6.4550 29 9.5550 12.3550 30 13.5550 9.5550 31 14.9950 13.5550 32 -6.9250 14.9950 33 24.2550 -6.9250 34 3.8150 24.2550 35 7.4950 3.8150 36 0.9375 7.4950 37 -19.6025 0.9375 38 -6.0025 -19.6025 39 -1.5825 -6.0025 40 -5.6825 -1.5825 41 6.0175 -5.6825 42 5.7175 6.0175 43 -14.8425 5.7175 44 12.5375 -14.8425 45 -5.4825 12.5375 46 -6.2225 -5.4825 47 -2.5425 -6.2225 48 5.9375 -2.5425 49 8.1975 5.9375 50 13.4975 8.1975 51 -4.2825 13.4975 52 9.5175 -4.2825 53 -0.5825 9.5175 54 -2.7825 -0.5825 55 -5.3425 -2.7825 56 -0.2625 -5.3425 57 3.3175 -0.2625 58 7.6775 3.3175 59 1.8575 7.6775 > 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/7hral1229785781.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/84vsr1229785781.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/9tq361229785781.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/10c3x91229785781.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/11wh7m1229785781.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/12t7of1229785781.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/139gxl1229785782.tab") > > system("convert tmp/1f6cf1229785781.ps tmp/1f6cf1229785781.png") > system("convert tmp/2ie181229785781.ps tmp/2ie181229785781.png") > system("convert tmp/3sk821229785781.ps tmp/3sk821229785781.png") > system("convert tmp/4o3bw1229785781.ps tmp/4o3bw1229785781.png") > system("convert tmp/5zgl51229785781.ps tmp/5zgl51229785781.png") > system("convert tmp/6ushv1229785781.ps tmp/6ushv1229785781.png") > system("convert tmp/7hral1229785781.ps tmp/7hral1229785781.png") > system("convert tmp/84vsr1229785781.ps tmp/84vsr1229785781.png") > system("convert tmp/9tq361229785781.ps tmp/9tq361229785781.png") > > > proc.time() user system elapsed 3.072 2.307 4.340