R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(13 + ,5 + ,14 + ,12 + ,3 + ,18 + ,15 + ,0 + ,11 + ,12 + ,7 + ,12 + ,10 + ,4 + ,16 + ,12 + ,1 + ,18 + ,15 + ,6 + ,14 + ,9 + ,3 + ,14 + ,12 + ,12 + ,15 + ,11 + ,0 + ,15 + ,11 + ,5 + ,17 + ,11 + ,6 + ,19 + ,15 + ,6 + ,10 + ,7 + ,6 + ,16 + ,11 + ,2 + ,18 + ,11 + ,1 + ,14 + ,10 + ,5 + ,14 + ,14 + ,7 + ,17 + ,10 + ,3 + ,14 + ,6 + ,3 + ,16 + ,11 + ,3 + ,18 + ,15 + ,7 + ,11 + ,11 + ,8 + ,14 + ,12 + ,6 + ,12 + ,14 + ,3 + ,17 + ,15 + ,5 + ,9 + ,9 + ,5 + ,16 + ,13 + ,10 + ,14 + ,13 + ,2 + ,15 + ,16 + ,6 + ,11 + ,13 + ,4 + ,16 + ,12 + ,6 + ,13 + ,14 + ,8 + ,17 + ,11 + ,4 + ,15 + ,9 + ,5 + ,14 + ,16 + ,10 + ,16 + ,12 + ,6 + ,9 + ,10 + ,7 + ,15 + ,13 + ,4 + ,17 + ,16 + ,10 + ,13 + ,14 + ,4 + ,15 + ,15 + ,3 + ,16 + ,5 + ,3 + ,16 + ,8 + ,3 + ,12 + ,11 + ,3 + ,12 + ,16 + ,7 + ,11 + ,17 + ,15 + ,15 + ,9 + ,0 + ,15 + ,9 + ,0 + ,17 + ,13 + ,4 + ,13 + ,10 + ,5 + ,16 + ,6 + ,5 + ,14 + ,12 + ,2 + ,11 + ,8 + ,3 + ,12 + ,14 + ,0 + ,12 + ,12 + ,9 + ,15 + ,11 + ,2 + ,16 + ,16 + ,7 + ,15 + ,8 + ,7 + ,12 + ,15 + ,0 + ,12 + ,7 + ,0 + ,8 + ,16 + ,10 + ,13 + ,14 + ,2 + ,11 + ,16 + ,1 + ,14 + ,9 + ,8 + ,15 + ,14 + ,6 + ,10 + ,11 + ,11 + ,11 + ,13 + ,3 + ,12 + ,15 + ,8 + ,15 + ,5 + ,6 + ,15 + ,15 + ,9 + ,14 + ,13 + ,9 + ,16 + ,11 + ,8 + ,15 + ,11 + ,8 + ,15 + ,12 + ,7 + ,13 + ,12 + ,6 + ,12 + ,12 + ,5 + ,17 + ,12 + ,4 + ,13 + ,14 + ,6 + ,15 + ,6 + ,3 + ,13 + ,7 + ,2 + ,15 + ,14 + ,12 + ,16 + ,14 + ,8 + ,15 + ,10 + ,5 + ,16 + ,13 + ,9 + ,15 + ,12 + ,6 + ,14 + ,9 + ,5 + ,15 + ,12 + ,2 + ,14 + ,16 + ,4 + ,13 + ,10 + ,7 + ,7 + ,14 + ,5 + ,17 + ,10 + ,6 + ,13 + ,16 + ,7 + ,15 + ,15 + ,8 + ,14 + ,12 + ,6 + ,13 + ,10 + ,0 + ,16 + ,8 + ,1 + ,12 + ,8 + ,5 + ,14 + ,11 + ,5 + ,17 + ,13 + ,5 + ,15 + ,16 + ,7 + ,17 + ,16 + ,7 + ,12 + ,14 + ,1 + ,16 + ,11 + ,3 + ,11 + ,4 + ,4 + ,15 + ,14 + ,8 + ,9 + ,9 + ,6 + ,16 + ,14 + ,6 + ,15 + ,8 + ,2 + ,10 + ,8 + ,2 + ,10 + ,11 + ,3 + ,15 + ,12 + ,3 + ,11 + ,11 + ,0 + ,13 + ,14 + ,2 + ,14 + ,15 + ,8 + ,18 + ,16 + ,8 + ,16 + ,16 + ,0 + ,14 + ,11 + ,5 + ,14 + ,14 + ,9 + ,14 + ,14 + ,6 + ,14 + ,12 + ,6 + ,12 + ,14 + ,3 + ,14 + ,8 + ,9 + ,15 + ,13 + ,7 + ,15 + ,16 + ,8 + ,15 + ,12 + ,0 + ,13 + ,16 + ,7 + ,17 + ,12 + ,0 + ,17 + ,11 + ,5 + ,19 + ,4 + ,0 + ,15 + ,16 + ,14 + ,13 + ,15 + ,5 + ,9 + ,10 + ,2 + ,15 + ,13 + ,8 + ,15 + ,15 + ,4 + ,15 + ,12 + ,2 + ,16 + ,14 + ,6 + ,11 + ,7 + ,3 + ,14 + ,19 + ,5 + ,11 + ,12 + ,9 + ,15 + ,12 + ,3 + ,13 + ,13 + ,3 + ,15 + ,15 + ,0 + ,16 + ,8 + ,10 + ,14 + ,12 + ,4 + ,15 + ,10 + ,2 + ,16 + ,8 + ,3 + ,16 + ,10 + ,10 + ,11 + ,15 + ,7 + ,12 + ,16 + ,0 + ,9 + ,13 + ,6 + ,16 + ,16 + ,8 + ,13 + ,9 + ,0 + ,16 + ,14 + ,4 + ,12 + ,14 + ,10 + ,9 + ,12 + ,5 + ,13) + ,dim=c(3 + ,156) + ,dimnames=list(c('IEP' + ,'WP' + ,'HS') + ,1:156)) > y <- array(NA,dim=c(3,156),dimnames=list(c('IEP','WP','HS'),1:156)) > 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) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > 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 IEP WP HS 1 13 5 14 2 12 3 18 3 15 0 11 4 12 7 12 5 10 4 16 6 12 1 18 7 15 6 14 8 9 3 14 9 12 12 15 10 11 0 15 11 11 5 17 12 11 6 19 13 15 6 10 14 7 6 16 15 11 2 18 16 11 1 14 17 10 5 14 18 14 7 17 19 10 3 14 20 6 3 16 21 11 3 18 22 15 7 11 23 11 8 14 24 12 6 12 25 14 3 17 26 15 5 9 27 9 5 16 28 13 10 14 29 13 2 15 30 16 6 11 31 13 4 16 32 12 6 13 33 14 8 17 34 11 4 15 35 9 5 14 36 16 10 16 37 12 6 9 38 10 7 15 39 13 4 17 40 16 10 13 41 14 4 15 42 15 3 16 43 5 3 16 44 8 3 12 45 11 3 12 46 16 7 11 47 17 15 15 48 9 0 15 49 9 0 17 50 13 4 13 51 10 5 16 52 6 5 14 53 12 2 11 54 8 3 12 55 14 0 12 56 12 9 15 57 11 2 16 58 16 7 15 59 8 7 12 60 15 0 12 61 7 0 8 62 16 10 13 63 14 2 11 64 16 1 14 65 9 8 15 66 14 6 10 67 11 11 11 68 13 3 12 69 15 8 15 70 5 6 15 71 15 9 14 72 13 9 16 73 11 8 15 74 11 8 15 75 12 7 13 76 12 6 12 77 12 5 17 78 12 4 13 79 14 6 15 80 6 3 13 81 7 2 15 82 14 12 16 83 14 8 15 84 10 5 16 85 13 9 15 86 12 6 14 87 9 5 15 88 12 2 14 89 16 4 13 90 10 7 7 91 14 5 17 92 10 6 13 93 16 7 15 94 15 8 14 95 12 6 13 96 10 0 16 97 8 1 12 98 8 5 14 99 11 5 17 100 13 5 15 101 16 7 17 102 16 7 12 103 14 1 16 104 11 3 11 105 4 4 15 106 14 8 9 107 9 6 16 108 14 6 15 109 8 2 10 110 8 2 10 111 11 3 15 112 12 3 11 113 11 0 13 114 14 2 14 115 15 8 18 116 16 8 16 117 16 0 14 118 11 5 14 119 14 9 14 120 14 6 14 121 12 6 12 122 14 3 14 123 8 9 15 124 13 7 15 125 16 8 15 126 12 0 13 127 16 7 17 128 12 0 17 129 11 5 19 130 4 0 15 131 16 14 13 132 15 5 9 133 10 2 15 134 13 8 15 135 15 4 15 136 12 2 16 137 14 6 11 138 7 3 14 139 19 5 11 140 12 9 15 141 12 3 13 142 13 3 15 143 15 0 16 144 8 10 14 145 12 4 15 146 10 2 16 147 8 3 16 148 10 10 11 149 15 7 12 150 16 0 9 151 13 6 16 152 16 8 13 153 9 0 16 154 14 4 12 155 14 10 9 156 12 5 13 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) WP HS 12.4179 0.2727 -0.1239 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.6495 -1.6042 0.2265 2.1420 6.5821 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 12.41786 1.42825 8.694 5.06e-15 *** WP 0.27267 0.07259 3.756 0.000245 *** HS -0.12393 0.09663 -1.283 0.201569 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.813 on 153 degrees of freedom Multiple R-squared: 0.09425, Adjusted R-squared: 0.08241 F-statistic: 7.96 on 2 and 153 DF, p-value: 0.0005142 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.08560241 0.17120482 0.9143976 [2,] 0.17547323 0.35094647 0.8245268 [3,] 0.34538724 0.69077448 0.6546128 [4,] 0.23144934 0.46289868 0.7685507 [5,] 0.16129095 0.32258189 0.8387091 [6,] 0.09844364 0.19688727 0.9015564 [7,] 0.05731355 0.11462710 0.9426864 [8,] 0.03777481 0.07554963 0.9622252 [9,] 0.13726916 0.27453832 0.8627308 [10,] 0.09205435 0.18410870 0.9079457 [11,] 0.06677952 0.13355903 0.9332205 [12,] 0.05891757 0.11783513 0.9410824 [13,] 0.07320366 0.14640732 0.9267963 [14,] 0.06292896 0.12585792 0.9370710 [15,] 0.17764427 0.35528855 0.8223557 [16,] 0.13513224 0.27026447 0.8648678 [17,] 0.11536958 0.23073916 0.8846304 [18,] 0.09090667 0.18181334 0.9090933 [19,] 0.06647362 0.13294724 0.9335264 [20,] 0.08193385 0.16386770 0.9180662 [21,] 0.06502537 0.13005075 0.9349746 [22,] 0.06121818 0.12243635 0.9387818 [23,] 0.04461017 0.08922034 0.9553898 [24,] 0.03590943 0.07181887 0.9640906 [25,] 0.03781392 0.07562783 0.9621861 [26,] 0.03112827 0.06225653 0.9688717 [27,] 0.02207400 0.04414799 0.9779260 [28,] 0.02300840 0.04601680 0.9769916 [29,] 0.01633554 0.03267108 0.9836645 [30,] 0.02037582 0.04075164 0.9796242 [31,] 0.02989874 0.05979748 0.9701013 [32,] 0.02520093 0.05040185 0.9747991 [33,] 0.02313019 0.04626037 0.9768698 [34,] 0.01955091 0.03910181 0.9804491 [35,] 0.01977183 0.03954366 0.9802282 [36,] 0.01825747 0.03651494 0.9817425 [37,] 0.02525307 0.05050614 0.9747469 [38,] 0.09398764 0.18797528 0.9060124 [39,] 0.12660122 0.25320244 0.8733988 [40,] 0.10404210 0.20808420 0.8959579 [41,] 0.10496707 0.20993414 0.8950329 [42,] 0.09701964 0.19403928 0.9029804 [43,] 0.08133589 0.16267178 0.9186641 [44,] 0.06577316 0.13154633 0.9342268 [45,] 0.05264331 0.10528661 0.9473567 [46,] 0.04482491 0.08964983 0.9551751 [47,] 0.11720613 0.23441226 0.8827939 [48,] 0.09452364 0.18904728 0.9054764 [49,] 0.11436492 0.22872984 0.8856351 [50,] 0.12260075 0.24520151 0.8773992 [51,] 0.10221282 0.20442564 0.8977872 [52,] 0.08243556 0.16487113 0.9175644 [53,] 0.09574396 0.19148792 0.9042560 [54,] 0.15043515 0.30087030 0.8495649 [55,] 0.18352871 0.36705741 0.8164713 [56,] 0.24037065 0.48074131 0.7596293 [57,] 0.23018031 0.46036062 0.7698197 [58,] 0.22103448 0.44206897 0.7789655 [59,] 0.30886032 0.61772064 0.6911397 [60,] 0.34034646 0.68069292 0.6596535 [61,] 0.30477347 0.60954694 0.6952265 [62,] 0.31213067 0.62426135 0.6878693 [63,] 0.27922411 0.55844821 0.7207759 [64,] 0.26627427 0.53254854 0.7337257 [65,] 0.50141759 0.99716483 0.4985824 [66,] 0.47588664 0.95177328 0.5241134 [67,] 0.43037849 0.86075698 0.5696215 [68,] 0.40185385 0.80370769 0.5981462 [69,] 0.37409073 0.74818147 0.6259093 [70,] 0.33362491 0.66724983 0.6663751 [71,] 0.29405020 0.58810040 0.7059498 [72,] 0.25657694 0.51315388 0.7434231 [73,] 0.22066216 0.44132433 0.7793378 [74,] 0.20102064 0.40204128 0.7989794 [75,] 0.30890545 0.61781090 0.6910946 [76,] 0.35541303 0.71082606 0.6445870 [77,] 0.31413061 0.62826123 0.6858694 [78,] 0.28166794 0.56333587 0.7183321 [79,] 0.26007729 0.52015457 0.7399227 [80,] 0.22420705 0.44841410 0.7757929 [81,] 0.19169324 0.38338647 0.8083068 [82,] 0.19549394 0.39098788 0.8045061 [83,] 0.16725650 0.33451301 0.8327435 [84,] 0.19983573 0.39967147 0.8001643 [85,] 0.21479373 0.42958747 0.7852063 [86,] 0.20206844 0.40413687 0.7979316 [87,] 0.19498536 0.38997072 0.8050146 [88,] 0.20988869 0.41977738 0.7901113 [89,] 0.19383362 0.38766725 0.8061664 [90,] 0.16411281 0.32822562 0.8358872 [91,] 0.13751313 0.27502625 0.8624869 [92,] 0.14611164 0.29222328 0.8538884 [93,] 0.17875116 0.35750232 0.8212488 [94,] 0.15183657 0.30367315 0.8481634 [95,] 0.12830789 0.25661577 0.8716921 [96,] 0.14492002 0.28984004 0.8550800 [97,] 0.14854682 0.29709363 0.8514532 [98,] 0.15447648 0.30895297 0.8455235 [99,] 0.13103638 0.26207276 0.8689636 [100,] 0.36753056 0.73506111 0.6324694 [101,] 0.32280484 0.64560968 0.6771952 [102,] 0.33742783 0.67485567 0.6625722 [103,] 0.30643540 0.61287080 0.6935646 [104,] 0.35862944 0.71725888 0.6413706 [105,] 0.43612007 0.87224013 0.5638799 [106,] 0.39119910 0.78239820 0.6088009 [107,] 0.35014204 0.70028407 0.6498580 [108,] 0.31090967 0.62181934 0.6890903 [109,] 0.29334711 0.58669422 0.7066529 [110,] 0.29962817 0.59925634 0.7003718 [111,] 0.33243495 0.66486991 0.6675650 [112,] 0.41409722 0.82819445 0.5859028 [113,] 0.37360078 0.74720156 0.6263992 [114,] 0.32813278 0.65626556 0.6718672 [115,] 0.29292201 0.58584402 0.7070780 [116,] 0.25529657 0.51059313 0.7447034 [117,] 0.23390899 0.46781799 0.7660910 [118,] 0.31984389 0.63968779 0.6801561 [119,] 0.27125325 0.54250650 0.7287468 [120,] 0.28788060 0.57576121 0.7121194 [121,] 0.24201760 0.48403519 0.7579824 [122,] 0.31744741 0.63489483 0.6825526 [123,] 0.28794007 0.57588014 0.7120599 [124,] 0.25319517 0.50639033 0.7468048 [125,] 0.57617193 0.84765613 0.4238281 [126,] 0.60309684 0.79380632 0.3969032 [127,] 0.54719282 0.90561436 0.4528072 [128,] 0.51052755 0.97894490 0.4894725 [129,] 0.46852762 0.93705525 0.5314724 [130,] 0.50507746 0.98984507 0.4949225 [131,] 0.44148246 0.88296492 0.5585175 [132,] 0.37158909 0.74317818 0.6284109 [133,] 0.57790918 0.84418163 0.4220908 [134,] 0.76364021 0.47271959 0.2363598 [135,] 0.71469969 0.57060062 0.2853003 [136,] 0.64781395 0.70437210 0.3521860 [137,] 0.58021081 0.83957838 0.4197892 [138,] 0.66812104 0.66375792 0.3318790 [139,] 0.73294231 0.53411537 0.2670577 [140,] 0.64614906 0.70770187 0.3538509 [141,] 0.54065825 0.91868351 0.4593418 [142,] 0.56680127 0.86639745 0.4331987 [143,] 0.79291326 0.41417347 0.2070867 [144,] 0.68109457 0.63781086 0.3189054 [145,] 0.75511008 0.48977984 0.2448899 > postscript(file="/var/www/rcomp/tmp/104921292938456.ps",horizontal=F,onefile=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/rcomp/tmp/204921292938456.ps",horizontal=F,onefile=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/rcomp/tmp/304921292938456.ps",horizontal=F,onefile=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/rcomp/tmp/4m5qq1292938456.ps",horizontal=F,onefile=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/rcomp/tmp/5m5qq1292938456.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 156 Frequency = 1 1 2 3 4 5 6 0.953857302 0.994937088 3.945413832 -0.839354340 -1.525602805 1.540280586 7 8 9 10 11 12 2.681185553 -2.500799200 -1.830910871 0.441150119 -0.674340483 -0.699144088 13 14 15 16 17 18 2.185449265 -5.070946304 0.267608837 0.044544298 -2.046142698 1.780316019 19 20 21 22 23 24 -1.500799200 -5.252931056 -0.005062912 2.036711588 -1.864157946 -0.566682591 25 26 27 28 29 30 2.871003016 2.334186942 -2.798274555 -0.409501444 1.895806621 3.309383337 31 32 33 34 35 36 1.474397195 -0.442748519 1.507644270 -0.649536877 -3.046142698 2.838366700 37 38 39 40 41 42 -0.938484807 -2.467552125 1.598331267 2.466564484 2.350463123 3.747068944 43 44 45 46 47 48 -6.252931056 -3.748667344 -0.748667344 3.036711588 2.351073882 -1.558849881 49 50 51 52 53 54 -1.310981737 1.102594979 -1.798274555 -6.046142698 0.400070334 -3.748667344 55 56 57 58 59 60 3.069347904 -1.012895623 0.019740693 3.532447875 -4.839354340 4.069347904 61 62 63 64 65 66 -4.426388384 2.466564484 2.400070334 5.044544298 -3.740223874 1.185449265 67 68 69 70 71 72 -3.053975409 1.251332656 2.259776126 -7.194880376 1.863170305 0.111038449 73 74 75 76 77 78 -1.740223874 -1.740223874 -0.715420268 -0.566682591 0.325659517 0.102594979 79 80 81 82 83 84 1.805119624 -5.624733272 -4.104193379 0.293023201 1.259776126 -1.798274555 85 86 87 88 89 90 -0.012895623 -0.318814447 -2.922208626 0.771872549 4.102594979 -3.459024700 91 92 93 94 95 96 2.325659517 -2.442748519 3.532447875 2.135842054 -0.442748519 -0.434915809 97 98 99 100 101 102 -3.203323845 -4.046142698 -0.674340483 1.077791374 3.780316019 3.160645660 103 104 105 106 107 108 3.292412442 -0.872601416 -7.649536877 0.516171695 -3.070946304 1.805119624 109 110 111 112 113 114 -3.723863738 -3.723863738 -0.376865128 0.127398584 0.193281976 2.771872549 115 116 117 118 119 120 2.631578342 3.383710198 5.317216048 -1.046142698 0.863170305 1.681185553 121 122 123 124 125 126 -0.566682591 2.499200800 -5.012895623 0.532447875 3.259776126 1.193281976 127 128 129 130 131 132 3.780316019 1.689018263 -0.426472339 -6.558849881 1.375877487 2.334186942 133 134 135 136 137 138 -1.104193379 0.259776126 3.350463123 1.019740693 1.309383337 -4.500799200 139 140 141 142 143 144 6.582055086 -1.012895623 0.375266728 1.623134872 4.565084191 -5.409501444 145 146 147 148 149 150 0.350463123 -0.980259307 -3.252931056 -3.781303660 2.160645660 4.697545688 151 152 153 154 155 156 0.929053696 3.011907982 -1.434915809 1.978660907 -0.029171803 -0.170076770 > postscript(file="/var/www/rcomp/tmp/6m5qq1292938456.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 0.953857302 NA 1 0.994937088 0.953857302 2 3.945413832 0.994937088 3 -0.839354340 3.945413832 4 -1.525602805 -0.839354340 5 1.540280586 -1.525602805 6 2.681185553 1.540280586 7 -2.500799200 2.681185553 8 -1.830910871 -2.500799200 9 0.441150119 -1.830910871 10 -0.674340483 0.441150119 11 -0.699144088 -0.674340483 12 2.185449265 -0.699144088 13 -5.070946304 2.185449265 14 0.267608837 -5.070946304 15 0.044544298 0.267608837 16 -2.046142698 0.044544298 17 1.780316019 -2.046142698 18 -1.500799200 1.780316019 19 -5.252931056 -1.500799200 20 -0.005062912 -5.252931056 21 2.036711588 -0.005062912 22 -1.864157946 2.036711588 23 -0.566682591 -1.864157946 24 2.871003016 -0.566682591 25 2.334186942 2.871003016 26 -2.798274555 2.334186942 27 -0.409501444 -2.798274555 28 1.895806621 -0.409501444 29 3.309383337 1.895806621 30 1.474397195 3.309383337 31 -0.442748519 1.474397195 32 1.507644270 -0.442748519 33 -0.649536877 1.507644270 34 -3.046142698 -0.649536877 35 2.838366700 -3.046142698 36 -0.938484807 2.838366700 37 -2.467552125 -0.938484807 38 1.598331267 -2.467552125 39 2.466564484 1.598331267 40 2.350463123 2.466564484 41 3.747068944 2.350463123 42 -6.252931056 3.747068944 43 -3.748667344 -6.252931056 44 -0.748667344 -3.748667344 45 3.036711588 -0.748667344 46 2.351073882 3.036711588 47 -1.558849881 2.351073882 48 -1.310981737 -1.558849881 49 1.102594979 -1.310981737 50 -1.798274555 1.102594979 51 -6.046142698 -1.798274555 52 0.400070334 -6.046142698 53 -3.748667344 0.400070334 54 3.069347904 -3.748667344 55 -1.012895623 3.069347904 56 0.019740693 -1.012895623 57 3.532447875 0.019740693 58 -4.839354340 3.532447875 59 4.069347904 -4.839354340 60 -4.426388384 4.069347904 61 2.466564484 -4.426388384 62 2.400070334 2.466564484 63 5.044544298 2.400070334 64 -3.740223874 5.044544298 65 1.185449265 -3.740223874 66 -3.053975409 1.185449265 67 1.251332656 -3.053975409 68 2.259776126 1.251332656 69 -7.194880376 2.259776126 70 1.863170305 -7.194880376 71 0.111038449 1.863170305 72 -1.740223874 0.111038449 73 -1.740223874 -1.740223874 74 -0.715420268 -1.740223874 75 -0.566682591 -0.715420268 76 0.325659517 -0.566682591 77 0.102594979 0.325659517 78 1.805119624 0.102594979 79 -5.624733272 1.805119624 80 -4.104193379 -5.624733272 81 0.293023201 -4.104193379 82 1.259776126 0.293023201 83 -1.798274555 1.259776126 84 -0.012895623 -1.798274555 85 -0.318814447 -0.012895623 86 -2.922208626 -0.318814447 87 0.771872549 -2.922208626 88 4.102594979 0.771872549 89 -3.459024700 4.102594979 90 2.325659517 -3.459024700 91 -2.442748519 2.325659517 92 3.532447875 -2.442748519 93 2.135842054 3.532447875 94 -0.442748519 2.135842054 95 -0.434915809 -0.442748519 96 -3.203323845 -0.434915809 97 -4.046142698 -3.203323845 98 -0.674340483 -4.046142698 99 1.077791374 -0.674340483 100 3.780316019 1.077791374 101 3.160645660 3.780316019 102 3.292412442 3.160645660 103 -0.872601416 3.292412442 104 -7.649536877 -0.872601416 105 0.516171695 -7.649536877 106 -3.070946304 0.516171695 107 1.805119624 -3.070946304 108 -3.723863738 1.805119624 109 -3.723863738 -3.723863738 110 -0.376865128 -3.723863738 111 0.127398584 -0.376865128 112 0.193281976 0.127398584 113 2.771872549 0.193281976 114 2.631578342 2.771872549 115 3.383710198 2.631578342 116 5.317216048 3.383710198 117 -1.046142698 5.317216048 118 0.863170305 -1.046142698 119 1.681185553 0.863170305 120 -0.566682591 1.681185553 121 2.499200800 -0.566682591 122 -5.012895623 2.499200800 123 0.532447875 -5.012895623 124 3.259776126 0.532447875 125 1.193281976 3.259776126 126 3.780316019 1.193281976 127 1.689018263 3.780316019 128 -0.426472339 1.689018263 129 -6.558849881 -0.426472339 130 1.375877487 -6.558849881 131 2.334186942 1.375877487 132 -1.104193379 2.334186942 133 0.259776126 -1.104193379 134 3.350463123 0.259776126 135 1.019740693 3.350463123 136 1.309383337 1.019740693 137 -4.500799200 1.309383337 138 6.582055086 -4.500799200 139 -1.012895623 6.582055086 140 0.375266728 -1.012895623 141 1.623134872 0.375266728 142 4.565084191 1.623134872 143 -5.409501444 4.565084191 144 0.350463123 -5.409501444 145 -0.980259307 0.350463123 146 -3.252931056 -0.980259307 147 -3.781303660 -3.252931056 148 2.160645660 -3.781303660 149 4.697545688 2.160645660 150 0.929053696 4.697545688 151 3.011907982 0.929053696 152 -1.434915809 3.011907982 153 1.978660907 -1.434915809 154 -0.029171803 1.978660907 155 -0.170076770 -0.029171803 156 NA -0.170076770 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.994937088 0.953857302 [2,] 3.945413832 0.994937088 [3,] -0.839354340 3.945413832 [4,] -1.525602805 -0.839354340 [5,] 1.540280586 -1.525602805 [6,] 2.681185553 1.540280586 [7,] -2.500799200 2.681185553 [8,] -1.830910871 -2.500799200 [9,] 0.441150119 -1.830910871 [10,] -0.674340483 0.441150119 [11,] -0.699144088 -0.674340483 [12,] 2.185449265 -0.699144088 [13,] -5.070946304 2.185449265 [14,] 0.267608837 -5.070946304 [15,] 0.044544298 0.267608837 [16,] -2.046142698 0.044544298 [17,] 1.780316019 -2.046142698 [18,] -1.500799200 1.780316019 [19,] -5.252931056 -1.500799200 [20,] -0.005062912 -5.252931056 [21,] 2.036711588 -0.005062912 [22,] -1.864157946 2.036711588 [23,] -0.566682591 -1.864157946 [24,] 2.871003016 -0.566682591 [25,] 2.334186942 2.871003016 [26,] -2.798274555 2.334186942 [27,] -0.409501444 -2.798274555 [28,] 1.895806621 -0.409501444 [29,] 3.309383337 1.895806621 [30,] 1.474397195 3.309383337 [31,] -0.442748519 1.474397195 [32,] 1.507644270 -0.442748519 [33,] -0.649536877 1.507644270 [34,] -3.046142698 -0.649536877 [35,] 2.838366700 -3.046142698 [36,] -0.938484807 2.838366700 [37,] -2.467552125 -0.938484807 [38,] 1.598331267 -2.467552125 [39,] 2.466564484 1.598331267 [40,] 2.350463123 2.466564484 [41,] 3.747068944 2.350463123 [42,] -6.252931056 3.747068944 [43,] -3.748667344 -6.252931056 [44,] -0.748667344 -3.748667344 [45,] 3.036711588 -0.748667344 [46,] 2.351073882 3.036711588 [47,] -1.558849881 2.351073882 [48,] -1.310981737 -1.558849881 [49,] 1.102594979 -1.310981737 [50,] -1.798274555 1.102594979 [51,] -6.046142698 -1.798274555 [52,] 0.400070334 -6.046142698 [53,] -3.748667344 0.400070334 [54,] 3.069347904 -3.748667344 [55,] -1.012895623 3.069347904 [56,] 0.019740693 -1.012895623 [57,] 3.532447875 0.019740693 [58,] -4.839354340 3.532447875 [59,] 4.069347904 -4.839354340 [60,] -4.426388384 4.069347904 [61,] 2.466564484 -4.426388384 [62,] 2.400070334 2.466564484 [63,] 5.044544298 2.400070334 [64,] -3.740223874 5.044544298 [65,] 1.185449265 -3.740223874 [66,] -3.053975409 1.185449265 [67,] 1.251332656 -3.053975409 [68,] 2.259776126 1.251332656 [69,] -7.194880376 2.259776126 [70,] 1.863170305 -7.194880376 [71,] 0.111038449 1.863170305 [72,] -1.740223874 0.111038449 [73,] -1.740223874 -1.740223874 [74,] -0.715420268 -1.740223874 [75,] -0.566682591 -0.715420268 [76,] 0.325659517 -0.566682591 [77,] 0.102594979 0.325659517 [78,] 1.805119624 0.102594979 [79,] -5.624733272 1.805119624 [80,] -4.104193379 -5.624733272 [81,] 0.293023201 -4.104193379 [82,] 1.259776126 0.293023201 [83,] -1.798274555 1.259776126 [84,] -0.012895623 -1.798274555 [85,] -0.318814447 -0.012895623 [86,] -2.922208626 -0.318814447 [87,] 0.771872549 -2.922208626 [88,] 4.102594979 0.771872549 [89,] -3.459024700 4.102594979 [90,] 2.325659517 -3.459024700 [91,] -2.442748519 2.325659517 [92,] 3.532447875 -2.442748519 [93,] 2.135842054 3.532447875 [94,] -0.442748519 2.135842054 [95,] -0.434915809 -0.442748519 [96,] -3.203323845 -0.434915809 [97,] -4.046142698 -3.203323845 [98,] -0.674340483 -4.046142698 [99,] 1.077791374 -0.674340483 [100,] 3.780316019 1.077791374 [101,] 3.160645660 3.780316019 [102,] 3.292412442 3.160645660 [103,] -0.872601416 3.292412442 [104,] -7.649536877 -0.872601416 [105,] 0.516171695 -7.649536877 [106,] -3.070946304 0.516171695 [107,] 1.805119624 -3.070946304 [108,] -3.723863738 1.805119624 [109,] -3.723863738 -3.723863738 [110,] -0.376865128 -3.723863738 [111,] 0.127398584 -0.376865128 [112,] 0.193281976 0.127398584 [113,] 2.771872549 0.193281976 [114,] 2.631578342 2.771872549 [115,] 3.383710198 2.631578342 [116,] 5.317216048 3.383710198 [117,] -1.046142698 5.317216048 [118,] 0.863170305 -1.046142698 [119,] 1.681185553 0.863170305 [120,] -0.566682591 1.681185553 [121,] 2.499200800 -0.566682591 [122,] -5.012895623 2.499200800 [123,] 0.532447875 -5.012895623 [124,] 3.259776126 0.532447875 [125,] 1.193281976 3.259776126 [126,] 3.780316019 1.193281976 [127,] 1.689018263 3.780316019 [128,] -0.426472339 1.689018263 [129,] -6.558849881 -0.426472339 [130,] 1.375877487 -6.558849881 [131,] 2.334186942 1.375877487 [132,] -1.104193379 2.334186942 [133,] 0.259776126 -1.104193379 [134,] 3.350463123 0.259776126 [135,] 1.019740693 3.350463123 [136,] 1.309383337 1.019740693 [137,] -4.500799200 1.309383337 [138,] 6.582055086 -4.500799200 [139,] -1.012895623 6.582055086 [140,] 0.375266728 -1.012895623 [141,] 1.623134872 0.375266728 [142,] 4.565084191 1.623134872 [143,] -5.409501444 4.565084191 [144,] 0.350463123 -5.409501444 [145,] -0.980259307 0.350463123 [146,] -3.252931056 -0.980259307 [147,] -3.781303660 -3.252931056 [148,] 2.160645660 -3.781303660 [149,] 4.697545688 2.160645660 [150,] 0.929053696 4.697545688 [151,] 3.011907982 0.929053696 [152,] -1.434915809 3.011907982 [153,] 1.978660907 -1.434915809 [154,] -0.029171803 1.978660907 [155,] -0.170076770 -0.029171803 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.994937088 0.953857302 2 3.945413832 0.994937088 3 -0.839354340 3.945413832 4 -1.525602805 -0.839354340 5 1.540280586 -1.525602805 6 2.681185553 1.540280586 7 -2.500799200 2.681185553 8 -1.830910871 -2.500799200 9 0.441150119 -1.830910871 10 -0.674340483 0.441150119 11 -0.699144088 -0.674340483 12 2.185449265 -0.699144088 13 -5.070946304 2.185449265 14 0.267608837 -5.070946304 15 0.044544298 0.267608837 16 -2.046142698 0.044544298 17 1.780316019 -2.046142698 18 -1.500799200 1.780316019 19 -5.252931056 -1.500799200 20 -0.005062912 -5.252931056 21 2.036711588 -0.005062912 22 -1.864157946 2.036711588 23 -0.566682591 -1.864157946 24 2.871003016 -0.566682591 25 2.334186942 2.871003016 26 -2.798274555 2.334186942 27 -0.409501444 -2.798274555 28 1.895806621 -0.409501444 29 3.309383337 1.895806621 30 1.474397195 3.309383337 31 -0.442748519 1.474397195 32 1.507644270 -0.442748519 33 -0.649536877 1.507644270 34 -3.046142698 -0.649536877 35 2.838366700 -3.046142698 36 -0.938484807 2.838366700 37 -2.467552125 -0.938484807 38 1.598331267 -2.467552125 39 2.466564484 1.598331267 40 2.350463123 2.466564484 41 3.747068944 2.350463123 42 -6.252931056 3.747068944 43 -3.748667344 -6.252931056 44 -0.748667344 -3.748667344 45 3.036711588 -0.748667344 46 2.351073882 3.036711588 47 -1.558849881 2.351073882 48 -1.310981737 -1.558849881 49 1.102594979 -1.310981737 50 -1.798274555 1.102594979 51 -6.046142698 -1.798274555 52 0.400070334 -6.046142698 53 -3.748667344 0.400070334 54 3.069347904 -3.748667344 55 -1.012895623 3.069347904 56 0.019740693 -1.012895623 57 3.532447875 0.019740693 58 -4.839354340 3.532447875 59 4.069347904 -4.839354340 60 -4.426388384 4.069347904 61 2.466564484 -4.426388384 62 2.400070334 2.466564484 63 5.044544298 2.400070334 64 -3.740223874 5.044544298 65 1.185449265 -3.740223874 66 -3.053975409 1.185449265 67 1.251332656 -3.053975409 68 2.259776126 1.251332656 69 -7.194880376 2.259776126 70 1.863170305 -7.194880376 71 0.111038449 1.863170305 72 -1.740223874 0.111038449 73 -1.740223874 -1.740223874 74 -0.715420268 -1.740223874 75 -0.566682591 -0.715420268 76 0.325659517 -0.566682591 77 0.102594979 0.325659517 78 1.805119624 0.102594979 79 -5.624733272 1.805119624 80 -4.104193379 -5.624733272 81 0.293023201 -4.104193379 82 1.259776126 0.293023201 83 -1.798274555 1.259776126 84 -0.012895623 -1.798274555 85 -0.318814447 -0.012895623 86 -2.922208626 -0.318814447 87 0.771872549 -2.922208626 88 4.102594979 0.771872549 89 -3.459024700 4.102594979 90 2.325659517 -3.459024700 91 -2.442748519 2.325659517 92 3.532447875 -2.442748519 93 2.135842054 3.532447875 94 -0.442748519 2.135842054 95 -0.434915809 -0.442748519 96 -3.203323845 -0.434915809 97 -4.046142698 -3.203323845 98 -0.674340483 -4.046142698 99 1.077791374 -0.674340483 100 3.780316019 1.077791374 101 3.160645660 3.780316019 102 3.292412442 3.160645660 103 -0.872601416 3.292412442 104 -7.649536877 -0.872601416 105 0.516171695 -7.649536877 106 -3.070946304 0.516171695 107 1.805119624 -3.070946304 108 -3.723863738 1.805119624 109 -3.723863738 -3.723863738 110 -0.376865128 -3.723863738 111 0.127398584 -0.376865128 112 0.193281976 0.127398584 113 2.771872549 0.193281976 114 2.631578342 2.771872549 115 3.383710198 2.631578342 116 5.317216048 3.383710198 117 -1.046142698 5.317216048 118 0.863170305 -1.046142698 119 1.681185553 0.863170305 120 -0.566682591 1.681185553 121 2.499200800 -0.566682591 122 -5.012895623 2.499200800 123 0.532447875 -5.012895623 124 3.259776126 0.532447875 125 1.193281976 3.259776126 126 3.780316019 1.193281976 127 1.689018263 3.780316019 128 -0.426472339 1.689018263 129 -6.558849881 -0.426472339 130 1.375877487 -6.558849881 131 2.334186942 1.375877487 132 -1.104193379 2.334186942 133 0.259776126 -1.104193379 134 3.350463123 0.259776126 135 1.019740693 3.350463123 136 1.309383337 1.019740693 137 -4.500799200 1.309383337 138 6.582055086 -4.500799200 139 -1.012895623 6.582055086 140 0.375266728 -1.012895623 141 1.623134872 0.375266728 142 4.565084191 1.623134872 143 -5.409501444 4.565084191 144 0.350463123 -5.409501444 145 -0.980259307 0.350463123 146 -3.252931056 -0.980259307 147 -3.781303660 -3.252931056 148 2.160645660 -3.781303660 149 4.697545688 2.160645660 150 0.929053696 4.697545688 151 3.011907982 0.929053696 152 -1.434915809 3.011907982 153 1.978660907 -1.434915809 154 -0.029171803 1.978660907 155 -0.170076770 -0.029171803 > 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/rcomp/tmp/7ew7b1292938456.ps",horizontal=F,onefile=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/rcomp/tmp/8p5ow1292938456.ps",horizontal=F,onefile=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/rcomp/tmp/9p5ow1292938456.ps",horizontal=F,onefile=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 > if (n > n25) { + postscript(file="/var/www/rcomp/tmp/10ixoh1292938456.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/113fmm1292938456.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/rcomp/tmp/12w73p1292938456.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/rcomp/tmp/1338011292938456.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/rcomp/tmp/14dz041292938456.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/15zzys1292938456.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/16v9ej1292938456.tab") + } > > try(system("convert tmp/104921292938456.ps tmp/104921292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/204921292938456.ps tmp/204921292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/304921292938456.ps tmp/304921292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/4m5qq1292938456.ps tmp/4m5qq1292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/5m5qq1292938456.ps tmp/5m5qq1292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/6m5qq1292938456.ps tmp/6m5qq1292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/7ew7b1292938456.ps tmp/7ew7b1292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/8p5ow1292938456.ps tmp/8p5ow1292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/9p5ow1292938456.ps tmp/9p5ow1292938456.png",intern=TRUE)) character(0) > try(system("convert tmp/10ixoh1292938456.ps tmp/10ixoh1292938456.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.320 1.450 5.765