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(117,0,103.8,0,100.8,0,110.6,0,104,0,112.6,0,107.3,0,98.9,0,109.8,0,104.9,0,102.2,0,123.9,0,124.9,0,112.7,0,121.9,0,100.6,0,104.3,0,120.4,0,107.5,0,102.9,0,125.6,0,107.5,0,108.8,0,128.4,1,121.1,1,119.5,1,128.7,1,108.7,1,105.5,1,119.8,1,111.3,1,110.6,1,120.1,1,97.5,1,107.7,1,127.3,1,117.2,1,119.8,1,116.2,1,111,1,112.4,1,130.6,1,109.1,1,118.8,1,123.9,1,101.6,1,112.8,1,128,1,129.6,1,125.8,1,119.5,1,115.7,1,113.6,1,129.7,1,112,1,116.8,1,127,1,112.9,1,113.3,1,121.7,1),dim=c(2,60),dimnames=list(c('Cons','Reg'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Cons','Reg'),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 Cons Reg M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 117.0 0 1 0 0 0 0 0 0 0 0 0 0 1 2 103.8 0 0 1 0 0 0 0 0 0 0 0 0 2 3 100.8 0 0 0 1 0 0 0 0 0 0 0 0 3 4 110.6 0 0 0 0 1 0 0 0 0 0 0 0 4 5 104.0 0 0 0 0 0 1 0 0 0 0 0 0 5 6 112.6 0 0 0 0 0 0 1 0 0 0 0 0 6 7 107.3 0 0 0 0 0 0 0 1 0 0 0 0 7 8 98.9 0 0 0 0 0 0 0 0 1 0 0 0 8 9 109.8 0 0 0 0 0 0 0 0 0 1 0 0 9 10 104.9 0 0 0 0 0 0 0 0 0 0 1 0 10 11 102.2 0 0 0 0 0 0 0 0 0 0 0 1 11 12 123.9 0 0 0 0 0 0 0 0 0 0 0 0 12 13 124.9 0 1 0 0 0 0 0 0 0 0 0 0 13 14 112.7 0 0 1 0 0 0 0 0 0 0 0 0 14 15 121.9 0 0 0 1 0 0 0 0 0 0 0 0 15 16 100.6 0 0 0 0 1 0 0 0 0 0 0 0 16 17 104.3 0 0 0 0 0 1 0 0 0 0 0 0 17 18 120.4 0 0 0 0 0 0 1 0 0 0 0 0 18 19 107.5 0 0 0 0 0 0 0 1 0 0 0 0 19 20 102.9 0 0 0 0 0 0 0 0 1 0 0 0 20 21 125.6 0 0 0 0 0 0 0 0 0 1 0 0 21 22 107.5 0 0 0 0 0 0 0 0 0 0 1 0 22 23 108.8 0 0 0 0 0 0 0 0 0 0 0 1 23 24 128.4 1 0 0 0 0 0 0 0 0 0 0 0 24 25 121.1 1 1 0 0 0 0 0 0 0 0 0 0 25 26 119.5 1 0 1 0 0 0 0 0 0 0 0 0 26 27 128.7 1 0 0 1 0 0 0 0 0 0 0 0 27 28 108.7 1 0 0 0 1 0 0 0 0 0 0 0 28 29 105.5 1 0 0 0 0 1 0 0 0 0 0 0 29 30 119.8 1 0 0 0 0 0 1 0 0 0 0 0 30 31 111.3 1 0 0 0 0 0 0 1 0 0 0 0 31 32 110.6 1 0 0 0 0 0 0 0 1 0 0 0 32 33 120.1 1 0 0 0 0 0 0 0 0 1 0 0 33 34 97.5 1 0 0 0 0 0 0 0 0 0 1 0 34 35 107.7 1 0 0 0 0 0 0 0 0 0 0 1 35 36 127.3 1 0 0 0 0 0 0 0 0 0 0 0 36 37 117.2 1 1 0 0 0 0 0 0 0 0 0 0 37 38 119.8 1 0 1 0 0 0 0 0 0 0 0 0 38 39 116.2 1 0 0 1 0 0 0 0 0 0 0 0 39 40 111.0 1 0 0 0 1 0 0 0 0 0 0 0 40 41 112.4 1 0 0 0 0 1 0 0 0 0 0 0 41 42 130.6 1 0 0 0 0 0 1 0 0 0 0 0 42 43 109.1 1 0 0 0 0 0 0 1 0 0 0 0 43 44 118.8 1 0 0 0 0 0 0 0 1 0 0 0 44 45 123.9 1 0 0 0 0 0 0 0 0 1 0 0 45 46 101.6 1 0 0 0 0 0 0 0 0 0 1 0 46 47 112.8 1 0 0 0 0 0 0 0 0 0 0 1 47 48 128.0 1 0 0 0 0 0 0 0 0 0 0 0 48 49 129.6 1 1 0 0 0 0 0 0 0 0 0 0 49 50 125.8 1 0 1 0 0 0 0 0 0 0 0 0 50 51 119.5 1 0 0 1 0 0 0 0 0 0 0 0 51 52 115.7 1 0 0 0 1 0 0 0 0 0 0 0 52 53 113.6 1 0 0 0 0 1 0 0 0 0 0 0 53 54 129.7 1 0 0 0 0 0 1 0 0 0 0 0 54 55 112.0 1 0 0 0 0 0 0 1 0 0 0 0 55 56 116.8 1 0 0 0 0 0 0 0 1 0 0 0 56 57 127.0 1 0 0 0 0 0 0 0 0 1 0 0 57 58 112.9 1 0 0 0 0 0 0 0 0 0 1 0 58 59 113.3 1 0 0 0 0 0 0 0 0 0 0 1 59 60 121.7 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) Reg M1 M2 M3 M4 117.8585 -0.1866 -1.4468 -7.3132 -6.4396 -14.7660 M5 M6 M7 M8 M9 M10 -16.3524 -1.9189 -15.3253 -15.3917 -3.9381 -20.5645 M11 t -16.7109 0.2264 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -11.2981 -2.7588 0.3613 2.4989 11.3546 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 117.85851 2.65088 44.460 < 2e-16 *** Reg -0.18659 2.58905 -0.072 0.94286 M1 -1.44681 3.22101 -0.449 0.65541 M2 -7.31322 3.21341 -2.276 0.02756 * M3 -6.43963 3.20749 -2.008 0.05057 . M4 -14.76604 3.20325 -4.610 3.21e-05 *** M5 -16.35245 3.20071 -5.109 6.09e-06 *** M6 -1.91886 3.19986 -0.600 0.55167 M7 -15.32527 3.20071 -4.788 1.78e-05 *** M8 -15.39168 3.20325 -4.805 1.69e-05 *** M9 -3.93809 3.20749 -1.228 0.22578 M10 -20.56450 3.21341 -6.400 7.27e-08 *** M11 -16.71091 3.22101 -5.188 4.66e-06 *** t 0.22641 0.07369 3.072 0.00356 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.041 on 46 degrees of freedom Multiple R-squared: 0.7551, Adjusted R-squared: 0.6858 F-statistic: 10.91 on 13 and 46 DF, p-value: 4.485e-10 > postscript(file="/var/www/html/freestat/rcomp/tmp/1t4hs1229420177.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/2tsu61229420177.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/3fsbz1229420177.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/4nmwp1229420177.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/5nlab1229420177.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 0.36189011 -7.19810989 -11.29810989 6.60189011 1.36189011 -4.69810989 7 8 9 10 11 12 3.18189011 -5.37810989 -6.15810989 5.34189011 -1.43810989 3.32457143 13 14 15 16 17 18 5.54496703 -1.01503297 7.08496703 -6.11503297 -1.05503297 0.38496703 19 20 21 22 23 24 0.66496703 -4.09503297 6.92496703 5.22496703 2.44496703 5.29424176 25 26 27 28 29 30 -0.78536264 3.25463736 11.35463736 -0.54536264 -2.38536264 -2.74536264 31 32 33 34 35 36 1.93463736 1.07463736 -1.10536264 -7.30536264 -1.18536264 1.47731868 37 38 39 40 41 42 -7.40228571 0.83771429 -3.86228571 -0.96228571 1.79771429 5.33771429 43 44 45 46 47 48 -2.98228571 6.55771429 -0.02228571 -5.92228571 1.19771429 -0.53960440 49 50 51 52 53 54 2.28079121 4.12079121 -3.27920879 1.02079121 0.28079121 1.72079121 55 56 57 58 59 60 -2.79920879 1.84079121 0.36079121 2.66079121 -1.01920879 -9.55652747 > postscript(file="/var/www/html/freestat/rcomp/tmp/6lb9z1229420177.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.36189011 NA 1 -7.19810989 0.36189011 2 -11.29810989 -7.19810989 3 6.60189011 -11.29810989 4 1.36189011 6.60189011 5 -4.69810989 1.36189011 6 3.18189011 -4.69810989 7 -5.37810989 3.18189011 8 -6.15810989 -5.37810989 9 5.34189011 -6.15810989 10 -1.43810989 5.34189011 11 3.32457143 -1.43810989 12 5.54496703 3.32457143 13 -1.01503297 5.54496703 14 7.08496703 -1.01503297 15 -6.11503297 7.08496703 16 -1.05503297 -6.11503297 17 0.38496703 -1.05503297 18 0.66496703 0.38496703 19 -4.09503297 0.66496703 20 6.92496703 -4.09503297 21 5.22496703 6.92496703 22 2.44496703 5.22496703 23 5.29424176 2.44496703 24 -0.78536264 5.29424176 25 3.25463736 -0.78536264 26 11.35463736 3.25463736 27 -0.54536264 11.35463736 28 -2.38536264 -0.54536264 29 -2.74536264 -2.38536264 30 1.93463736 -2.74536264 31 1.07463736 1.93463736 32 -1.10536264 1.07463736 33 -7.30536264 -1.10536264 34 -1.18536264 -7.30536264 35 1.47731868 -1.18536264 36 -7.40228571 1.47731868 37 0.83771429 -7.40228571 38 -3.86228571 0.83771429 39 -0.96228571 -3.86228571 40 1.79771429 -0.96228571 41 5.33771429 1.79771429 42 -2.98228571 5.33771429 43 6.55771429 -2.98228571 44 -0.02228571 6.55771429 45 -5.92228571 -0.02228571 46 1.19771429 -5.92228571 47 -0.53960440 1.19771429 48 2.28079121 -0.53960440 49 4.12079121 2.28079121 50 -3.27920879 4.12079121 51 1.02079121 -3.27920879 52 0.28079121 1.02079121 53 1.72079121 0.28079121 54 -2.79920879 1.72079121 55 1.84079121 -2.79920879 56 0.36079121 1.84079121 57 2.66079121 0.36079121 58 -1.01920879 2.66079121 59 -9.55652747 -1.01920879 60 NA -9.55652747 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -7.19810989 0.36189011 [2,] -11.29810989 -7.19810989 [3,] 6.60189011 -11.29810989 [4,] 1.36189011 6.60189011 [5,] -4.69810989 1.36189011 [6,] 3.18189011 -4.69810989 [7,] -5.37810989 3.18189011 [8,] -6.15810989 -5.37810989 [9,] 5.34189011 -6.15810989 [10,] -1.43810989 5.34189011 [11,] 3.32457143 -1.43810989 [12,] 5.54496703 3.32457143 [13,] -1.01503297 5.54496703 [14,] 7.08496703 -1.01503297 [15,] -6.11503297 7.08496703 [16,] -1.05503297 -6.11503297 [17,] 0.38496703 -1.05503297 [18,] 0.66496703 0.38496703 [19,] -4.09503297 0.66496703 [20,] 6.92496703 -4.09503297 [21,] 5.22496703 6.92496703 [22,] 2.44496703 5.22496703 [23,] 5.29424176 2.44496703 [24,] -0.78536264 5.29424176 [25,] 3.25463736 -0.78536264 [26,] 11.35463736 3.25463736 [27,] -0.54536264 11.35463736 [28,] -2.38536264 -0.54536264 [29,] -2.74536264 -2.38536264 [30,] 1.93463736 -2.74536264 [31,] 1.07463736 1.93463736 [32,] -1.10536264 1.07463736 [33,] -7.30536264 -1.10536264 [34,] -1.18536264 -7.30536264 [35,] 1.47731868 -1.18536264 [36,] -7.40228571 1.47731868 [37,] 0.83771429 -7.40228571 [38,] -3.86228571 0.83771429 [39,] -0.96228571 -3.86228571 [40,] 1.79771429 -0.96228571 [41,] 5.33771429 1.79771429 [42,] -2.98228571 5.33771429 [43,] 6.55771429 -2.98228571 [44,] -0.02228571 6.55771429 [45,] -5.92228571 -0.02228571 [46,] 1.19771429 -5.92228571 [47,] -0.53960440 1.19771429 [48,] 2.28079121 -0.53960440 [49,] 4.12079121 2.28079121 [50,] -3.27920879 4.12079121 [51,] 1.02079121 -3.27920879 [52,] 0.28079121 1.02079121 [53,] 1.72079121 0.28079121 [54,] -2.79920879 1.72079121 [55,] 1.84079121 -2.79920879 [56,] 0.36079121 1.84079121 [57,] 2.66079121 0.36079121 [58,] -1.01920879 2.66079121 [59,] -9.55652747 -1.01920879 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -7.19810989 0.36189011 2 -11.29810989 -7.19810989 3 6.60189011 -11.29810989 4 1.36189011 6.60189011 5 -4.69810989 1.36189011 6 3.18189011 -4.69810989 7 -5.37810989 3.18189011 8 -6.15810989 -5.37810989 9 5.34189011 -6.15810989 10 -1.43810989 5.34189011 11 3.32457143 -1.43810989 12 5.54496703 3.32457143 13 -1.01503297 5.54496703 14 7.08496703 -1.01503297 15 -6.11503297 7.08496703 16 -1.05503297 -6.11503297 17 0.38496703 -1.05503297 18 0.66496703 0.38496703 19 -4.09503297 0.66496703 20 6.92496703 -4.09503297 21 5.22496703 6.92496703 22 2.44496703 5.22496703 23 5.29424176 2.44496703 24 -0.78536264 5.29424176 25 3.25463736 -0.78536264 26 11.35463736 3.25463736 27 -0.54536264 11.35463736 28 -2.38536264 -0.54536264 29 -2.74536264 -2.38536264 30 1.93463736 -2.74536264 31 1.07463736 1.93463736 32 -1.10536264 1.07463736 33 -7.30536264 -1.10536264 34 -1.18536264 -7.30536264 35 1.47731868 -1.18536264 36 -7.40228571 1.47731868 37 0.83771429 -7.40228571 38 -3.86228571 0.83771429 39 -0.96228571 -3.86228571 40 1.79771429 -0.96228571 41 5.33771429 1.79771429 42 -2.98228571 5.33771429 43 6.55771429 -2.98228571 44 -0.02228571 6.55771429 45 -5.92228571 -0.02228571 46 1.19771429 -5.92228571 47 -0.53960440 1.19771429 48 2.28079121 -0.53960440 49 4.12079121 2.28079121 50 -3.27920879 4.12079121 51 1.02079121 -3.27920879 52 0.28079121 1.02079121 53 1.72079121 0.28079121 54 -2.79920879 1.72079121 55 1.84079121 -2.79920879 56 0.36079121 1.84079121 57 2.66079121 0.36079121 58 -1.01920879 2.66079121 59 -9.55652747 -1.01920879 > 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/790pf1229420177.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/8sbkq1229420177.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/99h221229420177.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/10xvli1229420177.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/11vpaj1229420177.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/1270iy1229420177.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/13q3w21229420177.tab") > > system("convert tmp/1t4hs1229420177.ps tmp/1t4hs1229420177.png") > system("convert tmp/2tsu61229420177.ps tmp/2tsu61229420177.png") > system("convert tmp/3fsbz1229420177.ps tmp/3fsbz1229420177.png") > system("convert tmp/4nmwp1229420177.ps tmp/4nmwp1229420177.png") > system("convert tmp/5nlab1229420177.ps tmp/5nlab1229420177.png") > system("convert tmp/6lb9z1229420177.ps tmp/6lb9z1229420177.png") > system("convert tmp/790pf1229420177.ps tmp/790pf1229420177.png") > system("convert tmp/8sbkq1229420177.ps tmp/8sbkq1229420177.png") > system("convert tmp/99h221229420177.ps tmp/99h221229420177.png") > > > proc.time() user system elapsed 3.227 2.391 3.951