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. 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(36409,0,33163,0,34122,0,35225,0,28249,0,30374,0,26311,0,22069,0,23651,0,28628,0,23187,0,14727,0,43080,0,32519,0,39657,0,33614,0,28671,0,34243,0,27336,0,22916,0,24537,0,26128,0,22602,0,15744,0,41086,0,39690,0,43129,0,37863,0,35953,0,29133,0,24693,0,22205,0,21725,0,27192,0,21790,0,13253,0,37702,0,30364,0,32609,0,30212,0,29965,0,28352,0,25814,0,22414,0,20506,0,28806,0,22228,0,13971,0,36845,0,35338,0,35022,0,34777,0,26887,0,23970,0,22780,0,17351,0,21382,0,24561,0,17409,0,11514,0,31514,0,27071,0,29462,0,26105,0,22397,0,23843,0,21705,0,18089,0,20764,0,25316,0,17704,0,15548,0,28029,0,29383,0,36438,0,32034,0,22679,0,24319,0,18004,0,17537,0,20366,0,22782,0,19169,0,13807,0,29743,0,25591,0,29096,1,26482,1,22405,1,27044,1,17970,1,18730,1,19684,1,19785,1,18479,1,10698,1),dim=c(2,96),dimnames=list(c('Y(t)','X1dum'),1:96)) > y <- array(NA,dim=c(2,96),dimnames=list(c('Y(t)','X1dum'),1:96)) > 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 = 'Do not include Seasonal 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(t) X1dum 1 36409 0 2 33163 0 3 34122 0 4 35225 0 5 28249 0 6 30374 0 7 26311 0 8 22069 0 9 23651 0 10 28628 0 11 23187 0 12 14727 0 13 43080 0 14 32519 0 15 39657 0 16 33614 0 17 28671 0 18 34243 0 19 27336 0 20 22916 0 21 24537 0 22 26128 0 23 22602 0 24 15744 0 25 41086 0 26 39690 0 27 43129 0 28 37863 0 29 35953 0 30 29133 0 31 24693 0 32 22205 0 33 21725 0 34 27192 0 35 21790 0 36 13253 0 37 37702 0 38 30364 0 39 32609 0 40 30212 0 41 29965 0 42 28352 0 43 25814 0 44 22414 0 45 20506 0 46 28806 0 47 22228 0 48 13971 0 49 36845 0 50 35338 0 51 35022 0 52 34777 0 53 26887 0 54 23970 0 55 22780 0 56 17351 0 57 21382 0 58 24561 0 59 17409 0 60 11514 0 61 31514 0 62 27071 0 63 29462 0 64 26105 0 65 22397 0 66 23843 0 67 21705 0 68 18089 0 69 20764 0 70 25316 0 71 17704 0 72 15548 0 73 28029 0 74 29383 0 75 36438 0 76 32034 0 77 22679 0 78 24319 0 79 18004 0 80 17537 0 81 20366 0 82 22782 0 83 19169 0 84 13807 0 85 29743 0 86 25591 0 87 29096 1 88 26482 1 89 22405 1 90 27044 1 91 17970 1 92 18730 1 93 19684 1 94 19785 1 95 18479 1 96 10698 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X1dum 26687 -5649 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -15172.7 -4464.4 -727.2 5371.7 16442.3 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 26686.7 770.4 34.638 <2e-16 *** X1dum -5649.4 2387.1 -2.367 0.02 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7145 on 94 degrees of freedom Multiple R-Squared: 0.05623, Adjusted R-squared: 0.04619 F-statistic: 5.601 on 1 and 94 DF, p-value: 0.02000 > postscript(file="/var/www/html/rcomp/tmp/14p3r1199523961.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/2lhw61199523961.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/3apfi1199523961.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/4mykp1199523961.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/5gbyh1199523961.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 = 96 Frequency = 1 1 2 3 4 5 6 9722.3488 6476.3488 7435.3488 8538.3488 1562.3488 3687.3488 7 8 9 10 11 12 -375.6512 -4617.6512 -3035.6512 1941.3488 -3499.6512 -11959.6512 13 14 15 16 17 18 16393.3488 5832.3488 12970.3488 6927.3488 1984.3488 7556.3488 19 20 21 22 23 24 649.3488 -3770.6512 -2149.6512 -558.6512 -4084.6512 -10942.6512 25 26 27 28 29 30 14399.3488 13003.3488 16442.3488 11176.3488 9266.3488 2446.3488 31 32 33 34 35 36 -1993.6512 -4481.6512 -4961.6512 505.3488 -4896.6512 -13433.6512 37 38 39 40 41 42 11015.3488 3677.3488 5922.3488 3525.3488 3278.3488 1665.3488 43 44 45 46 47 48 -872.6512 -4272.6512 -6180.6512 2119.3488 -4458.6512 -12715.6512 49 50 51 52 53 54 10158.3488 8651.3488 8335.3488 8090.3488 200.3488 -2716.6512 55 56 57 58 59 60 -3906.6512 -9335.6512 -5304.6512 -2125.6512 -9277.6512 -15172.6512 61 62 63 64 65 66 4827.3488 384.3488 2775.3488 -581.6512 -4289.6512 -2843.6512 67 68 69 70 71 72 -4981.6512 -8597.6512 -5922.6512 -1370.6512 -8982.6512 -11138.6512 73 74 75 76 77 78 1342.3488 2696.3488 9751.3488 5347.3488 -4007.6512 -2367.6512 79 80 81 82 83 84 -8682.6512 -9149.6512 -6320.6512 -3904.6512 -7517.6512 -12879.6512 85 86 87 88 89 90 3056.3488 -1095.6512 8058.7000 5444.7000 1367.7000 6006.7000 91 92 93 94 95 96 -3067.3000 -2307.3000 -1353.3000 -1252.3000 -2558.3000 -10339.3000 > postscript(file="/var/www/html/rcomp/tmp/6qmzh1199523961.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 = 96 Frequency = 1 lag(myerror, k = 1) myerror 0 9722.3488 NA 1 6476.3488 9722.3488 2 7435.3488 6476.3488 3 8538.3488 7435.3488 4 1562.3488 8538.3488 5 3687.3488 1562.3488 6 -375.6512 3687.3488 7 -4617.6512 -375.6512 8 -3035.6512 -4617.6512 9 1941.3488 -3035.6512 10 -3499.6512 1941.3488 11 -11959.6512 -3499.6512 12 16393.3488 -11959.6512 13 5832.3488 16393.3488 14 12970.3488 5832.3488 15 6927.3488 12970.3488 16 1984.3488 6927.3488 17 7556.3488 1984.3488 18 649.3488 7556.3488 19 -3770.6512 649.3488 20 -2149.6512 -3770.6512 21 -558.6512 -2149.6512 22 -4084.6512 -558.6512 23 -10942.6512 -4084.6512 24 14399.3488 -10942.6512 25 13003.3488 14399.3488 26 16442.3488 13003.3488 27 11176.3488 16442.3488 28 9266.3488 11176.3488 29 2446.3488 9266.3488 30 -1993.6512 2446.3488 31 -4481.6512 -1993.6512 32 -4961.6512 -4481.6512 33 505.3488 -4961.6512 34 -4896.6512 505.3488 35 -13433.6512 -4896.6512 36 11015.3488 -13433.6512 37 3677.3488 11015.3488 38 5922.3488 3677.3488 39 3525.3488 5922.3488 40 3278.3488 3525.3488 41 1665.3488 3278.3488 42 -872.6512 1665.3488 43 -4272.6512 -872.6512 44 -6180.6512 -4272.6512 45 2119.3488 -6180.6512 46 -4458.6512 2119.3488 47 -12715.6512 -4458.6512 48 10158.3488 -12715.6512 49 8651.3488 10158.3488 50 8335.3488 8651.3488 51 8090.3488 8335.3488 52 200.3488 8090.3488 53 -2716.6512 200.3488 54 -3906.6512 -2716.6512 55 -9335.6512 -3906.6512 56 -5304.6512 -9335.6512 57 -2125.6512 -5304.6512 58 -9277.6512 -2125.6512 59 -15172.6512 -9277.6512 60 4827.3488 -15172.6512 61 384.3488 4827.3488 62 2775.3488 384.3488 63 -581.6512 2775.3488 64 -4289.6512 -581.6512 65 -2843.6512 -4289.6512 66 -4981.6512 -2843.6512 67 -8597.6512 -4981.6512 68 -5922.6512 -8597.6512 69 -1370.6512 -5922.6512 70 -8982.6512 -1370.6512 71 -11138.6512 -8982.6512 72 1342.3488 -11138.6512 73 2696.3488 1342.3488 74 9751.3488 2696.3488 75 5347.3488 9751.3488 76 -4007.6512 5347.3488 77 -2367.6512 -4007.6512 78 -8682.6512 -2367.6512 79 -9149.6512 -8682.6512 80 -6320.6512 -9149.6512 81 -3904.6512 -6320.6512 82 -7517.6512 -3904.6512 83 -12879.6512 -7517.6512 84 3056.3488 -12879.6512 85 -1095.6512 3056.3488 86 8058.7000 -1095.6512 87 5444.7000 8058.7000 88 1367.7000 5444.7000 89 6006.7000 1367.7000 90 -3067.3000 6006.7000 91 -2307.3000 -3067.3000 92 -1353.3000 -2307.3000 93 -1252.3000 -1353.3000 94 -2558.3000 -1252.3000 95 -10339.3000 -2558.3000 96 NA -10339.3000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 6476.3488 9722.3488 [2,] 7435.3488 6476.3488 [3,] 8538.3488 7435.3488 [4,] 1562.3488 8538.3488 [5,] 3687.3488 1562.3488 [6,] -375.6512 3687.3488 [7,] -4617.6512 -375.6512 [8,] -3035.6512 -4617.6512 [9,] 1941.3488 -3035.6512 [10,] -3499.6512 1941.3488 [11,] -11959.6512 -3499.6512 [12,] 16393.3488 -11959.6512 [13,] 5832.3488 16393.3488 [14,] 12970.3488 5832.3488 [15,] 6927.3488 12970.3488 [16,] 1984.3488 6927.3488 [17,] 7556.3488 1984.3488 [18,] 649.3488 7556.3488 [19,] -3770.6512 649.3488 [20,] -2149.6512 -3770.6512 [21,] -558.6512 -2149.6512 [22,] -4084.6512 -558.6512 [23,] -10942.6512 -4084.6512 [24,] 14399.3488 -10942.6512 [25,] 13003.3488 14399.3488 [26,] 16442.3488 13003.3488 [27,] 11176.3488 16442.3488 [28,] 9266.3488 11176.3488 [29,] 2446.3488 9266.3488 [30,] -1993.6512 2446.3488 [31,] -4481.6512 -1993.6512 [32,] -4961.6512 -4481.6512 [33,] 505.3488 -4961.6512 [34,] -4896.6512 505.3488 [35,] -13433.6512 -4896.6512 [36,] 11015.3488 -13433.6512 [37,] 3677.3488 11015.3488 [38,] 5922.3488 3677.3488 [39,] 3525.3488 5922.3488 [40,] 3278.3488 3525.3488 [41,] 1665.3488 3278.3488 [42,] -872.6512 1665.3488 [43,] -4272.6512 -872.6512 [44,] -6180.6512 -4272.6512 [45,] 2119.3488 -6180.6512 [46,] -4458.6512 2119.3488 [47,] -12715.6512 -4458.6512 [48,] 10158.3488 -12715.6512 [49,] 8651.3488 10158.3488 [50,] 8335.3488 8651.3488 [51,] 8090.3488 8335.3488 [52,] 200.3488 8090.3488 [53,] -2716.6512 200.3488 [54,] -3906.6512 -2716.6512 [55,] -9335.6512 -3906.6512 [56,] -5304.6512 -9335.6512 [57,] -2125.6512 -5304.6512 [58,] -9277.6512 -2125.6512 [59,] -15172.6512 -9277.6512 [60,] 4827.3488 -15172.6512 [61,] 384.3488 4827.3488 [62,] 2775.3488 384.3488 [63,] -581.6512 2775.3488 [64,] -4289.6512 -581.6512 [65,] -2843.6512 -4289.6512 [66,] -4981.6512 -2843.6512 [67,] -8597.6512 -4981.6512 [68,] -5922.6512 -8597.6512 [69,] -1370.6512 -5922.6512 [70,] -8982.6512 -1370.6512 [71,] -11138.6512 -8982.6512 [72,] 1342.3488 -11138.6512 [73,] 2696.3488 1342.3488 [74,] 9751.3488 2696.3488 [75,] 5347.3488 9751.3488 [76,] -4007.6512 5347.3488 [77,] -2367.6512 -4007.6512 [78,] -8682.6512 -2367.6512 [79,] -9149.6512 -8682.6512 [80,] -6320.6512 -9149.6512 [81,] -3904.6512 -6320.6512 [82,] -7517.6512 -3904.6512 [83,] -12879.6512 -7517.6512 [84,] 3056.3488 -12879.6512 [85,] -1095.6512 3056.3488 [86,] 8058.7000 -1095.6512 [87,] 5444.7000 8058.7000 [88,] 1367.7000 5444.7000 [89,] 6006.7000 1367.7000 [90,] -3067.3000 6006.7000 [91,] -2307.3000 -3067.3000 [92,] -1353.3000 -2307.3000 [93,] -1252.3000 -1353.3000 [94,] -2558.3000 -1252.3000 [95,] -10339.3000 -2558.3000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 6476.3488 9722.3488 2 7435.3488 6476.3488 3 8538.3488 7435.3488 4 1562.3488 8538.3488 5 3687.3488 1562.3488 6 -375.6512 3687.3488 7 -4617.6512 -375.6512 8 -3035.6512 -4617.6512 9 1941.3488 -3035.6512 10 -3499.6512 1941.3488 11 -11959.6512 -3499.6512 12 16393.3488 -11959.6512 13 5832.3488 16393.3488 14 12970.3488 5832.3488 15 6927.3488 12970.3488 16 1984.3488 6927.3488 17 7556.3488 1984.3488 18 649.3488 7556.3488 19 -3770.6512 649.3488 20 -2149.6512 -3770.6512 21 -558.6512 -2149.6512 22 -4084.6512 -558.6512 23 -10942.6512 -4084.6512 24 14399.3488 -10942.6512 25 13003.3488 14399.3488 26 16442.3488 13003.3488 27 11176.3488 16442.3488 28 9266.3488 11176.3488 29 2446.3488 9266.3488 30 -1993.6512 2446.3488 31 -4481.6512 -1993.6512 32 -4961.6512 -4481.6512 33 505.3488 -4961.6512 34 -4896.6512 505.3488 35 -13433.6512 -4896.6512 36 11015.3488 -13433.6512 37 3677.3488 11015.3488 38 5922.3488 3677.3488 39 3525.3488 5922.3488 40 3278.3488 3525.3488 41 1665.3488 3278.3488 42 -872.6512 1665.3488 43 -4272.6512 -872.6512 44 -6180.6512 -4272.6512 45 2119.3488 -6180.6512 46 -4458.6512 2119.3488 47 -12715.6512 -4458.6512 48 10158.3488 -12715.6512 49 8651.3488 10158.3488 50 8335.3488 8651.3488 51 8090.3488 8335.3488 52 200.3488 8090.3488 53 -2716.6512 200.3488 54 -3906.6512 -2716.6512 55 -9335.6512 -3906.6512 56 -5304.6512 -9335.6512 57 -2125.6512 -5304.6512 58 -9277.6512 -2125.6512 59 -15172.6512 -9277.6512 60 4827.3488 -15172.6512 61 384.3488 4827.3488 62 2775.3488 384.3488 63 -581.6512 2775.3488 64 -4289.6512 -581.6512 65 -2843.6512 -4289.6512 66 -4981.6512 -2843.6512 67 -8597.6512 -4981.6512 68 -5922.6512 -8597.6512 69 -1370.6512 -5922.6512 70 -8982.6512 -1370.6512 71 -11138.6512 -8982.6512 72 1342.3488 -11138.6512 73 2696.3488 1342.3488 74 9751.3488 2696.3488 75 5347.3488 9751.3488 76 -4007.6512 5347.3488 77 -2367.6512 -4007.6512 78 -8682.6512 -2367.6512 79 -9149.6512 -8682.6512 80 -6320.6512 -9149.6512 81 -3904.6512 -6320.6512 82 -7517.6512 -3904.6512 83 -12879.6512 -7517.6512 84 3056.3488 -12879.6512 85 -1095.6512 3056.3488 86 8058.7000 -1095.6512 87 5444.7000 8058.7000 88 1367.7000 5444.7000 89 6006.7000 1367.7000 90 -3067.3000 6006.7000 91 -2307.3000 -3067.3000 92 -1353.3000 -2307.3000 93 -1252.3000 -1353.3000 94 -2558.3000 -1252.3000 95 -10339.3000 -2558.3000 > 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/7cjg01199523961.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/8dwf41199523961.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/9xric1199523961.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/106ect1199523962.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/11nq6n1199523962.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/12n3731199523962.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/13jn171199523962.tab") > > system("convert tmp/14p3r1199523961.ps tmp/14p3r1199523961.png") > system("convert tmp/2lhw61199523961.ps tmp/2lhw61199523961.png") > system("convert tmp/3apfi1199523961.ps tmp/3apfi1199523961.png") > system("convert tmp/4mykp1199523961.ps tmp/4mykp1199523961.png") > system("convert tmp/5gbyh1199523961.ps tmp/5gbyh1199523961.png") > system("convert tmp/6qmzh1199523961.ps tmp/6qmzh1199523961.png") > system("convert tmp/7cjg01199523961.ps tmp/7cjg01199523961.png") > system("convert tmp/8dwf41199523961.ps tmp/8dwf41199523961.png") > system("convert tmp/9xric1199523961.ps tmp/9xric1199523961.png") > > > proc.time() user system elapsed 2.449 1.558 4.056