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(11703.7,0,16283.6,0,16726.5,0,14968.9,0,14861,0,14583.3,0,15305.8,0,17903.9,0,16379.4,0,15420.3,0,17870.5,0,15912.8,0,13866.5,0,17823.2,0,17872,0,17420.4,0,16704.4,0,15991.2,0,16583.6,0,19123.5,0,17838.7,0,17209.4,0,18586.5,0,16258.1,0,15141.6,0,19202.1,0,17746.5,0,19090.1,0,18040.3,0,17515.5,0,17751.8,0,21072.4,0,17170,0,19439.5,0,19795.4,0,17574.9,0,16165.4,0,19464.6,0,19932.1,0,19961.2,0,17343.4,0,18924.2,0,18574.1,0,21350.6,0,18594.6,0,19823.1,0,20844.4,0,19640.2,0,17735.4,0,19813.6,0,22160,0,20664.3,1,17877.4,1,21211.2,1,21423.1,1,21688.7,1,23243.2,1,21490.2,1,22925.8,1,23184.8,1,18562.2,1),dim=c(2,61),dimnames=list(c('Uitvoer','x'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Uitvoer','x'),1:61)) > 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 Uitvoer x M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 11703.7 0 1 0 0 0 0 0 0 0 0 0 0 1 2 16283.6 0 0 1 0 0 0 0 0 0 0 0 0 2 3 16726.5 0 0 0 1 0 0 0 0 0 0 0 0 3 4 14968.9 0 0 0 0 1 0 0 0 0 0 0 0 4 5 14861.0 0 0 0 0 0 1 0 0 0 0 0 0 5 6 14583.3 0 0 0 0 0 0 1 0 0 0 0 0 6 7 15305.8 0 0 0 0 0 0 0 1 0 0 0 0 7 8 17903.9 0 0 0 0 0 0 0 0 1 0 0 0 8 9 16379.4 0 0 0 0 0 0 0 0 0 1 0 0 9 10 15420.3 0 0 0 0 0 0 0 0 0 0 1 0 10 11 17870.5 0 0 0 0 0 0 0 0 0 0 0 1 11 12 15912.8 0 0 0 0 0 0 0 0 0 0 0 0 12 13 13866.5 0 1 0 0 0 0 0 0 0 0 0 0 13 14 17823.2 0 0 1 0 0 0 0 0 0 0 0 0 14 15 17872.0 0 0 0 1 0 0 0 0 0 0 0 0 15 16 17420.4 0 0 0 0 1 0 0 0 0 0 0 0 16 17 16704.4 0 0 0 0 0 1 0 0 0 0 0 0 17 18 15991.2 0 0 0 0 0 0 1 0 0 0 0 0 18 19 16583.6 0 0 0 0 0 0 0 1 0 0 0 0 19 20 19123.5 0 0 0 0 0 0 0 0 1 0 0 0 20 21 17838.7 0 0 0 0 0 0 0 0 0 1 0 0 21 22 17209.4 0 0 0 0 0 0 0 0 0 0 1 0 22 23 18586.5 0 0 0 0 0 0 0 0 0 0 0 1 23 24 16258.1 0 0 0 0 0 0 0 0 0 0 0 0 24 25 15141.6 0 1 0 0 0 0 0 0 0 0 0 0 25 26 19202.1 0 0 1 0 0 0 0 0 0 0 0 0 26 27 17746.5 0 0 0 1 0 0 0 0 0 0 0 0 27 28 19090.1 0 0 0 0 1 0 0 0 0 0 0 0 28 29 18040.3 0 0 0 0 0 1 0 0 0 0 0 0 29 30 17515.5 0 0 0 0 0 0 1 0 0 0 0 0 30 31 17751.8 0 0 0 0 0 0 0 1 0 0 0 0 31 32 21072.4 0 0 0 0 0 0 0 0 1 0 0 0 32 33 17170.0 0 0 0 0 0 0 0 0 0 1 0 0 33 34 19439.5 0 0 0 0 0 0 0 0 0 0 1 0 34 35 19795.4 0 0 0 0 0 0 0 0 0 0 0 1 35 36 17574.9 0 0 0 0 0 0 0 0 0 0 0 0 36 37 16165.4 0 1 0 0 0 0 0 0 0 0 0 0 37 38 19464.6 0 0 1 0 0 0 0 0 0 0 0 0 38 39 19932.1 0 0 0 1 0 0 0 0 0 0 0 0 39 40 19961.2 0 0 0 0 1 0 0 0 0 0 0 0 40 41 17343.4 0 0 0 0 0 1 0 0 0 0 0 0 41 42 18924.2 0 0 0 0 0 0 1 0 0 0 0 0 42 43 18574.1 0 0 0 0 0 0 0 1 0 0 0 0 43 44 21350.6 0 0 0 0 0 0 0 0 1 0 0 0 44 45 18594.6 0 0 0 0 0 0 0 0 0 1 0 0 45 46 19823.1 0 0 0 0 0 0 0 0 0 0 1 0 46 47 20844.4 0 0 0 0 0 0 0 0 0 0 0 1 47 48 19640.2 0 0 0 0 0 0 0 0 0 0 0 0 48 49 17735.4 0 1 0 0 0 0 0 0 0 0 0 0 49 50 19813.6 0 0 1 0 0 0 0 0 0 0 0 0 50 51 22160.0 0 0 0 1 0 0 0 0 0 0 0 0 51 52 20664.3 1 0 0 0 1 0 0 0 0 0 0 0 52 53 17877.4 1 0 0 0 0 1 0 0 0 0 0 0 53 54 21211.2 1 0 0 0 0 0 1 0 0 0 0 0 54 55 21423.1 1 0 0 0 0 0 0 1 0 0 0 0 55 56 21688.7 1 0 0 0 0 0 0 0 1 0 0 0 56 57 23243.2 1 0 0 0 0 0 0 0 0 1 0 0 57 58 21490.2 1 0 0 0 0 0 0 0 0 0 1 0 58 59 22925.8 1 0 0 0 0 0 0 0 0 0 0 1 59 60 23184.8 1 0 0 0 0 0 0 0 0 0 0 0 60 61 18562.2 1 1 0 0 0 0 0 0 0 0 0 0 61 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x M1 M2 M3 M4 14807.23 657.57 -2466.52 1127.95 1398.63 701.36 M5 M6 M7 M8 M9 M10 -853.64 -273.18 -89.89 2110.93 428.97 360.97 M11 t 1589.68 99.32 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1997.57 -413.87 62.49 410.83 1760.97 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 14807.226 441.892 33.509 < 2e-16 *** x 657.574 378.701 1.736 0.089046 . M1 -2466.521 500.198 -4.931 1.06e-05 *** M2 1127.947 525.435 2.147 0.037010 * M3 1398.630 525.032 2.664 0.010548 * M4 701.358 525.141 1.336 0.188125 M5 -853.640 524.244 -1.628 0.110142 M6 -273.177 523.465 -0.522 0.604217 M7 -89.894 522.805 -0.172 0.864219 M8 2110.929 522.265 4.042 0.000195 *** M9 428.972 521.844 0.822 0.415211 M10 360.974 521.544 0.692 0.492263 M11 1589.677 521.363 3.049 0.003763 ** t 99.317 7.922 12.538 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 824.3 on 47 degrees of freedom Multiple R-squared: 0.9069, Adjusted R-squared: 0.8812 F-statistic: 35.23 on 13 and 47 DF, p-value: < 2.2e-16 > postscript(file="/var/www/html/freestat/rcomp/tmp/191511229259293.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/2f20v1229259293.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/3zh891229259293.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/41dy31229259293.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/583c51229259293.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 = 61 Frequency = 1 1 2 3 4 5 6 -736.321413 149.792958 222.692958 -936.952174 410.827826 -546.652174 7 8 9 10 11 12 -106.752174 191.207826 249.347826 -741.072174 381.107826 -86.232174 13 14 15 16 17 18 234.672108 497.586479 176.386479 322.741347 1062.421347 -330.558653 19 20 21 22 23 24 -20.758653 219.001347 516.841347 -143.778653 -94.698653 -932.738653 25 26 27 28 29 30 317.965629 684.680000 -1140.920000 800.634868 1206.514868 1.934868 31 32 33 34 35 36 -44.365132 976.094868 -1343.665132 894.514868 -77.605132 -807.745132 37 38 39 40 41 42 149.959150 -244.626479 -147.126479 479.928389 -682.191611 218.828389 43 44 45 46 47 48 -413.871611 62.488389 -1110.871611 86.308389 -220.411611 65.748389 49 50 51 52 53 54 528.152671 -1087.432958 888.967042 -666.352428 -1997.572428 656.447572 55 56 57 58 59 60 585.747572 -1448.792428 1688.347572 -95.972428 11.607572 1760.967572 61 -494.428146 > postscript(file="/var/www/html/freestat/rcomp/tmp/6mkgv1229259293.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 -736.321413 NA 1 149.792958 -736.321413 2 222.692958 149.792958 3 -936.952174 222.692958 4 410.827826 -936.952174 5 -546.652174 410.827826 6 -106.752174 -546.652174 7 191.207826 -106.752174 8 249.347826 191.207826 9 -741.072174 249.347826 10 381.107826 -741.072174 11 -86.232174 381.107826 12 234.672108 -86.232174 13 497.586479 234.672108 14 176.386479 497.586479 15 322.741347 176.386479 16 1062.421347 322.741347 17 -330.558653 1062.421347 18 -20.758653 -330.558653 19 219.001347 -20.758653 20 516.841347 219.001347 21 -143.778653 516.841347 22 -94.698653 -143.778653 23 -932.738653 -94.698653 24 317.965629 -932.738653 25 684.680000 317.965629 26 -1140.920000 684.680000 27 800.634868 -1140.920000 28 1206.514868 800.634868 29 1.934868 1206.514868 30 -44.365132 1.934868 31 976.094868 -44.365132 32 -1343.665132 976.094868 33 894.514868 -1343.665132 34 -77.605132 894.514868 35 -807.745132 -77.605132 36 149.959150 -807.745132 37 -244.626479 149.959150 38 -147.126479 -244.626479 39 479.928389 -147.126479 40 -682.191611 479.928389 41 218.828389 -682.191611 42 -413.871611 218.828389 43 62.488389 -413.871611 44 -1110.871611 62.488389 45 86.308389 -1110.871611 46 -220.411611 86.308389 47 65.748389 -220.411611 48 528.152671 65.748389 49 -1087.432958 528.152671 50 888.967042 -1087.432958 51 -666.352428 888.967042 52 -1997.572428 -666.352428 53 656.447572 -1997.572428 54 585.747572 656.447572 55 -1448.792428 585.747572 56 1688.347572 -1448.792428 57 -95.972428 1688.347572 58 11.607572 -95.972428 59 1760.967572 11.607572 60 -494.428146 1760.967572 61 NA -494.428146 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 149.792958 -736.321413 [2,] 222.692958 149.792958 [3,] -936.952174 222.692958 [4,] 410.827826 -936.952174 [5,] -546.652174 410.827826 [6,] -106.752174 -546.652174 [7,] 191.207826 -106.752174 [8,] 249.347826 191.207826 [9,] -741.072174 249.347826 [10,] 381.107826 -741.072174 [11,] -86.232174 381.107826 [12,] 234.672108 -86.232174 [13,] 497.586479 234.672108 [14,] 176.386479 497.586479 [15,] 322.741347 176.386479 [16,] 1062.421347 322.741347 [17,] -330.558653 1062.421347 [18,] -20.758653 -330.558653 [19,] 219.001347 -20.758653 [20,] 516.841347 219.001347 [21,] -143.778653 516.841347 [22,] -94.698653 -143.778653 [23,] -932.738653 -94.698653 [24,] 317.965629 -932.738653 [25,] 684.680000 317.965629 [26,] -1140.920000 684.680000 [27,] 800.634868 -1140.920000 [28,] 1206.514868 800.634868 [29,] 1.934868 1206.514868 [30,] -44.365132 1.934868 [31,] 976.094868 -44.365132 [32,] -1343.665132 976.094868 [33,] 894.514868 -1343.665132 [34,] -77.605132 894.514868 [35,] -807.745132 -77.605132 [36,] 149.959150 -807.745132 [37,] -244.626479 149.959150 [38,] -147.126479 -244.626479 [39,] 479.928389 -147.126479 [40,] -682.191611 479.928389 [41,] 218.828389 -682.191611 [42,] -413.871611 218.828389 [43,] 62.488389 -413.871611 [44,] -1110.871611 62.488389 [45,] 86.308389 -1110.871611 [46,] -220.411611 86.308389 [47,] 65.748389 -220.411611 [48,] 528.152671 65.748389 [49,] -1087.432958 528.152671 [50,] 888.967042 -1087.432958 [51,] -666.352428 888.967042 [52,] -1997.572428 -666.352428 [53,] 656.447572 -1997.572428 [54,] 585.747572 656.447572 [55,] -1448.792428 585.747572 [56,] 1688.347572 -1448.792428 [57,] -95.972428 1688.347572 [58,] 11.607572 -95.972428 [59,] 1760.967572 11.607572 [60,] -494.428146 1760.967572 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 149.792958 -736.321413 2 222.692958 149.792958 3 -936.952174 222.692958 4 410.827826 -936.952174 5 -546.652174 410.827826 6 -106.752174 -546.652174 7 191.207826 -106.752174 8 249.347826 191.207826 9 -741.072174 249.347826 10 381.107826 -741.072174 11 -86.232174 381.107826 12 234.672108 -86.232174 13 497.586479 234.672108 14 176.386479 497.586479 15 322.741347 176.386479 16 1062.421347 322.741347 17 -330.558653 1062.421347 18 -20.758653 -330.558653 19 219.001347 -20.758653 20 516.841347 219.001347 21 -143.778653 516.841347 22 -94.698653 -143.778653 23 -932.738653 -94.698653 24 317.965629 -932.738653 25 684.680000 317.965629 26 -1140.920000 684.680000 27 800.634868 -1140.920000 28 1206.514868 800.634868 29 1.934868 1206.514868 30 -44.365132 1.934868 31 976.094868 -44.365132 32 -1343.665132 976.094868 33 894.514868 -1343.665132 34 -77.605132 894.514868 35 -807.745132 -77.605132 36 149.959150 -807.745132 37 -244.626479 149.959150 38 -147.126479 -244.626479 39 479.928389 -147.126479 40 -682.191611 479.928389 41 218.828389 -682.191611 42 -413.871611 218.828389 43 62.488389 -413.871611 44 -1110.871611 62.488389 45 86.308389 -1110.871611 46 -220.411611 86.308389 47 65.748389 -220.411611 48 528.152671 65.748389 49 -1087.432958 528.152671 50 888.967042 -1087.432958 51 -666.352428 888.967042 52 -1997.572428 -666.352428 53 656.447572 -1997.572428 54 585.747572 656.447572 55 -1448.792428 585.747572 56 1688.347572 -1448.792428 57 -95.972428 1688.347572 58 11.607572 -95.972428 59 1760.967572 11.607572 60 -494.428146 1760.967572 > 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/7gmld1229259293.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/8lqjc1229259293.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/9iibx1229259293.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/10gv071229259293.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/118jzc1229259293.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/12ou5i1229259293.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/13pdsb1229259293.tab") > > system("convert tmp/191511229259293.ps tmp/191511229259293.png") > system("convert tmp/2f20v1229259293.ps tmp/2f20v1229259293.png") > system("convert tmp/3zh891229259293.ps tmp/3zh891229259293.png") > system("convert tmp/41dy31229259293.ps tmp/41dy31229259293.png") > system("convert tmp/583c51229259293.ps tmp/583c51229259293.png") > system("convert tmp/6mkgv1229259293.ps tmp/6mkgv1229259293.png") > system("convert tmp/7gmld1229259293.ps tmp/7gmld1229259293.png") > system("convert tmp/8lqjc1229259293.ps tmp/8lqjc1229259293.png") > system("convert tmp/9iibx1229259293.ps tmp/9iibx1229259293.png") > > > proc.time() user system elapsed 2.941 2.205 3.364