R version 2.6.0 (2007-10-03) Copyright (C) 2007 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. Natural language support but running in an English locale 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(0,115.4,0,106.9,0,107.1,0,99.3,0,99.2,0,108.3,0,105.6,0,99.5,0,107.4,0,93.1,0,88.1,0,110.7,0,113.1,0,99.6,0,93.6,0,98.6,0,99.6,0,114.3,1,107.8,1,101.2,1,112.5,1,100.5,1,93.9,1,116.2,1,112,1,106.4,1,95.7,1,96,1,95.8,1,103,1,102.2,1,98.4,1,111.4,1,86.6,1,91.3,1,107.9,1,101.8,1,104.4,1,93.4,1,100.1,1,98.5,1,112.9,1,101.4,1,107.1,1,110.8,1,90.3,1,95.5,1,111.4,1,113,1,107.5,1,95.9,1,106.3,1,105.2,1,117.2,1,106.9,1,108.2,1,110,1,96.1,1,100.6),dim=c(2,59),dimnames=list(c('A','B '),1:59)) > y <- array(NA,dim=c(2,59),dimnames=list(c('A','B '),1:59)) > 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 = '2' > #'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 B\r A M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 115.4 0 1 0 0 0 0 0 0 0 0 0 0 1 2 106.9 0 0 1 0 0 0 0 0 0 0 0 0 2 3 107.1 0 0 0 1 0 0 0 0 0 0 0 0 3 4 99.3 0 0 0 0 1 0 0 0 0 0 0 0 4 5 99.2 0 0 0 0 0 1 0 0 0 0 0 0 5 6 108.3 0 0 0 0 0 0 1 0 0 0 0 0 6 7 105.6 0 0 0 0 0 0 0 1 0 0 0 0 7 8 99.5 0 0 0 0 0 0 0 0 1 0 0 0 8 9 107.4 0 0 0 0 0 0 0 0 0 1 0 0 9 10 93.1 0 0 0 0 0 0 0 0 0 0 1 0 10 11 88.1 0 0 0 0 0 0 0 0 0 0 0 1 11 12 110.7 0 0 0 0 0 0 0 0 0 0 0 0 12 13 113.1 0 1 0 0 0 0 0 0 0 0 0 0 13 14 99.6 0 0 1 0 0 0 0 0 0 0 0 0 14 15 93.6 0 0 0 1 0 0 0 0 0 0 0 0 15 16 98.6 0 0 0 0 1 0 0 0 0 0 0 0 16 17 99.6 0 0 0 0 0 1 0 0 0 0 0 0 17 18 114.3 0 0 0 0 0 0 1 0 0 0 0 0 18 19 107.8 1 0 0 0 0 0 0 1 0 0 0 0 19 20 101.2 1 0 0 0 0 0 0 0 1 0 0 0 20 21 112.5 1 0 0 0 0 0 0 0 0 1 0 0 21 22 100.5 1 0 0 0 0 0 0 0 0 0 1 0 22 23 93.9 1 0 0 0 0 0 0 0 0 0 0 1 23 24 116.2 1 0 0 0 0 0 0 0 0 0 0 0 24 25 112.0 1 1 0 0 0 0 0 0 0 0 0 0 25 26 106.4 1 0 1 0 0 0 0 0 0 0 0 0 26 27 95.7 1 0 0 1 0 0 0 0 0 0 0 0 27 28 96.0 1 0 0 0 1 0 0 0 0 0 0 0 28 29 95.8 1 0 0 0 0 1 0 0 0 0 0 0 29 30 103.0 1 0 0 0 0 0 1 0 0 0 0 0 30 31 102.2 1 0 0 0 0 0 0 1 0 0 0 0 31 32 98.4 1 0 0 0 0 0 0 0 1 0 0 0 32 33 111.4 1 0 0 0 0 0 0 0 0 1 0 0 33 34 86.6 1 0 0 0 0 0 0 0 0 0 1 0 34 35 91.3 1 0 0 0 0 0 0 0 0 0 0 1 35 36 107.9 1 0 0 0 0 0 0 0 0 0 0 0 36 37 101.8 1 1 0 0 0 0 0 0 0 0 0 0 37 38 104.4 1 0 1 0 0 0 0 0 0 0 0 0 38 39 93.4 1 0 0 1 0 0 0 0 0 0 0 0 39 40 100.1 1 0 0 0 1 0 0 0 0 0 0 0 40 41 98.5 1 0 0 0 0 1 0 0 0 0 0 0 41 42 112.9 1 0 0 0 0 0 1 0 0 0 0 0 42 43 101.4 1 0 0 0 0 0 0 1 0 0 0 0 43 44 107.1 1 0 0 0 0 0 0 0 1 0 0 0 44 45 110.8 1 0 0 0 0 0 0 0 0 1 0 0 45 46 90.3 1 0 0 0 0 0 0 0 0 0 1 0 46 47 95.5 1 0 0 0 0 0 0 0 0 0 0 1 47 48 111.4 1 0 0 0 0 0 0 0 0 0 0 0 48 49 113.0 1 1 0 0 0 0 0 0 0 0 0 0 49 50 107.5 1 0 1 0 0 0 0 0 0 0 0 0 50 51 95.9 1 0 0 1 0 0 0 0 0 0 0 0 51 52 106.3 1 0 0 0 1 0 0 0 0 0 0 0 52 53 105.2 1 0 0 0 0 1 0 0 0 0 0 0 53 54 117.2 1 0 0 0 0 0 1 0 0 0 0 0 54 55 106.9 1 0 0 0 0 0 0 1 0 0 0 0 55 56 108.2 1 0 0 0 0 0 0 0 1 0 0 0 56 57 110.0 1 0 0 0 0 0 0 0 0 1 0 0 57 58 96.1 1 0 0 0 0 0 0 0 0 0 1 0 58 59 100.6 1 0 0 0 0 0 0 0 0 0 0 1 59 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) A M1 M2 M3 M4 110.60858 -1.81895 -0.37857 -6.55542 -14.45228 -11.60913 M5 M6 M7 M8 M9 M10 -12.08599 -0.68284 -6.75591 -8.73276 -1.26962 -18.44647 M11 t -17.96332 0.07685 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.4547 -2.4938 -0.1547 2.0192 10.7131 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 110.60858 2.39372 46.208 < 2e-16 *** A -1.81895 2.06351 -0.881 0.382741 M1 -0.37857 2.90409 -0.130 0.896864 M2 -6.55542 2.90403 -2.257 0.028886 * M3 -14.45228 2.90503 -4.975 1.00e-05 *** M4 -11.60913 2.90708 -3.993 0.000238 *** M5 -12.08599 2.91019 -4.153 0.000144 *** M6 -0.68284 2.91435 -0.234 0.815812 M7 -6.75591 2.89867 -2.331 0.024310 * M8 -8.73276 2.89869 -3.013 0.004240 ** M9 -1.26962 2.89977 -0.438 0.663601 M10 -18.44647 2.90191 -6.357 9.21e-08 *** M11 -17.96332 2.90510 -6.183 1.67e-07 *** t 0.07685 0.05543 1.386 0.172437 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 4.32 on 45 degrees of freedom Multiple R-Squared: 0.7446, Adjusted R-squared: 0.6708 F-statistic: 10.09 on 13 and 45 DF, p-value: 1.948e-09 > postscript(file="/var/www/html/rcomp/tmp/1yl3w1195401892.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/20xxq1195401892.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/38eqa1195401892.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/4rgxe1195401892.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/5dg3e1195401892.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 = 59 Frequency = 1 1 2 3 4 5 6 5.09313492 2.69313492 10.71313492 -0.00686508 0.29313492 -2.08686508 7 8 9 10 11 12 1.20934524 -2.99065476 -2.63065476 0.16934524 -5.39065476 -0.83083333 13 14 15 16 17 18 1.87088294 -5.52911706 -3.70911706 -1.62911706 -0.22911706 2.99088294 19 20 21 22 23 24 4.30604167 -0.39395833 3.36604167 8.46604167 1.30604167 5.56586310 25 26 27 28 29 30 1.66757937 2.16757937 -0.71242063 -3.33242063 -3.13242063 -7.41242063 31 32 33 34 35 36 -2.21621032 -4.11621032 1.34378968 -6.35621032 -2.21621032 -3.65638889 37 38 39 40 41 42 -9.45467262 -0.75467262 -3.93467262 -0.15467262 -1.35467262 1.56532738 43 44 45 46 47 48 -3.93846230 3.66153770 -0.17846230 -3.57846230 1.06153770 -1.07864087 49 50 51 52 53 54 0.82307540 1.42307540 -2.35692460 5.12307540 4.42307540 4.94307540 55 56 57 58 59 0.63928571 3.83928571 -1.90071429 1.29928571 5.23928571 > postscript(file="/var/www/html/rcomp/tmp/6s7jn1195401892.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 = 59 Frequency = 1 lag(myerror, k = 1) myerror 0 5.09313492 NA 1 2.69313492 5.09313492 2 10.71313492 2.69313492 3 -0.00686508 10.71313492 4 0.29313492 -0.00686508 5 -2.08686508 0.29313492 6 1.20934524 -2.08686508 7 -2.99065476 1.20934524 8 -2.63065476 -2.99065476 9 0.16934524 -2.63065476 10 -5.39065476 0.16934524 11 -0.83083333 -5.39065476 12 1.87088294 -0.83083333 13 -5.52911706 1.87088294 14 -3.70911706 -5.52911706 15 -1.62911706 -3.70911706 16 -0.22911706 -1.62911706 17 2.99088294 -0.22911706 18 4.30604167 2.99088294 19 -0.39395833 4.30604167 20 3.36604167 -0.39395833 21 8.46604167 3.36604167 22 1.30604167 8.46604167 23 5.56586310 1.30604167 24 1.66757937 5.56586310 25 2.16757937 1.66757937 26 -0.71242063 2.16757937 27 -3.33242063 -0.71242063 28 -3.13242063 -3.33242063 29 -7.41242063 -3.13242063 30 -2.21621032 -7.41242063 31 -4.11621032 -2.21621032 32 1.34378968 -4.11621032 33 -6.35621032 1.34378968 34 -2.21621032 -6.35621032 35 -3.65638889 -2.21621032 36 -9.45467262 -3.65638889 37 -0.75467262 -9.45467262 38 -3.93467262 -0.75467262 39 -0.15467262 -3.93467262 40 -1.35467262 -0.15467262 41 1.56532738 -1.35467262 42 -3.93846230 1.56532738 43 3.66153770 -3.93846230 44 -0.17846230 3.66153770 45 -3.57846230 -0.17846230 46 1.06153770 -3.57846230 47 -1.07864087 1.06153770 48 0.82307540 -1.07864087 49 1.42307540 0.82307540 50 -2.35692460 1.42307540 51 5.12307540 -2.35692460 52 4.42307540 5.12307540 53 4.94307540 4.42307540 54 0.63928571 4.94307540 55 3.83928571 0.63928571 56 -1.90071429 3.83928571 57 1.29928571 -1.90071429 58 5.23928571 1.29928571 59 NA 5.23928571 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.69313492 5.09313492 [2,] 10.71313492 2.69313492 [3,] -0.00686508 10.71313492 [4,] 0.29313492 -0.00686508 [5,] -2.08686508 0.29313492 [6,] 1.20934524 -2.08686508 [7,] -2.99065476 1.20934524 [8,] -2.63065476 -2.99065476 [9,] 0.16934524 -2.63065476 [10,] -5.39065476 0.16934524 [11,] -0.83083333 -5.39065476 [12,] 1.87088294 -0.83083333 [13,] -5.52911706 1.87088294 [14,] -3.70911706 -5.52911706 [15,] -1.62911706 -3.70911706 [16,] -0.22911706 -1.62911706 [17,] 2.99088294 -0.22911706 [18,] 4.30604167 2.99088294 [19,] -0.39395833 4.30604167 [20,] 3.36604167 -0.39395833 [21,] 8.46604167 3.36604167 [22,] 1.30604167 8.46604167 [23,] 5.56586310 1.30604167 [24,] 1.66757937 5.56586310 [25,] 2.16757937 1.66757937 [26,] -0.71242063 2.16757937 [27,] -3.33242063 -0.71242063 [28,] -3.13242063 -3.33242063 [29,] -7.41242063 -3.13242063 [30,] -2.21621032 -7.41242063 [31,] -4.11621032 -2.21621032 [32,] 1.34378968 -4.11621032 [33,] -6.35621032 1.34378968 [34,] -2.21621032 -6.35621032 [35,] -3.65638889 -2.21621032 [36,] -9.45467262 -3.65638889 [37,] -0.75467262 -9.45467262 [38,] -3.93467262 -0.75467262 [39,] -0.15467262 -3.93467262 [40,] -1.35467262 -0.15467262 [41,] 1.56532738 -1.35467262 [42,] -3.93846230 1.56532738 [43,] 3.66153770 -3.93846230 [44,] -0.17846230 3.66153770 [45,] -3.57846230 -0.17846230 [46,] 1.06153770 -3.57846230 [47,] -1.07864087 1.06153770 [48,] 0.82307540 -1.07864087 [49,] 1.42307540 0.82307540 [50,] -2.35692460 1.42307540 [51,] 5.12307540 -2.35692460 [52,] 4.42307540 5.12307540 [53,] 4.94307540 4.42307540 [54,] 0.63928571 4.94307540 [55,] 3.83928571 0.63928571 [56,] -1.90071429 3.83928571 [57,] 1.29928571 -1.90071429 [58,] 5.23928571 1.29928571 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.69313492 5.09313492 2 10.71313492 2.69313492 3 -0.00686508 10.71313492 4 0.29313492 -0.00686508 5 -2.08686508 0.29313492 6 1.20934524 -2.08686508 7 -2.99065476 1.20934524 8 -2.63065476 -2.99065476 9 0.16934524 -2.63065476 10 -5.39065476 0.16934524 11 -0.83083333 -5.39065476 12 1.87088294 -0.83083333 13 -5.52911706 1.87088294 14 -3.70911706 -5.52911706 15 -1.62911706 -3.70911706 16 -0.22911706 -1.62911706 17 2.99088294 -0.22911706 18 4.30604167 2.99088294 19 -0.39395833 4.30604167 20 3.36604167 -0.39395833 21 8.46604167 3.36604167 22 1.30604167 8.46604167 23 5.56586310 1.30604167 24 1.66757937 5.56586310 25 2.16757937 1.66757937 26 -0.71242063 2.16757937 27 -3.33242063 -0.71242063 28 -3.13242063 -3.33242063 29 -7.41242063 -3.13242063 30 -2.21621032 -7.41242063 31 -4.11621032 -2.21621032 32 1.34378968 -4.11621032 33 -6.35621032 1.34378968 34 -2.21621032 -6.35621032 35 -3.65638889 -2.21621032 36 -9.45467262 -3.65638889 37 -0.75467262 -9.45467262 38 -3.93467262 -0.75467262 39 -0.15467262 -3.93467262 40 -1.35467262 -0.15467262 41 1.56532738 -1.35467262 42 -3.93846230 1.56532738 43 3.66153770 -3.93846230 44 -0.17846230 3.66153770 45 -3.57846230 -0.17846230 46 1.06153770 -3.57846230 47 -1.07864087 1.06153770 48 0.82307540 -1.07864087 49 1.42307540 0.82307540 50 -2.35692460 1.42307540 51 5.12307540 -2.35692460 52 4.42307540 5.12307540 53 4.94307540 4.42307540 54 0.63928571 4.94307540 55 3.83928571 0.63928571 56 -1.90071429 3.83928571 57 1.29928571 -1.90071429 58 5.23928571 1.29928571 > 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/7zxgg1195401892.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/86f2r1195401892.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/9jd831195401893.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 > 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/10uthq1195401893.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/1169im1195401893.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/12u1lj1195401893.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/139wiu1195401893.tab") > > system("convert tmp/1yl3w1195401892.ps tmp/1yl3w1195401892.png") > system("convert tmp/20xxq1195401892.ps tmp/20xxq1195401892.png") > system("convert tmp/38eqa1195401892.ps tmp/38eqa1195401892.png") > system("convert tmp/4rgxe1195401892.ps tmp/4rgxe1195401892.png") > system("convert tmp/5dg3e1195401892.ps tmp/5dg3e1195401892.png") > system("convert tmp/6s7jn1195401892.ps tmp/6s7jn1195401892.png") > system("convert tmp/7zxgg1195401892.ps tmp/7zxgg1195401892.png") > system("convert tmp/86f2r1195401892.ps tmp/86f2r1195401892.png") > system("convert tmp/9jd831195401893.ps tmp/9jd831195401893.png") > > > proc.time() user system elapsed 4.188 2.483 4.518