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(56983,0,57942,0,34857,0,39421,0,45612,0,65410,0,50125,0,46879,0,53875,0,49652,0,54167,0,61558,0,56874,0,51966,0,45897,0,46832,0,47852,0,58236,0,54216,0,52687,0,47659,0,50089,0,51247,0,48658,0,47233,0,46988,0,51784,0,53620,0,51479,0,50007,0,52634,0,49566,0,48522,0,53864,0,51477,0,56214,0,60032,0,57862,0,55684,0,75894,1,80564,1,84562,1,87546,1,83654,1,89745,1,79565,1,78498,1,79468,1,82479,1,84675,1,85479,1,83547,1,89654,1,84523,1,87469,1,87985,1,88423,1,90475,1,86542,1,87963,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 56983 0 1 0 0 0 0 0 0 0 0 0 0 1 2 57942 0 0 1 0 0 0 0 0 0 0 0 0 2 3 34857 0 0 0 1 0 0 0 0 0 0 0 0 3 4 39421 0 0 0 0 1 0 0 0 0 0 0 0 4 5 45612 0 0 0 0 0 1 0 0 0 0 0 0 5 6 65410 0 0 0 0 0 0 1 0 0 0 0 0 6 7 50125 0 0 0 0 0 0 0 1 0 0 0 0 7 8 46879 0 0 0 0 0 0 0 0 1 0 0 0 8 9 53875 0 0 0 0 0 0 0 0 0 1 0 0 9 10 49652 0 0 0 0 0 0 0 0 0 0 1 0 10 11 54167 0 0 0 0 0 0 0 0 0 0 0 1 11 12 61558 0 0 0 0 0 0 0 0 0 0 0 0 12 13 56874 0 1 0 0 0 0 0 0 0 0 0 0 13 14 51966 0 0 1 0 0 0 0 0 0 0 0 0 14 15 45897 0 0 0 1 0 0 0 0 0 0 0 0 15 16 46832 0 0 0 0 1 0 0 0 0 0 0 0 16 17 47852 0 0 0 0 0 1 0 0 0 0 0 0 17 18 58236 0 0 0 0 0 0 1 0 0 0 0 0 18 19 54216 0 0 0 0 0 0 0 1 0 0 0 0 19 20 52687 0 0 0 0 0 0 0 0 1 0 0 0 20 21 47659 0 0 0 0 0 0 0 0 0 1 0 0 21 22 50089 0 0 0 0 0 0 0 0 0 0 1 0 22 23 51247 0 0 0 0 0 0 0 0 0 0 0 1 23 24 48658 0 0 0 0 0 0 0 0 0 0 0 0 24 25 47233 0 1 0 0 0 0 0 0 0 0 0 0 25 26 46988 0 0 1 0 0 0 0 0 0 0 0 0 26 27 51784 0 0 0 1 0 0 0 0 0 0 0 0 27 28 53620 0 0 0 0 1 0 0 0 0 0 0 0 28 29 51479 0 0 0 0 0 1 0 0 0 0 0 0 29 30 50007 0 0 0 0 0 0 1 0 0 0 0 0 30 31 52634 0 0 0 0 0 0 0 1 0 0 0 0 31 32 49566 0 0 0 0 0 0 0 0 1 0 0 0 32 33 48522 0 0 0 0 0 0 0 0 0 1 0 0 33 34 53864 0 0 0 0 0 0 0 0 0 0 1 0 34 35 51477 0 0 0 0 0 0 0 0 0 0 0 1 35 36 56214 0 0 0 0 0 0 0 0 0 0 0 0 36 37 60032 0 1 0 0 0 0 0 0 0 0 0 0 37 38 57862 0 0 1 0 0 0 0 0 0 0 0 0 38 39 55684 0 0 0 1 0 0 0 0 0 0 0 0 39 40 75894 1 0 0 0 1 0 0 0 0 0 0 0 40 41 80564 1 0 0 0 0 1 0 0 0 0 0 0 41 42 84562 1 0 0 0 0 0 1 0 0 0 0 0 42 43 87546 1 0 0 0 0 0 0 1 0 0 0 0 43 44 83654 1 0 0 0 0 0 0 0 1 0 0 0 44 45 89745 1 0 0 0 0 0 0 0 0 1 0 0 45 46 79565 1 0 0 0 0 0 0 0 0 0 1 0 46 47 78498 1 0 0 0 0 0 0 0 0 0 0 1 47 48 79468 1 0 0 0 0 0 0 0 0 0 0 0 48 49 82479 1 1 0 0 0 0 0 0 0 0 0 0 49 50 84675 1 0 1 0 0 0 0 0 0 0 0 0 50 51 85479 1 0 0 1 0 0 0 0 0 0 0 0 51 52 83547 1 0 0 0 1 0 0 0 0 0 0 0 52 53 89654 1 0 0 0 0 1 0 0 0 0 0 0 53 54 84523 1 0 0 0 0 0 1 0 0 0 0 0 54 55 87469 1 0 0 0 0 0 0 1 0 0 0 0 55 56 87985 1 0 0 0 0 0 0 0 1 0 0 0 56 57 88423 1 0 0 0 0 0 0 0 0 1 0 0 57 58 90475 1 0 0 0 0 0 0 0 0 0 1 0 58 59 86542 1 0 0 0 0 0 0 0 0 0 0 1 59 60 87963 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 50587.8 29350.1 1176.0 219.0 -5050.9 -5921.8 M5 M6 M7 M8 M9 M10 -2875.8 2516.1 243.1 -2124.2 -757.0 -1796.3 M11 t -2262.5 123.5 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -11050.3 -2901.2 188.8 2977.7 11565.3 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 50587.81 2826.59 17.897 < 2e-16 *** x 29350.08 2464.90 11.907 1.19e-15 *** M1 1176.01 3196.39 0.368 0.7146 M2 218.96 3189.85 0.069 0.9456 M3 -5050.89 3184.76 -1.586 0.1196 M4 -5921.76 3212.79 -1.843 0.0718 . M5 -2875.82 3201.93 -0.898 0.3738 M6 2516.13 3192.50 0.788 0.4347 M7 243.07 3184.49 0.076 0.9395 M8 -2124.18 3177.93 -0.668 0.5072 M9 -757.04 3172.81 -0.239 0.8125 M10 -1796.29 3169.15 -0.567 0.5736 M11 -2262.55 3166.95 -0.714 0.4786 t 123.45 68.13 1.812 0.0765 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5006 on 46 degrees of freedom Multiple R-squared: 0.93, Adjusted R-squared: 0.9102 F-statistic: 47 on 13 and 46 DF, p-value: < 2.2e-16 > postscript(file="/var/www/html/freestat/rcomp/tmp/1e9kh1227551861.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/2wv1u1227551861.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/3jiaf1227551861.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/4ogrl1227551861.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/5s22i1227551861.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 5095.72242 6888.32242 -11050.27758 -5738.86182 -2717.26182 11565.33818 7 8 9 10 11 12 -1570.06182 -2572.26182 2933.13818 -374.06182 4483.73818 9488.73818 13 14 15 16 17 18 3505.26909 -569.13091 -1491.73091 190.68485 -1958.71515 2909.88485 19 20 21 22 23 24 1039.48485 1754.28485 -4764.31515 -1418.51515 82.28485 -4892.71515 25 26 27 28 29 30 -7617.18424 -7028.58424 2913.81576 5497.23152 186.83152 -6800.56848 31 32 33 34 35 36 -2023.96848 -2848.16848 -5382.76848 875.03152 -1169.16848 1181.83152 37 38 39 40 41 42 3700.36242 2363.96242 5332.36242 -3060.30061 -1559.70061 -3077.10061 43 44 45 46 47 48 2056.49939 408.29939 5008.69939 -4255.50061 -4979.70061 -6395.70061 49 50 51 52 53 54 -4684.16970 -1654.56970 4295.83030 3111.24606 6048.84606 -4597.55394 55 56 57 58 59 60 498.04606 3257.84606 2205.24606 5173.04606 1582.84606 617.84606 > postscript(file="/var/www/html/freestat/rcomp/tmp/6lj681227551861.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 5095.72242 NA 1 6888.32242 5095.72242 2 -11050.27758 6888.32242 3 -5738.86182 -11050.27758 4 -2717.26182 -5738.86182 5 11565.33818 -2717.26182 6 -1570.06182 11565.33818 7 -2572.26182 -1570.06182 8 2933.13818 -2572.26182 9 -374.06182 2933.13818 10 4483.73818 -374.06182 11 9488.73818 4483.73818 12 3505.26909 9488.73818 13 -569.13091 3505.26909 14 -1491.73091 -569.13091 15 190.68485 -1491.73091 16 -1958.71515 190.68485 17 2909.88485 -1958.71515 18 1039.48485 2909.88485 19 1754.28485 1039.48485 20 -4764.31515 1754.28485 21 -1418.51515 -4764.31515 22 82.28485 -1418.51515 23 -4892.71515 82.28485 24 -7617.18424 -4892.71515 25 -7028.58424 -7617.18424 26 2913.81576 -7028.58424 27 5497.23152 2913.81576 28 186.83152 5497.23152 29 -6800.56848 186.83152 30 -2023.96848 -6800.56848 31 -2848.16848 -2023.96848 32 -5382.76848 -2848.16848 33 875.03152 -5382.76848 34 -1169.16848 875.03152 35 1181.83152 -1169.16848 36 3700.36242 1181.83152 37 2363.96242 3700.36242 38 5332.36242 2363.96242 39 -3060.30061 5332.36242 40 -1559.70061 -3060.30061 41 -3077.10061 -1559.70061 42 2056.49939 -3077.10061 43 408.29939 2056.49939 44 5008.69939 408.29939 45 -4255.50061 5008.69939 46 -4979.70061 -4255.50061 47 -6395.70061 -4979.70061 48 -4684.16970 -6395.70061 49 -1654.56970 -4684.16970 50 4295.83030 -1654.56970 51 3111.24606 4295.83030 52 6048.84606 3111.24606 53 -4597.55394 6048.84606 54 498.04606 -4597.55394 55 3257.84606 498.04606 56 2205.24606 3257.84606 57 5173.04606 2205.24606 58 1582.84606 5173.04606 59 617.84606 1582.84606 60 NA 617.84606 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 6888.32242 5095.72242 [2,] -11050.27758 6888.32242 [3,] -5738.86182 -11050.27758 [4,] -2717.26182 -5738.86182 [5,] 11565.33818 -2717.26182 [6,] -1570.06182 11565.33818 [7,] -2572.26182 -1570.06182 [8,] 2933.13818 -2572.26182 [9,] -374.06182 2933.13818 [10,] 4483.73818 -374.06182 [11,] 9488.73818 4483.73818 [12,] 3505.26909 9488.73818 [13,] -569.13091 3505.26909 [14,] -1491.73091 -569.13091 [15,] 190.68485 -1491.73091 [16,] -1958.71515 190.68485 [17,] 2909.88485 -1958.71515 [18,] 1039.48485 2909.88485 [19,] 1754.28485 1039.48485 [20,] -4764.31515 1754.28485 [21,] -1418.51515 -4764.31515 [22,] 82.28485 -1418.51515 [23,] -4892.71515 82.28485 [24,] -7617.18424 -4892.71515 [25,] -7028.58424 -7617.18424 [26,] 2913.81576 -7028.58424 [27,] 5497.23152 2913.81576 [28,] 186.83152 5497.23152 [29,] -6800.56848 186.83152 [30,] -2023.96848 -6800.56848 [31,] -2848.16848 -2023.96848 [32,] -5382.76848 -2848.16848 [33,] 875.03152 -5382.76848 [34,] -1169.16848 875.03152 [35,] 1181.83152 -1169.16848 [36,] 3700.36242 1181.83152 [37,] 2363.96242 3700.36242 [38,] 5332.36242 2363.96242 [39,] -3060.30061 5332.36242 [40,] -1559.70061 -3060.30061 [41,] -3077.10061 -1559.70061 [42,] 2056.49939 -3077.10061 [43,] 408.29939 2056.49939 [44,] 5008.69939 408.29939 [45,] -4255.50061 5008.69939 [46,] -4979.70061 -4255.50061 [47,] -6395.70061 -4979.70061 [48,] -4684.16970 -6395.70061 [49,] -1654.56970 -4684.16970 [50,] 4295.83030 -1654.56970 [51,] 3111.24606 4295.83030 [52,] 6048.84606 3111.24606 [53,] -4597.55394 6048.84606 [54,] 498.04606 -4597.55394 [55,] 3257.84606 498.04606 [56,] 2205.24606 3257.84606 [57,] 5173.04606 2205.24606 [58,] 1582.84606 5173.04606 [59,] 617.84606 1582.84606 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 6888.32242 5095.72242 2 -11050.27758 6888.32242 3 -5738.86182 -11050.27758 4 -2717.26182 -5738.86182 5 11565.33818 -2717.26182 6 -1570.06182 11565.33818 7 -2572.26182 -1570.06182 8 2933.13818 -2572.26182 9 -374.06182 2933.13818 10 4483.73818 -374.06182 11 9488.73818 4483.73818 12 3505.26909 9488.73818 13 -569.13091 3505.26909 14 -1491.73091 -569.13091 15 190.68485 -1491.73091 16 -1958.71515 190.68485 17 2909.88485 -1958.71515 18 1039.48485 2909.88485 19 1754.28485 1039.48485 20 -4764.31515 1754.28485 21 -1418.51515 -4764.31515 22 82.28485 -1418.51515 23 -4892.71515 82.28485 24 -7617.18424 -4892.71515 25 -7028.58424 -7617.18424 26 2913.81576 -7028.58424 27 5497.23152 2913.81576 28 186.83152 5497.23152 29 -6800.56848 186.83152 30 -2023.96848 -6800.56848 31 -2848.16848 -2023.96848 32 -5382.76848 -2848.16848 33 875.03152 -5382.76848 34 -1169.16848 875.03152 35 1181.83152 -1169.16848 36 3700.36242 1181.83152 37 2363.96242 3700.36242 38 5332.36242 2363.96242 39 -3060.30061 5332.36242 40 -1559.70061 -3060.30061 41 -3077.10061 -1559.70061 42 2056.49939 -3077.10061 43 408.29939 2056.49939 44 5008.69939 408.29939 45 -4255.50061 5008.69939 46 -4979.70061 -4255.50061 47 -6395.70061 -4979.70061 48 -4684.16970 -6395.70061 49 -1654.56970 -4684.16970 50 4295.83030 -1654.56970 51 3111.24606 4295.83030 52 6048.84606 3111.24606 53 -4597.55394 6048.84606 54 498.04606 -4597.55394 55 3257.84606 498.04606 56 2205.24606 3257.84606 57 5173.04606 2205.24606 58 1582.84606 5173.04606 59 617.84606 1582.84606 > 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/7mc3z1227551862.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/8iklm1227551862.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/9ws6j1227551862.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/1026ga1227551862.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/11rpkn1227551862.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/12rmyn1227551862.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/13lwhs1227551862.tab") > > system("convert tmp/1e9kh1227551861.ps tmp/1e9kh1227551861.png") > system("convert tmp/2wv1u1227551861.ps tmp/2wv1u1227551861.png") > system("convert tmp/3jiaf1227551861.ps tmp/3jiaf1227551861.png") > system("convert tmp/4ogrl1227551861.ps tmp/4ogrl1227551861.png") > system("convert tmp/5s22i1227551861.ps tmp/5s22i1227551861.png") > system("convert tmp/6lj681227551861.ps tmp/6lj681227551861.png") > system("convert tmp/7mc3z1227551862.ps tmp/7mc3z1227551862.png") > system("convert tmp/8iklm1227551862.ps tmp/8iklm1227551862.png") > system("convert tmp/9ws6j1227551862.ps tmp/9ws6j1227551862.png") > > > proc.time() user system elapsed 2.943 2.223 3.607