R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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 + ,41 + ,38 + ,16 + ,39 + ,32 + ,19 + ,30 + ,35 + ,15 + ,31 + ,33 + ,14 + ,34 + ,37 + ,13 + ,35 + ,29 + ,19 + ,39 + ,31 + ,15 + ,34 + ,36 + ,14 + ,36 + ,35 + ,15 + ,37 + ,38 + ,16 + ,38 + ,31 + ,16 + ,36 + ,34 + ,16 + ,38 + ,35 + ,16 + ,39 + ,38 + ,17 + ,33 + ,37 + ,15 + ,32 + ,33 + ,15 + ,36 + ,32 + ,20 + ,38 + ,38 + ,18 + ,39 + ,38 + ,16 + ,32 + ,32 + ,16 + ,32 + ,33 + ,16 + ,31 + ,31 + ,19 + ,39 + ,38 + ,16 + ,37 + ,39 + ,17 + ,39 + ,32 + ,17 + ,41 + ,32 + ,16 + ,36 + ,35 + ,15 + ,33 + ,37 + ,16 + ,33 + ,33 + ,14 + ,34 + ,33 + ,15 + ,31 + ,28 + ,12 + ,27 + ,32 + ,14 + ,37 + ,31 + ,16 + ,34 + ,37 + ,14 + ,34 + ,30 + ,7 + ,32 + ,33 + ,10 + ,29 + ,31 + ,14 + ,36 + ,33 + ,16 + ,29 + ,31 + ,16 + ,35 + ,33 + ,16 + ,37 + ,32 + ,14 + ,34 + ,33 + ,20 + ,38 + ,32 + ,14 + ,35 + ,33 + ,14 + ,38 + ,28 + ,11 + ,37 + ,35 + ,14 + ,38 + ,39 + ,15 + ,33 + ,34 + ,16 + ,36 + ,38 + ,14 + ,38 + ,32 + ,16 + ,32 + ,38 + ,14 + ,32 + ,30 + ,12 + ,32 + ,33 + ,16 + ,34 + ,38 + ,9 + ,32 + ,32 + ,14 + ,37 + ,32 + ,16 + ,39 + ,34 + ,16 + ,29 + ,34 + ,15 + ,37 + ,36 + ,16 + ,35 + ,34 + ,12 + ,30 + ,28 + ,16 + ,38 + ,34 + ,16 + ,34 + ,35 + ,14 + ,31 + ,35 + ,16 + ,34 + ,31 + ,17 + ,35 + ,37 + ,18 + ,36 + ,35 + ,18 + ,30 + ,27 + ,12 + ,39 + ,40 + ,16 + ,35 + ,37 + ,10 + ,38 + ,36 + ,14 + ,31 + ,38 + ,18 + ,34 + ,39 + ,18 + ,38 + ,41 + ,16 + ,34 + ,27 + ,17 + ,39 + ,30 + ,16 + ,37 + ,37 + ,16 + ,34 + ,31 + ,13 + ,28 + ,31 + ,16 + ,37 + ,27 + ,16 + ,33 + ,36 + ,20 + ,37 + ,38 + ,16 + ,35 + ,37 + ,15 + ,37 + ,33 + ,15 + ,32 + ,34 + ,16 + ,33 + ,31 + ,14 + ,38 + ,39 + ,16 + ,33 + ,34 + ,16 + ,29 + ,32 + ,15 + ,33 + ,33 + ,12 + ,31 + ,36 + ,17 + ,36 + ,32 + ,16 + ,35 + ,41 + ,15 + ,32 + ,28 + ,13 + ,29 + ,30 + ,16 + ,39 + ,36 + ,16 + ,37 + ,35 + ,16 + ,35 + ,31 + ,16 + ,37 + ,34 + ,14 + ,32 + ,36 + ,16 + ,38 + ,36 + ,16 + ,37 + ,35 + ,20 + ,36 + ,37 + ,15 + ,32 + ,28 + ,16 + ,33 + ,39 + ,13 + ,40 + ,32 + ,17 + ,38 + ,35 + ,16 + ,41 + ,39 + ,16 + ,36 + ,35 + ,12 + ,43 + ,42 + ,16 + ,30 + ,34 + ,16 + ,31 + ,33 + ,17 + ,32 + ,41 + ,13 + ,32 + ,33 + ,12 + ,37 + ,34 + ,18 + ,37 + ,32 + ,14 + ,33 + ,40 + ,14 + ,34 + ,40 + ,13 + ,33 + ,35 + ,16 + ,38 + ,36 + ,13 + ,33 + ,37 + ,16 + ,31 + ,27 + ,13 + ,38 + ,39 + ,16 + ,37 + ,38 + ,15 + ,33 + ,31 + ,16 + ,31 + ,33 + ,15 + ,39 + ,32 + ,17 + ,44 + ,39 + ,15 + ,33 + ,36 + ,12 + ,35 + ,33 + ,16 + ,32 + ,33 + ,10 + ,28 + ,32 + ,16 + ,40 + ,37 + ,12 + ,27 + ,30 + ,14 + ,37 + ,38 + ,15 + ,32 + ,29 + ,13 + ,28 + ,22 + ,15 + ,34 + ,35 + ,11 + ,30 + ,35 + ,12 + ,35 + ,34 + ,8 + ,31 + ,35 + ,16 + ,32 + ,34 + ,15 + ,30 + ,34 + ,17 + ,30 + ,35 + ,16 + ,31 + ,23 + ,10 + ,40 + ,31 + ,18 + ,32 + ,27 + ,13 + ,36 + ,36 + ,16 + ,32 + ,31 + ,13 + ,35 + ,32 + ,10 + ,38 + ,39 + ,15 + ,42 + ,37 + ,16 + ,34 + ,38 + ,16 + ,35 + ,39 + ,14 + ,35 + ,34 + ,10 + ,33 + ,31 + ,17 + ,36 + ,32 + ,13 + ,32 + ,37 + ,15 + ,33 + ,36 + ,16 + ,34 + ,32 + ,12 + ,32 + ,35 + ,13 + ,34 + ,36) + ,dim=c(3 + ,162) + ,dimnames=list(c('Learning' + ,'Connected' + ,'Separate') + ,1:162)) > y <- array(NA,dim=c(3,162),dimnames=list(c('Learning','Connected','Separate'),1:162)) > 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' > 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 Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > 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 Learning Connected Separate 1 13 41 38 2 16 39 32 3 19 30 35 4 15 31 33 5 14 34 37 6 13 35 29 7 19 39 31 8 15 34 36 9 14 36 35 10 15 37 38 11 16 38 31 12 16 36 34 13 16 38 35 14 16 39 38 15 17 33 37 16 15 32 33 17 15 36 32 18 20 38 38 19 18 39 38 20 16 32 32 21 16 32 33 22 16 31 31 23 19 39 38 24 16 37 39 25 17 39 32 26 17 41 32 27 16 36 35 28 15 33 37 29 16 33 33 30 14 34 33 31 15 31 28 32 12 27 32 33 14 37 31 34 16 34 37 35 14 34 30 36 7 32 33 37 10 29 31 38 14 36 33 39 16 29 31 40 16 35 33 41 16 37 32 42 14 34 33 43 20 38 32 44 14 35 33 45 14 38 28 46 11 37 35 47 14 38 39 48 15 33 34 49 16 36 38 50 14 38 32 51 16 32 38 52 14 32 30 53 12 32 33 54 16 34 38 55 9 32 32 56 14 37 32 57 16 39 34 58 16 29 34 59 15 37 36 60 16 35 34 61 12 30 28 62 16 38 34 63 16 34 35 64 14 31 35 65 16 34 31 66 17 35 37 67 18 36 35 68 18 30 27 69 12 39 40 70 16 35 37 71 10 38 36 72 14 31 38 73 18 34 39 74 18 38 41 75 16 34 27 76 17 39 30 77 16 37 37 78 16 34 31 79 13 28 31 80 16 37 27 81 16 33 36 82 20 37 38 83 16 35 37 84 15 37 33 85 15 32 34 86 16 33 31 87 14 38 39 88 16 33 34 89 16 29 32 90 15 33 33 91 12 31 36 92 17 36 32 93 16 35 41 94 15 32 28 95 13 29 30 96 16 39 36 97 16 37 35 98 16 35 31 99 16 37 34 100 14 32 36 101 16 38 36 102 16 37 35 103 20 36 37 104 15 32 28 105 16 33 39 106 13 40 32 107 17 38 35 108 16 41 39 109 16 36 35 110 12 43 42 111 16 30 34 112 16 31 33 113 17 32 41 114 13 32 33 115 12 37 34 116 18 37 32 117 14 33 40 118 14 34 40 119 13 33 35 120 16 38 36 121 13 33 37 122 16 31 27 123 13 38 39 124 16 37 38 125 15 33 31 126 16 31 33 127 15 39 32 128 17 44 39 129 15 33 36 130 12 35 33 131 16 32 33 132 10 28 32 133 16 40 37 134 12 27 30 135 14 37 38 136 15 32 29 137 13 28 22 138 15 34 35 139 11 30 35 140 12 35 34 141 8 31 35 142 16 32 34 143 15 30 34 144 17 30 35 145 16 31 23 146 10 40 31 147 18 32 27 148 13 36 36 149 16 32 31 150 13 35 32 151 10 38 39 152 15 42 37 153 16 34 38 154 16 35 39 155 14 35 34 156 10 33 31 157 17 36 32 158 13 32 37 159 15 33 36 160 16 34 32 161 12 32 35 162 13 34 36 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate 9.9902907 0.1425775 0.0006981 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.5758 -1.1472 0.4277 1.2806 4.8511 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.9902907 2.1079283 4.739 4.73e-06 *** Connected 0.1425775 0.0557030 2.560 0.0114 * Separate 0.0006981 0.0529251 0.013 0.9895 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.218 on 159 degrees of freedom Multiple R-squared: 0.04566, Adjusted R-squared: 0.03366 F-statistic: 3.804 on 2 and 159 DF, p-value: 0.02434 > 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.69675041 0.60649918 0.3032496 [2,] 0.88728252 0.22543495 0.1127175 [3,] 0.81267877 0.37464245 0.1873212 [4,] 0.74207707 0.51584587 0.2579229 [5,] 0.64549154 0.70901692 0.3545085 [6,] 0.54348449 0.91303103 0.4565155 [7,] 0.44785507 0.89571014 0.5521449 [8,] 0.36723616 0.73447232 0.6327638 [9,] 0.30755999 0.61511998 0.6924400 [10,] 0.26838460 0.53676920 0.7316154 [11,] 0.21480273 0.42960546 0.7851973 [12,] 0.16217152 0.32434304 0.8378285 [13,] 0.39158177 0.78316354 0.6084182 [14,] 0.37761765 0.75523531 0.6223823 [15,] 0.31222653 0.62445307 0.6877735 [16,] 0.25248433 0.50496866 0.7475157 [17,] 0.20182303 0.40364607 0.7981770 [18,] 0.23874550 0.47749101 0.7612545 [19,] 0.19237451 0.38474902 0.8076255 [20,] 0.16196802 0.32393604 0.8380320 [21,] 0.13081230 0.26162460 0.8691877 [22,] 0.09933590 0.19867179 0.9006641 [23,] 0.07938742 0.15877483 0.9206126 [24,] 0.05915394 0.11830788 0.9408461 [25,] 0.05423706 0.10847412 0.9457629 [26,] 0.03901964 0.07803928 0.9609804 [27,] 0.05005280 0.10010560 0.9499472 [28,] 0.04573403 0.09146805 0.9542660 [29,] 0.03351518 0.06703037 0.9664848 [30,] 0.02635510 0.05271021 0.9736449 [31,] 0.47444146 0.94888292 0.5255585 [32,] 0.57992849 0.84014302 0.4200715 [33,] 0.54559288 0.90881424 0.4544071 [34,] 0.54929782 0.90140435 0.4507022 [35,] 0.50352107 0.99295786 0.4964789 [36,] 0.45386130 0.90772260 0.5461387 [37,] 0.41196830 0.82393661 0.5880317 [38,] 0.55691665 0.88616671 0.4430834 [39,] 0.52136370 0.95727260 0.4786363 [40,] 0.48994899 0.97989798 0.5100510 [41,] 0.66145335 0.67709331 0.3385467 [42,] 0.65669055 0.68661891 0.3433095 [43,] 0.60997065 0.78005871 0.3900294 [44,] 0.56480201 0.87039598 0.4351980 [45,] 0.53929835 0.92140330 0.4607017 [46,] 0.50306511 0.99386977 0.4969349 [47,] 0.45548147 0.91096293 0.5445185 [48,] 0.46958445 0.93916890 0.5304155 [49,] 0.42855842 0.85711684 0.5714416 [50,] 0.65826341 0.68347319 0.3417366 [51,] 0.62783753 0.74432493 0.3721625 [52,] 0.58308223 0.83383555 0.4169178 [53,] 0.57474471 0.85051057 0.4252553 [54,] 0.53178071 0.93643859 0.4682193 [55,] 0.49318226 0.98636452 0.5068177 [56,] 0.47933053 0.95866105 0.5206695 [57,] 0.43493741 0.86987483 0.5650626 [58,] 0.39926615 0.79853231 0.6007338 [59,] 0.35671311 0.71342621 0.6432869 [60,] 0.33040752 0.66081503 0.6695925 [61,] 0.31479633 0.62959267 0.6852037 [62,] 0.33601109 0.67202218 0.6639889 [63,] 0.45558884 0.91117768 0.5444112 [64,] 0.55600590 0.88798820 0.4439941 [65,] 0.51783149 0.96433702 0.4821685 [66,] 0.73490416 0.53019168 0.2650958 [67,] 0.69858077 0.60283846 0.3014192 [68,] 0.73078339 0.53843322 0.2692166 [69,] 0.73876464 0.52247071 0.2612354 [70,] 0.71393118 0.57213764 0.2860688 [71,] 0.69179497 0.61641007 0.3082050 [72,] 0.65548552 0.68902897 0.3445145 [73,] 0.62486549 0.75026902 0.3751345 [74,] 0.58950175 0.82099651 0.4104983 [75,] 0.55089870 0.89820260 0.4491013 [76,] 0.52036294 0.95927412 0.4796371 [77,] 0.67286422 0.65427156 0.3271358 [78,] 0.64124288 0.71751423 0.3587571 [79,] 0.59921224 0.80157553 0.4007878 [80,] 0.55674558 0.88650883 0.4432544 [81,] 0.52837605 0.94324790 0.4716239 [82,] 0.50610116 0.98779768 0.4938988 [83,] 0.47726407 0.95452814 0.5227359 [84,] 0.46480037 0.92960074 0.5351996 [85,] 0.42121116 0.84242233 0.5787888 [86,] 0.43010174 0.86020349 0.5698983 [87,] 0.42072483 0.84144966 0.5792752 [88,] 0.38980518 0.77961036 0.6101948 [89,] 0.34874743 0.69749485 0.6512526 [90,] 0.31695849 0.63391698 0.6830415 [91,] 0.28229598 0.56459197 0.7177040 [92,] 0.25162881 0.50325762 0.7483712 [93,] 0.22552108 0.45104216 0.7744789 [94,] 0.19876470 0.39752940 0.8012353 [95,] 0.16998901 0.33997803 0.8300110 [96,] 0.14738297 0.29476594 0.8526170 [97,] 0.12767343 0.25534686 0.8723266 [98,] 0.26565121 0.53130242 0.7343488 [99,] 0.23093809 0.46187617 0.7690619 [100,] 0.21474528 0.42949056 0.7852547 [101,] 0.22198746 0.44397492 0.7780125 [102,] 0.21662515 0.43325030 0.7833748 [103,] 0.19407776 0.38815551 0.8059222 [104,] 0.17466565 0.34933131 0.8253343 [105,] 0.22952599 0.45905198 0.7704740 [106,] 0.22034518 0.44069036 0.7796548 [107,] 0.20926994 0.41853987 0.7907301 [108,] 0.24765615 0.49531230 0.7523438 [109,] 0.22298081 0.44596162 0.7770192 [110,] 0.25211683 0.50423366 0.7478832 [111,] 0.28850819 0.57701638 0.7114918 [112,] 0.25363115 0.50726230 0.7463689 [113,] 0.22076046 0.44152091 0.7792395 [114,] 0.19679118 0.39358237 0.8032088 [115,] 0.17436689 0.34873378 0.8256331 [116,] 0.15236869 0.30473738 0.8476313 [117,] 0.13892220 0.27784440 0.8610778 [118,] 0.12850815 0.25701630 0.8714918 [119,] 0.11480289 0.22960579 0.8851971 [120,] 0.09338352 0.18676704 0.9066165 [121,] 0.09040743 0.18081485 0.9095926 [122,] 0.07082248 0.14164496 0.9291775 [123,] 0.06703977 0.13407954 0.9329602 [124,] 0.05518215 0.11036429 0.9448179 [125,] 0.05613587 0.11227175 0.9438641 [126,] 0.05303672 0.10607344 0.9469633 [127,] 0.08164331 0.16328661 0.9183567 [128,] 0.07569444 0.15138888 0.9243056 [129,] 0.07344898 0.14689796 0.9265510 [130,] 0.05756049 0.11512099 0.9424395 [131,] 0.04307985 0.08615971 0.9569201 [132,] 0.04200917 0.08401833 0.9579908 [133,] 0.03247019 0.06494038 0.9675298 [134,] 0.04400759 0.08801517 0.9559924 [135,] 0.04122247 0.08244494 0.9587775 [136,] 0.30293296 0.60586591 0.6970670 [137,] 0.25976506 0.51953012 0.7402349 [138,] 0.20624038 0.41248077 0.7937596 [139,] 0.19465296 0.38930591 0.8053470 [140,] 0.14977188 0.29954376 0.8502281 [141,] 0.29169431 0.58338863 0.7083057 [142,] 0.33142749 0.66285497 0.6685725 [143,] 0.27402064 0.54804128 0.7259794 [144,] 0.25901192 0.51802384 0.7409881 [145,] 0.20281847 0.40563695 0.7971815 [146,] 0.53169929 0.93660141 0.4683007 [147,] 0.78589393 0.42821214 0.2141061 [148,] 0.70349807 0.59300387 0.2965019 [149,] 0.58797119 0.82405763 0.4120288 [150,] 0.53355599 0.93288802 0.4664440 [151,] 0.77848040 0.44303919 0.2215196 > postscript(file="/var/fisher/rcomp/tmp/1yd2i1351949560.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/fisher/rcomp/tmp/2asaw1351949560.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/fisher/rcomp/tmp/35lkm1351949560.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/fisher/rcomp/tmp/4uqeq1351949560.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/fisher/rcomp/tmp/57pq91351949560.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 = 162 Frequency = 1 1 2 3 4 5 6 7 -2.8624967 0.4268470 4.7079502 0.5667689 -0.8637561 -2.0007486 3.4275451 8 9 10 11 12 13 14 0.1369420 -1.1475149 -0.2921867 0.5701226 0.8531833 0.5673301 0.4226583 15 16 17 18 19 20 21 2.2788214 0.4241914 -0.1454205 4.5652358 2.4226583 1.4248895 1.4241914 22 23 24 25 26 27 28 1.5681651 3.4226583 0.7071152 1.4268470 1.1416920 0.8524851 0.2788214 29 30 31 32 33 34 35 1.2816139 -0.8609636 0.5702595 -1.8622230 -1.2872999 1.1362439 -0.8588693 36 37 38 39 40 41 42 -7.5758086 -4.1466799 -1.1461186 1.8533201 0.9964589 0.7120020 -0.8609636 43 44 45 46 47 48 49 4.5694245 -1.0035411 -1.4277830 -4.2900924 -1.4354623 0.2809158 0.8503908 50 51 52 53 54 55 56 -1.4305755 1.4207008 -0.5737143 -2.5758086 1.1355458 -5.5751105 -1.2879980 57 58 59 60 61 62 63 0.4254508 1.8512258 -0.2907905 0.9957608 -2.2871630 0.5680283 1.1376402 64 65 66 67 68 69 70 -0.4346273 1.1404326 1.9936664 2.8524851 3.7135351 -3.5787379 0.9936664 71 72 73 74 75 76 77 -5.4333680 -0.4367217 3.1348477 2.5631414 1.1432251 1.4282432 0.7085114 78 79 80 81 82 83 84 1.1404326 -1.0041024 0.7154926 1.2795195 4.7078133 0.9936664 -0.2886961 85 86 87 88 89 90 91 0.4234933 1.2830101 -1.4354623 1.2809158 1.8526220 0.2816139 -2.4353255 92 93 94 95 96 97 98 1.8545795 0.9908739 0.4276820 -1.1459818 0.4240545 0.7099076 0.9978551 99 100 101 102 103 104 105 0.7106058 -0.5779030 0.5666320 0.7099076 4.8510889 0.4276820 1.2774252 106 107 108 109 110 111 112 -2.7157305 1.5673301 0.1368052 0.8524851 -4.1504442 1.7086483 1.5667689 113 114 115 116 117 118 119 2.4186064 -1.5758086 -3.2893942 2.7120020 -0.7232729 -0.8658504 -1.7197823 120 121 122 123 124 125 126 0.5666320 -1.7211786 1.5709576 -2.4354623 0.7078133 0.2830101 1.5667689 127 128 129 130 131 132 133 -0.5731530 0.7090727 0.2795195 -3.0035411 1.4241914 -4.0048005 0.2807789 134 135 136 137 138 139 140 -1.8608268 -1.2921867 0.4269839 -0.9978193 0.1376402 -3.2920498 -3.0042392 141 142 143 144 145 146 147 -6.4346273 1.4234933 0.7086483 2.7079502 1.5737501 -5.7150324 3.4283801 148 149 150 151 152 153 154 -2.1482130 1.4255876 -2.0028430 -5.4354623 -1.0043761 1.1355458 0.9922702 155 156 157 158 159 160 161 -1.0042392 -4.7169899 1.8545795 -1.5786011 0.2795195 1.1397345 -2.5772048 162 -1.8630580 > postscript(file="/var/fisher/rcomp/tmp/66x541351949560.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.8624967 NA 1 0.4268470 -2.8624967 2 4.7079502 0.4268470 3 0.5667689 4.7079502 4 -0.8637561 0.5667689 5 -2.0007486 -0.8637561 6 3.4275451 -2.0007486 7 0.1369420 3.4275451 8 -1.1475149 0.1369420 9 -0.2921867 -1.1475149 10 0.5701226 -0.2921867 11 0.8531833 0.5701226 12 0.5673301 0.8531833 13 0.4226583 0.5673301 14 2.2788214 0.4226583 15 0.4241914 2.2788214 16 -0.1454205 0.4241914 17 4.5652358 -0.1454205 18 2.4226583 4.5652358 19 1.4248895 2.4226583 20 1.4241914 1.4248895 21 1.5681651 1.4241914 22 3.4226583 1.5681651 23 0.7071152 3.4226583 24 1.4268470 0.7071152 25 1.1416920 1.4268470 26 0.8524851 1.1416920 27 0.2788214 0.8524851 28 1.2816139 0.2788214 29 -0.8609636 1.2816139 30 0.5702595 -0.8609636 31 -1.8622230 0.5702595 32 -1.2872999 -1.8622230 33 1.1362439 -1.2872999 34 -0.8588693 1.1362439 35 -7.5758086 -0.8588693 36 -4.1466799 -7.5758086 37 -1.1461186 -4.1466799 38 1.8533201 -1.1461186 39 0.9964589 1.8533201 40 0.7120020 0.9964589 41 -0.8609636 0.7120020 42 4.5694245 -0.8609636 43 -1.0035411 4.5694245 44 -1.4277830 -1.0035411 45 -4.2900924 -1.4277830 46 -1.4354623 -4.2900924 47 0.2809158 -1.4354623 48 0.8503908 0.2809158 49 -1.4305755 0.8503908 50 1.4207008 -1.4305755 51 -0.5737143 1.4207008 52 -2.5758086 -0.5737143 53 1.1355458 -2.5758086 54 -5.5751105 1.1355458 55 -1.2879980 -5.5751105 56 0.4254508 -1.2879980 57 1.8512258 0.4254508 58 -0.2907905 1.8512258 59 0.9957608 -0.2907905 60 -2.2871630 0.9957608 61 0.5680283 -2.2871630 62 1.1376402 0.5680283 63 -0.4346273 1.1376402 64 1.1404326 -0.4346273 65 1.9936664 1.1404326 66 2.8524851 1.9936664 67 3.7135351 2.8524851 68 -3.5787379 3.7135351 69 0.9936664 -3.5787379 70 -5.4333680 0.9936664 71 -0.4367217 -5.4333680 72 3.1348477 -0.4367217 73 2.5631414 3.1348477 74 1.1432251 2.5631414 75 1.4282432 1.1432251 76 0.7085114 1.4282432 77 1.1404326 0.7085114 78 -1.0041024 1.1404326 79 0.7154926 -1.0041024 80 1.2795195 0.7154926 81 4.7078133 1.2795195 82 0.9936664 4.7078133 83 -0.2886961 0.9936664 84 0.4234933 -0.2886961 85 1.2830101 0.4234933 86 -1.4354623 1.2830101 87 1.2809158 -1.4354623 88 1.8526220 1.2809158 89 0.2816139 1.8526220 90 -2.4353255 0.2816139 91 1.8545795 -2.4353255 92 0.9908739 1.8545795 93 0.4276820 0.9908739 94 -1.1459818 0.4276820 95 0.4240545 -1.1459818 96 0.7099076 0.4240545 97 0.9978551 0.7099076 98 0.7106058 0.9978551 99 -0.5779030 0.7106058 100 0.5666320 -0.5779030 101 0.7099076 0.5666320 102 4.8510889 0.7099076 103 0.4276820 4.8510889 104 1.2774252 0.4276820 105 -2.7157305 1.2774252 106 1.5673301 -2.7157305 107 0.1368052 1.5673301 108 0.8524851 0.1368052 109 -4.1504442 0.8524851 110 1.7086483 -4.1504442 111 1.5667689 1.7086483 112 2.4186064 1.5667689 113 -1.5758086 2.4186064 114 -3.2893942 -1.5758086 115 2.7120020 -3.2893942 116 -0.7232729 2.7120020 117 -0.8658504 -0.7232729 118 -1.7197823 -0.8658504 119 0.5666320 -1.7197823 120 -1.7211786 0.5666320 121 1.5709576 -1.7211786 122 -2.4354623 1.5709576 123 0.7078133 -2.4354623 124 0.2830101 0.7078133 125 1.5667689 0.2830101 126 -0.5731530 1.5667689 127 0.7090727 -0.5731530 128 0.2795195 0.7090727 129 -3.0035411 0.2795195 130 1.4241914 -3.0035411 131 -4.0048005 1.4241914 132 0.2807789 -4.0048005 133 -1.8608268 0.2807789 134 -1.2921867 -1.8608268 135 0.4269839 -1.2921867 136 -0.9978193 0.4269839 137 0.1376402 -0.9978193 138 -3.2920498 0.1376402 139 -3.0042392 -3.2920498 140 -6.4346273 -3.0042392 141 1.4234933 -6.4346273 142 0.7086483 1.4234933 143 2.7079502 0.7086483 144 1.5737501 2.7079502 145 -5.7150324 1.5737501 146 3.4283801 -5.7150324 147 -2.1482130 3.4283801 148 1.4255876 -2.1482130 149 -2.0028430 1.4255876 150 -5.4354623 -2.0028430 151 -1.0043761 -5.4354623 152 1.1355458 -1.0043761 153 0.9922702 1.1355458 154 -1.0042392 0.9922702 155 -4.7169899 -1.0042392 156 1.8545795 -4.7169899 157 -1.5786011 1.8545795 158 0.2795195 -1.5786011 159 1.1397345 0.2795195 160 -2.5772048 1.1397345 161 -1.8630580 -2.5772048 162 NA -1.8630580 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.4268470 -2.8624967 [2,] 4.7079502 0.4268470 [3,] 0.5667689 4.7079502 [4,] -0.8637561 0.5667689 [5,] -2.0007486 -0.8637561 [6,] 3.4275451 -2.0007486 [7,] 0.1369420 3.4275451 [8,] -1.1475149 0.1369420 [9,] -0.2921867 -1.1475149 [10,] 0.5701226 -0.2921867 [11,] 0.8531833 0.5701226 [12,] 0.5673301 0.8531833 [13,] 0.4226583 0.5673301 [14,] 2.2788214 0.4226583 [15,] 0.4241914 2.2788214 [16,] -0.1454205 0.4241914 [17,] 4.5652358 -0.1454205 [18,] 2.4226583 4.5652358 [19,] 1.4248895 2.4226583 [20,] 1.4241914 1.4248895 [21,] 1.5681651 1.4241914 [22,] 3.4226583 1.5681651 [23,] 0.7071152 3.4226583 [24,] 1.4268470 0.7071152 [25,] 1.1416920 1.4268470 [26,] 0.8524851 1.1416920 [27,] 0.2788214 0.8524851 [28,] 1.2816139 0.2788214 [29,] -0.8609636 1.2816139 [30,] 0.5702595 -0.8609636 [31,] -1.8622230 0.5702595 [32,] -1.2872999 -1.8622230 [33,] 1.1362439 -1.2872999 [34,] -0.8588693 1.1362439 [35,] -7.5758086 -0.8588693 [36,] -4.1466799 -7.5758086 [37,] -1.1461186 -4.1466799 [38,] 1.8533201 -1.1461186 [39,] 0.9964589 1.8533201 [40,] 0.7120020 0.9964589 [41,] -0.8609636 0.7120020 [42,] 4.5694245 -0.8609636 [43,] -1.0035411 4.5694245 [44,] -1.4277830 -1.0035411 [45,] -4.2900924 -1.4277830 [46,] -1.4354623 -4.2900924 [47,] 0.2809158 -1.4354623 [48,] 0.8503908 0.2809158 [49,] -1.4305755 0.8503908 [50,] 1.4207008 -1.4305755 [51,] -0.5737143 1.4207008 [52,] -2.5758086 -0.5737143 [53,] 1.1355458 -2.5758086 [54,] -5.5751105 1.1355458 [55,] -1.2879980 -5.5751105 [56,] 0.4254508 -1.2879980 [57,] 1.8512258 0.4254508 [58,] -0.2907905 1.8512258 [59,] 0.9957608 -0.2907905 [60,] -2.2871630 0.9957608 [61,] 0.5680283 -2.2871630 [62,] 1.1376402 0.5680283 [63,] -0.4346273 1.1376402 [64,] 1.1404326 -0.4346273 [65,] 1.9936664 1.1404326 [66,] 2.8524851 1.9936664 [67,] 3.7135351 2.8524851 [68,] -3.5787379 3.7135351 [69,] 0.9936664 -3.5787379 [70,] -5.4333680 0.9936664 [71,] -0.4367217 -5.4333680 [72,] 3.1348477 -0.4367217 [73,] 2.5631414 3.1348477 [74,] 1.1432251 2.5631414 [75,] 1.4282432 1.1432251 [76,] 0.7085114 1.4282432 [77,] 1.1404326 0.7085114 [78,] -1.0041024 1.1404326 [79,] 0.7154926 -1.0041024 [80,] 1.2795195 0.7154926 [81,] 4.7078133 1.2795195 [82,] 0.9936664 4.7078133 [83,] -0.2886961 0.9936664 [84,] 0.4234933 -0.2886961 [85,] 1.2830101 0.4234933 [86,] -1.4354623 1.2830101 [87,] 1.2809158 -1.4354623 [88,] 1.8526220 1.2809158 [89,] 0.2816139 1.8526220 [90,] -2.4353255 0.2816139 [91,] 1.8545795 -2.4353255 [92,] 0.9908739 1.8545795 [93,] 0.4276820 0.9908739 [94,] -1.1459818 0.4276820 [95,] 0.4240545 -1.1459818 [96,] 0.7099076 0.4240545 [97,] 0.9978551 0.7099076 [98,] 0.7106058 0.9978551 [99,] -0.5779030 0.7106058 [100,] 0.5666320 -0.5779030 [101,] 0.7099076 0.5666320 [102,] 4.8510889 0.7099076 [103,] 0.4276820 4.8510889 [104,] 1.2774252 0.4276820 [105,] -2.7157305 1.2774252 [106,] 1.5673301 -2.7157305 [107,] 0.1368052 1.5673301 [108,] 0.8524851 0.1368052 [109,] -4.1504442 0.8524851 [110,] 1.7086483 -4.1504442 [111,] 1.5667689 1.7086483 [112,] 2.4186064 1.5667689 [113,] -1.5758086 2.4186064 [114,] -3.2893942 -1.5758086 [115,] 2.7120020 -3.2893942 [116,] -0.7232729 2.7120020 [117,] -0.8658504 -0.7232729 [118,] -1.7197823 -0.8658504 [119,] 0.5666320 -1.7197823 [120,] -1.7211786 0.5666320 [121,] 1.5709576 -1.7211786 [122,] -2.4354623 1.5709576 [123,] 0.7078133 -2.4354623 [124,] 0.2830101 0.7078133 [125,] 1.5667689 0.2830101 [126,] -0.5731530 1.5667689 [127,] 0.7090727 -0.5731530 [128,] 0.2795195 0.7090727 [129,] -3.0035411 0.2795195 [130,] 1.4241914 -3.0035411 [131,] -4.0048005 1.4241914 [132,] 0.2807789 -4.0048005 [133,] -1.8608268 0.2807789 [134,] -1.2921867 -1.8608268 [135,] 0.4269839 -1.2921867 [136,] -0.9978193 0.4269839 [137,] 0.1376402 -0.9978193 [138,] -3.2920498 0.1376402 [139,] -3.0042392 -3.2920498 [140,] -6.4346273 -3.0042392 [141,] 1.4234933 -6.4346273 [142,] 0.7086483 1.4234933 [143,] 2.7079502 0.7086483 [144,] 1.5737501 2.7079502 [145,] -5.7150324 1.5737501 [146,] 3.4283801 -5.7150324 [147,] -2.1482130 3.4283801 [148,] 1.4255876 -2.1482130 [149,] -2.0028430 1.4255876 [150,] -5.4354623 -2.0028430 [151,] -1.0043761 -5.4354623 [152,] 1.1355458 -1.0043761 [153,] 0.9922702 1.1355458 [154,] -1.0042392 0.9922702 [155,] -4.7169899 -1.0042392 [156,] 1.8545795 -4.7169899 [157,] -1.5786011 1.8545795 [158,] 0.2795195 -1.5786011 [159,] 1.1397345 0.2795195 [160,] -2.5772048 1.1397345 [161,] -1.8630580 -2.5772048 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.4268470 -2.8624967 2 4.7079502 0.4268470 3 0.5667689 4.7079502 4 -0.8637561 0.5667689 5 -2.0007486 -0.8637561 6 3.4275451 -2.0007486 7 0.1369420 3.4275451 8 -1.1475149 0.1369420 9 -0.2921867 -1.1475149 10 0.5701226 -0.2921867 11 0.8531833 0.5701226 12 0.5673301 0.8531833 13 0.4226583 0.5673301 14 2.2788214 0.4226583 15 0.4241914 2.2788214 16 -0.1454205 0.4241914 17 4.5652358 -0.1454205 18 2.4226583 4.5652358 19 1.4248895 2.4226583 20 1.4241914 1.4248895 21 1.5681651 1.4241914 22 3.4226583 1.5681651 23 0.7071152 3.4226583 24 1.4268470 0.7071152 25 1.1416920 1.4268470 26 0.8524851 1.1416920 27 0.2788214 0.8524851 28 1.2816139 0.2788214 29 -0.8609636 1.2816139 30 0.5702595 -0.8609636 31 -1.8622230 0.5702595 32 -1.2872999 -1.8622230 33 1.1362439 -1.2872999 34 -0.8588693 1.1362439 35 -7.5758086 -0.8588693 36 -4.1466799 -7.5758086 37 -1.1461186 -4.1466799 38 1.8533201 -1.1461186 39 0.9964589 1.8533201 40 0.7120020 0.9964589 41 -0.8609636 0.7120020 42 4.5694245 -0.8609636 43 -1.0035411 4.5694245 44 -1.4277830 -1.0035411 45 -4.2900924 -1.4277830 46 -1.4354623 -4.2900924 47 0.2809158 -1.4354623 48 0.8503908 0.2809158 49 -1.4305755 0.8503908 50 1.4207008 -1.4305755 51 -0.5737143 1.4207008 52 -2.5758086 -0.5737143 53 1.1355458 -2.5758086 54 -5.5751105 1.1355458 55 -1.2879980 -5.5751105 56 0.4254508 -1.2879980 57 1.8512258 0.4254508 58 -0.2907905 1.8512258 59 0.9957608 -0.2907905 60 -2.2871630 0.9957608 61 0.5680283 -2.2871630 62 1.1376402 0.5680283 63 -0.4346273 1.1376402 64 1.1404326 -0.4346273 65 1.9936664 1.1404326 66 2.8524851 1.9936664 67 3.7135351 2.8524851 68 -3.5787379 3.7135351 69 0.9936664 -3.5787379 70 -5.4333680 0.9936664 71 -0.4367217 -5.4333680 72 3.1348477 -0.4367217 73 2.5631414 3.1348477 74 1.1432251 2.5631414 75 1.4282432 1.1432251 76 0.7085114 1.4282432 77 1.1404326 0.7085114 78 -1.0041024 1.1404326 79 0.7154926 -1.0041024 80 1.2795195 0.7154926 81 4.7078133 1.2795195 82 0.9936664 4.7078133 83 -0.2886961 0.9936664 84 0.4234933 -0.2886961 85 1.2830101 0.4234933 86 -1.4354623 1.2830101 87 1.2809158 -1.4354623 88 1.8526220 1.2809158 89 0.2816139 1.8526220 90 -2.4353255 0.2816139 91 1.8545795 -2.4353255 92 0.9908739 1.8545795 93 0.4276820 0.9908739 94 -1.1459818 0.4276820 95 0.4240545 -1.1459818 96 0.7099076 0.4240545 97 0.9978551 0.7099076 98 0.7106058 0.9978551 99 -0.5779030 0.7106058 100 0.5666320 -0.5779030 101 0.7099076 0.5666320 102 4.8510889 0.7099076 103 0.4276820 4.8510889 104 1.2774252 0.4276820 105 -2.7157305 1.2774252 106 1.5673301 -2.7157305 107 0.1368052 1.5673301 108 0.8524851 0.1368052 109 -4.1504442 0.8524851 110 1.7086483 -4.1504442 111 1.5667689 1.7086483 112 2.4186064 1.5667689 113 -1.5758086 2.4186064 114 -3.2893942 -1.5758086 115 2.7120020 -3.2893942 116 -0.7232729 2.7120020 117 -0.8658504 -0.7232729 118 -1.7197823 -0.8658504 119 0.5666320 -1.7197823 120 -1.7211786 0.5666320 121 1.5709576 -1.7211786 122 -2.4354623 1.5709576 123 0.7078133 -2.4354623 124 0.2830101 0.7078133 125 1.5667689 0.2830101 126 -0.5731530 1.5667689 127 0.7090727 -0.5731530 128 0.2795195 0.7090727 129 -3.0035411 0.2795195 130 1.4241914 -3.0035411 131 -4.0048005 1.4241914 132 0.2807789 -4.0048005 133 -1.8608268 0.2807789 134 -1.2921867 -1.8608268 135 0.4269839 -1.2921867 136 -0.9978193 0.4269839 137 0.1376402 -0.9978193 138 -3.2920498 0.1376402 139 -3.0042392 -3.2920498 140 -6.4346273 -3.0042392 141 1.4234933 -6.4346273 142 0.7086483 1.4234933 143 2.7079502 0.7086483 144 1.5737501 2.7079502 145 -5.7150324 1.5737501 146 3.4283801 -5.7150324 147 -2.1482130 3.4283801 148 1.4255876 -2.1482130 149 -2.0028430 1.4255876 150 -5.4354623 -2.0028430 151 -1.0043761 -5.4354623 152 1.1355458 -1.0043761 153 0.9922702 1.1355458 154 -1.0042392 0.9922702 155 -4.7169899 -1.0042392 156 1.8545795 -4.7169899 157 -1.5786011 1.8545795 158 0.2795195 -1.5786011 159 1.1397345 0.2795195 160 -2.5772048 1.1397345 161 -1.8630580 -2.5772048 > 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/fisher/rcomp/tmp/7kbgh1351949560.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/fisher/rcomp/tmp/80n8h1351949560.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/fisher/rcomp/tmp/9omoa1351949560.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/fisher/rcomp/tmp/10qd6e1351949560.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/116flp1351949560.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/fisher/rcomp/tmp/126k611351949560.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/fisher/rcomp/tmp/13qjdd1351949561.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/fisher/rcomp/tmp/14jqgd1351949561.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/fisher/rcomp/tmp/15r63d1351949561.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/fisher/rcomp/tmp/160tok1351949561.tab") + } > > try(system("convert tmp/1yd2i1351949560.ps tmp/1yd2i1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/2asaw1351949560.ps tmp/2asaw1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/35lkm1351949560.ps tmp/35lkm1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/4uqeq1351949560.ps tmp/4uqeq1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/57pq91351949560.ps tmp/57pq91351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/66x541351949560.ps tmp/66x541351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/7kbgh1351949560.ps tmp/7kbgh1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/80n8h1351949560.ps tmp/80n8h1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/9omoa1351949560.ps tmp/9omoa1351949560.png",intern=TRUE)) character(0) > try(system("convert tmp/10qd6e1351949560.ps tmp/10qd6e1351949560.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.381 1.144 8.525