R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(170650 + ,95556 + ,128 + ,86621 + ,54565 + ,89 + ,127843 + ,63016 + ,68 + ,152526 + ,79774 + ,108 + ,92389 + ,31258 + ,51 + ,38138 + ,52491 + ,33 + ,316392 + ,91256 + ,119 + ,32750 + ,22807 + ,5 + ,132344 + ,77411 + ,63 + ,137034 + ,48821 + ,66 + ,176816 + ,52295 + ,98 + ,140146 + ,63262 + ,71 + ,113286 + ,50466 + ,55 + ,195452 + ,62932 + ,116 + ,144513 + ,38439 + ,71 + ,263581 + ,70817 + ,120 + ,183271 + ,105965 + ,122 + ,210763 + ,73795 + ,74 + ,113853 + ,82043 + ,111 + ,159968 + ,74349 + ,103 + ,174585 + ,82204 + ,98 + ,294675 + ,55709 + ,100 + ,96213 + ,37137 + ,42 + ,116390 + ,70780 + ,100 + ,146342 + ,55027 + ,105 + ,152647 + ,56699 + ,77 + ,166661 + ,65911 + ,83 + ,175505 + ,56316 + ,98 + ,112485 + ,26982 + ,46 + ,197053 + ,54628 + ,95 + ,191822 + ,96750 + ,91 + ,139127 + ,53009 + ,91 + ,221991 + ,64664 + ,94 + ,75339 + ,36990 + ,15 + ,247985 + ,85224 + ,137 + ,167351 + ,37048 + ,56 + ,266609 + ,59635 + ,78 + ,122024 + ,42051 + ,68 + ,80964 + ,26998 + ,34 + ,215183 + ,63717 + ,94 + ,225469 + ,55071 + ,82 + ,125382 + ,40001 + ,63 + ,141437 + ,54506 + ,58 + ,81106 + ,35838 + ,43 + ,93125 + ,50838 + ,36 + ,318668 + ,86997 + ,64 + ,78800 + ,33032 + ,21 + ,161048 + ,61704 + ,104 + ,236367 + ,117986 + ,124 + ,131108 + ,56733 + ,101 + ,131096 + ,55064 + ,85 + ,24188 + ,84607 + ,7 + ,267003 + ,84607 + ,124 + ,65029 + ,32551 + ,21 + ,100147 + ,31701 + ,35 + ,178549 + ,71170 + ,95 + ,186965 + ,101773 + ,102 + ,197266 + ,101653 + ,212 + ,217300 + ,81493 + ,141 + ,149594 + ,55901 + ,54 + ,263413 + ,109104 + ,117 + ,209228 + ,114425 + ,145 + ,145699 + ,36311 + ,50 + ,187197 + ,70027 + ,80 + ,150752 + ,73713 + ,87 + ,125555 + ,40671 + ,78 + ,118697 + ,89041 + ,86 + ,147913 + ,57231 + ,82 + ,155015 + ,68608 + ,119 + ,96487 + ,59155 + ,75 + ,128780 + ,55827 + ,70 + ,71972 + ,22618 + ,25 + ,140266 + ,58425 + ,66 + ,148454 + ,65724 + ,89 + ,110655 + ,56979 + ,99 + ,203795 + ,72369 + ,98 + ,211093 + ,79194 + ,104 + ,113421 + ,202316 + ,48 + ,103660 + ,44970 + ,81 + ,128390 + ,49319 + ,64 + ,105502 + ,36252 + ,44 + ,299359 + ,75741 + ,104 + ,141493 + ,38417 + ,36 + ,146390 + ,64102 + ,120 + ,80953 + ,56622 + ,58 + ,109237 + ,15430 + ,27 + ,102104 + ,72571 + ,84 + ,233139 + ,67271 + ,56 + ,176507 + ,43460 + ,46 + ,118217 + ,99501 + ,119 + ,142694 + ,28340 + ,57 + ,152193 + ,76013 + ,139 + ,126500 + ,37361 + ,51 + ,147410 + ,48204 + ,85 + ,187772 + ,76168 + ,91 + ,140903 + ,85168 + ,79 + ,150587 + ,125410 + ,142 + ,202077 + ,123328 + ,149 + ,213875 + ,83038 + ,96 + ,252952 + ,120087 + ,198 + ,166981 + ,91939 + ,61 + ,190562 + ,103646 + ,145 + ,106351 + ,29467 + ,26 + ,43287 + ,43750 + ,49 + ,127493 + ,34497 + ,68 + ,132143 + ,66477 + ,145 + ,157469 + ,71181 + ,82 + ,197727 + ,74482 + ,102 + ,88077 + ,174949 + ,52 + ,94968 + ,46765 + ,56 + ,191351 + ,90257 + ,80 + ,153332 + ,51370 + ,99 + ,22938 + ,1168 + ,11 + ,125927 + ,51360 + ,87 + ,61857 + ,25162 + ,28 + ,103749 + ,21067 + ,67 + ,269909 + ,58233 + ,150 + ,21054 + ,855 + ,4 + ,174409 + ,85903 + ,71 + ,31414 + ,14116 + ,39 + ,200405 + ,57637 + ,87 + ,139456 + ,94137 + ,66 + ,78001 + ,62147 + ,23 + ,82724 + ,62832 + ,56 + ,38214 + ,8773 + ,16 + ,91390 + ,63785 + ,49 + ,197612 + ,65196 + ,108 + ,137161 + ,73087 + ,112 + ,251103 + ,72631 + ,110 + ,209835 + ,86281 + ,126 + ,269470 + ,162365 + ,155 + ,139215 + ,56530 + ,75 + ,76470 + ,35606 + ,30 + ,197114 + ,70111 + ,78 + ,291962 + ,92046 + ,135 + ,56727 + ,63989 + ,8 + ,254843 + ,104911 + ,114 + ,105908 + ,43448 + ,60 + ,170155 + ,60029 + ,99 + ,136745 + ,38650 + ,98 + ,86706 + ,47261 + ,33 + ,251448 + ,73586 + ,93 + ,152366 + ,83042 + ,157 + ,173260 + ,37238 + ,15 + ,212582 + ,63958 + ,98 + ,87850 + ,78956 + ,49 + ,148363 + ,99518 + ,88 + ,185455 + ,111436 + ,151 + ,0 + ,0 + ,0 + ,14688 + ,6023 + ,5 + ,98 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,137891 + ,42564 + ,80 + ,200096 + ,38885 + ,122 + ,0 + ,0 + ,0 + ,203 + ,0 + ,0 + ,7199 + ,1644 + ,6 + ,46660 + ,6179 + ,13 + ,17547 + ,3926 + ,3 + ,73567 + ,23238 + ,18 + ,969 + ,0 + ,0 + ,106662 + ,49288 + ,48) + ,dim=c(3 + ,164) + ,dimnames=list(c('TijdRFC' + ,'Karakters' + ,'Blogs') + ,1:164)) > y <- array(NA,dim=c(3,164),dimnames=list(c('TijdRFC','Karakters','Blogs'),1:164)) > 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' > 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 TijdRFC Karakters Blogs 1 170650 95556 128 2 86621 54565 89 3 127843 63016 68 4 152526 79774 108 5 92389 31258 51 6 38138 52491 33 7 316392 91256 119 8 32750 22807 5 9 132344 77411 63 10 137034 48821 66 11 176816 52295 98 12 140146 63262 71 13 113286 50466 55 14 195452 62932 116 15 144513 38439 71 16 263581 70817 120 17 183271 105965 122 18 210763 73795 74 19 113853 82043 111 20 159968 74349 103 21 174585 82204 98 22 294675 55709 100 23 96213 37137 42 24 116390 70780 100 25 146342 55027 105 26 152647 56699 77 27 166661 65911 83 28 175505 56316 98 29 112485 26982 46 30 197053 54628 95 31 191822 96750 91 32 139127 53009 91 33 221991 64664 94 34 75339 36990 15 35 247985 85224 137 36 167351 37048 56 37 266609 59635 78 38 122024 42051 68 39 80964 26998 34 40 215183 63717 94 41 225469 55071 82 42 125382 40001 63 43 141437 54506 58 44 81106 35838 43 45 93125 50838 36 46 318668 86997 64 47 78800 33032 21 48 161048 61704 104 49 236367 117986 124 50 131108 56733 101 51 131096 55064 85 52 24188 84607 7 53 267003 84607 124 54 65029 32551 21 55 100147 31701 35 56 178549 71170 95 57 186965 101773 102 58 197266 101653 212 59 217300 81493 141 60 149594 55901 54 61 263413 109104 117 62 209228 114425 145 63 145699 36311 50 64 187197 70027 80 65 150752 73713 87 66 125555 40671 78 67 118697 89041 86 68 147913 57231 82 69 155015 68608 119 70 96487 59155 75 71 128780 55827 70 72 71972 22618 25 73 140266 58425 66 74 148454 65724 89 75 110655 56979 99 76 203795 72369 98 77 211093 79194 104 78 113421 202316 48 79 103660 44970 81 80 128390 49319 64 81 105502 36252 44 82 299359 75741 104 83 141493 38417 36 84 146390 64102 120 85 80953 56622 58 86 109237 15430 27 87 102104 72571 84 88 233139 67271 56 89 176507 43460 46 90 118217 99501 119 91 142694 28340 57 92 152193 76013 139 93 126500 37361 51 94 147410 48204 85 95 187772 76168 91 96 140903 85168 79 97 150587 125410 142 98 202077 123328 149 99 213875 83038 96 100 252952 120087 198 101 166981 91939 61 102 190562 103646 145 103 106351 29467 26 104 43287 43750 49 105 127493 34497 68 106 132143 66477 145 107 157469 71181 82 108 197727 74482 102 109 88077 174949 52 110 94968 46765 56 111 191351 90257 80 112 153332 51370 99 113 22938 1168 11 114 125927 51360 87 115 61857 25162 28 116 103749 21067 67 117 269909 58233 150 118 21054 855 4 119 174409 85903 71 120 31414 14116 39 121 200405 57637 87 122 139456 94137 66 123 78001 62147 23 124 82724 62832 56 125 38214 8773 16 126 91390 63785 49 127 197612 65196 108 128 137161 73087 112 129 251103 72631 110 130 209835 86281 126 131 269470 162365 155 132 139215 56530 75 133 76470 35606 30 134 197114 70111 78 135 291962 92046 135 136 56727 63989 8 137 254843 104911 114 138 105908 43448 60 139 170155 60029 99 140 136745 38650 98 141 86706 47261 33 142 251448 73586 93 143 152366 83042 157 144 173260 37238 15 145 212582 63958 98 146 87850 78956 49 147 148363 99518 88 148 185455 111436 151 149 0 0 0 150 14688 6023 5 151 98 0 0 152 455 0 0 153 0 0 0 154 0 0 0 155 137891 42564 80 156 200096 38885 122 157 0 0 0 158 203 0 0 159 7199 1644 6 160 46660 6179 13 161 17547 3926 3 162 73567 23238 18 163 969 0 0 164 106662 49288 48 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Karakters Blogs 3.786e+04 3.785e-01 1.076e+03 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -107107 -31923 -2953 20910 179039 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3.786e+04 7.853e+03 4.821 3.28e-06 *** Karakters 3.785e-01 1.492e-01 2.537 0.0121 * Blogs 1.076e+03 1.160e+02 9.273 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 46150 on 161 degrees of freedom Multiple R-squared: 0.5939, Adjusted R-squared: 0.5889 F-statistic: 117.7 on 2 and 161 DF, p-value: < 2.2e-16 > 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.2675644 5.351289e-01 7.324356e-01 [2,] 0.9396000 1.208000e-01 6.040001e-02 [3,] 0.9063154 1.873692e-01 9.368458e-02 [4,] 0.8472052 3.055896e-01 1.527948e-01 [5,] 0.8009158 3.981685e-01 1.990842e-01 [6,] 0.7400883 5.198234e-01 2.599117e-01 [7,] 0.6566811 6.866377e-01 3.433189e-01 [8,] 0.5699060 8.601879e-01 4.300940e-01 [9,] 0.4791557 9.583113e-01 5.208443e-01 [10,] 0.4173842 8.347684e-01 5.826158e-01 [11,] 0.4576366 9.152732e-01 5.423634e-01 [12,] 0.4238169 8.476339e-01 5.761831e-01 [13,] 0.5330140 9.339720e-01 4.669860e-01 [14,] 0.6756763 6.486474e-01 3.243237e-01 [15,] 0.6177197 7.645606e-01 3.822803e-01 [16,] 0.5471773 9.056454e-01 4.528227e-01 [17,] 0.8350220 3.299560e-01 1.649780e-01 [18,] 0.7902755 4.194490e-01 2.097245e-01 [19,] 0.8184044 3.631913e-01 1.815956e-01 [20,] 0.8040414 3.919172e-01 1.959586e-01 [21,] 0.7595789 4.808423e-01 2.404211e-01 [22,] 0.7140692 5.718616e-01 2.859308e-01 [23,] 0.6598529 6.802942e-01 3.401471e-01 [24,] 0.6065523 7.868954e-01 3.934477e-01 [25,] 0.5670422 8.659155e-01 4.329578e-01 [26,] 0.5321116 9.357769e-01 4.678884e-01 [27,] 0.4898982 9.797964e-01 5.101018e-01 [28,] 0.5086455 9.827090e-01 4.913545e-01 [29,] 0.4604478 9.208956e-01 5.395522e-01 [30,] 0.4141714 8.283427e-01 5.858286e-01 [31,] 0.4264924 8.529848e-01 5.735076e-01 [32,] 0.7091281 5.817437e-01 2.908719e-01 [33,] 0.6662557 6.674886e-01 3.337443e-01 [34,] 0.6175171 7.649658e-01 3.824829e-01 [35,] 0.6117023 7.765953e-01 3.882977e-01 [36,] 0.6734873 6.530254e-01 3.265127e-01 [37,] 0.6267958 7.464084e-01 3.732042e-01 [38,] 0.5845810 8.308380e-01 4.154190e-01 [39,] 0.5443377 9.113246e-01 4.556623e-01 [40,] 0.4930872 9.861743e-01 5.069128e-01 [41,] 0.9456125 1.087750e-01 5.438750e-02 [42,] 0.9308363 1.383275e-01 6.916375e-02 [43,] 0.9166820 1.666360e-01 8.331802e-02 [44,] 0.8999033 2.001934e-01 1.000967e-01 [45,] 0.8954787 2.090425e-01 1.045213e-01 [46,] 0.8784809 2.430382e-01 1.215191e-01 [47,] 0.8964897 2.070206e-01 1.035103e-01 [48,] 0.9054068 1.891863e-01 9.459316e-02 [49,] 0.8841208 2.317585e-01 1.158792e-01 [50,] 0.8613078 2.773844e-01 1.386922e-01 [51,] 0.8353514 3.292972e-01 1.646486e-01 [52,] 0.8075284 3.849433e-01 1.924716e-01 [53,] 0.9271820 1.456360e-01 7.281801e-02 [54,] 0.9099486 1.801029e-01 9.005144e-02 [55,] 0.8979031 2.041937e-01 1.020969e-01 [56,] 0.9044574 1.910853e-01 9.554264e-02 [57,] 0.8946465 2.107070e-01 1.053535e-01 [58,] 0.8877111 2.245777e-01 1.122889e-01 [59,] 0.8775762 2.448475e-01 1.224238e-01 [60,] 0.8554741 2.890518e-01 1.445259e-01 [61,] 0.8302431 3.395138e-01 1.697569e-01 [62,] 0.8357362 3.285276e-01 1.642638e-01 [63,] 0.8065995 3.868010e-01 1.934005e-01 [64,] 0.7946082 4.107835e-01 2.053918e-01 [65,] 0.7952251 4.095498e-01 2.047749e-01 [66,] 0.7630187 4.739625e-01 2.369813e-01 [67,] 0.7276944 5.446112e-01 2.723056e-01 [68,] 0.6907473 6.185054e-01 3.092527e-01 [69,] 0.6526633 6.946733e-01 3.473367e-01 [70,] 0.6686563 6.626874e-01 3.313437e-01 [71,] 0.6483377 7.033245e-01 3.516623e-01 [72,] 0.6255358 7.489283e-01 3.744642e-01 [73,] 0.6465587 7.068826e-01 3.534413e-01 [74,] 0.6355593 7.288814e-01 3.644407e-01 [75,] 0.5932231 8.135539e-01 4.067769e-01 [76,] 0.5504459 8.991082e-01 4.495541e-01 [77,] 0.7889273 4.221454e-01 2.110727e-01 [78,] 0.7953354 4.093291e-01 2.046646e-01 [79,] 0.7919060 4.161879e-01 2.080940e-01 [80,] 0.7851867 4.296267e-01 2.148133e-01 [81,] 0.7732371 4.535258e-01 2.267629e-01 [82,] 0.7833779 4.332442e-01 2.166221e-01 [83,] 0.9100959 1.798082e-01 8.990409e-02 [84,] 0.9382643 1.234715e-01 6.173574e-02 [85,] 0.9641316 7.173673e-02 3.586836e-02 [86,] 0.9609527 7.809458e-02 3.904729e-02 [87,] 0.9683432 6.331362e-02 3.165681e-02 [88,] 0.9621261 7.574776e-02 3.787388e-02 [89,] 0.9518950 9.621000e-02 4.810500e-02 [90,] 0.9441345 1.117310e-01 5.586552e-02 [91,] 0.9308761 1.382477e-01 6.912386e-02 [92,] 0.9625993 7.480135e-02 3.740068e-02 [93,] 0.9617083 7.658331e-02 3.829166e-02 [94,] 0.9614304 7.713910e-02 3.856955e-02 [95,] 0.9629432 7.411368e-02 3.705684e-02 [96,] 0.9581994 8.360111e-02 4.180056e-02 [97,] 0.9591447 8.171063e-02 4.085531e-02 [98,] 0.9566996 8.660084e-02 4.330042e-02 [99,] 0.9667103 6.657949e-02 3.328975e-02 [100,] 0.9572905 8.541902e-02 4.270951e-02 [101,] 0.9857575 2.848502e-02 1.424251e-02 [102,] 0.9807251 3.854972e-02 1.927486e-02 [103,] 0.9756118 4.877638e-02 2.438819e-02 [104,] 0.9875563 2.488745e-02 1.244372e-02 [105,] 0.9841021 3.179582e-02 1.589791e-02 [106,] 0.9810634 3.787328e-02 1.893664e-02 [107,] 0.9748927 5.021468e-02 2.510734e-02 [108,] 0.9698242 6.035169e-02 3.017584e-02 [109,] 0.9636734 7.265327e-02 3.632663e-02 [110,] 0.9538519 9.229610e-02 4.614805e-02 [111,] 0.9412202 1.175596e-01 5.877981e-02 [112,] 0.9438195 1.123610e-01 5.618051e-02 [113,] 0.9312094 1.375812e-01 6.879060e-02 [114,] 0.9177721 1.644558e-01 8.222788e-02 [115,] 0.9196955 1.606090e-01 8.030449e-02 [116,] 0.9245062 1.509876e-01 7.549378e-02 [117,] 0.9048453 1.903094e-01 9.515472e-02 [118,] 0.8807729 2.384542e-01 1.192271e-01 [119,] 0.8758482 2.483035e-01 1.241518e-01 [120,] 0.8491257 3.017487e-01 1.508743e-01 [121,] 0.8261600 3.476801e-01 1.738400e-01 [122,] 0.7952558 4.094883e-01 2.047442e-01 [123,] 0.8099630 3.800740e-01 1.900370e-01 [124,] 0.8535607 2.928787e-01 1.464393e-01 [125,] 0.8176486 3.647029e-01 1.823514e-01 [126,] 0.8054031 3.891938e-01 1.945969e-01 [127,] 0.7616162 4.767676e-01 2.383838e-01 [128,] 0.7133682 5.732636e-01 2.866318e-01 [129,] 0.7119035 5.761930e-01 2.880965e-01 [130,] 0.7868788 4.262425e-01 2.131212e-01 [131,] 0.7545609 4.908782e-01 2.454391e-01 [132,] 0.7603910 4.792180e-01 2.396090e-01 [133,] 0.7077353 5.845294e-01 2.922647e-01 [134,] 0.6555633 6.888733e-01 3.444367e-01 [135,] 0.5945088 8.109824e-01 4.054912e-01 [136,] 0.5274321 9.451357e-01 4.725679e-01 [137,] 0.7604511 4.790977e-01 2.395489e-01 [138,] 0.8471720 3.056560e-01 1.528280e-01 [139,] 0.9993272 1.345531e-03 6.727657e-04 [140,] 0.9999271 1.457513e-04 7.287566e-05 [141,] 0.9998220 3.560829e-04 1.780414e-04 [142,] 0.9996592 6.816730e-04 3.408365e-04 [143,] 0.9999998 3.554416e-07 1.777208e-07 [144,] 0.9999992 1.520391e-06 7.601953e-07 [145,] 0.9999966 6.779395e-06 3.389697e-06 [146,] 0.9999863 2.732198e-05 1.366099e-05 [147,] 0.9999465 1.070432e-04 5.352160e-05 [148,] 0.9998034 3.932178e-04 1.966089e-04 [149,] 0.9993185 1.363062e-03 6.815309e-04 [150,] 0.9981123 3.775325e-03 1.887663e-03 [151,] 0.9929600 1.408000e-02 7.040000e-03 [152,] 0.9785297 4.294056e-02 2.147028e-02 [153,] 0.9404837 1.190326e-01 5.951630e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1rjf51321994336.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/wessaorg/rcomp/tmp/2huwp1321994336.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/wessaorg/rcomp/tmp/3e8pq1321994336.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/wessaorg/rcomp/tmp/4pxf91321994336.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/wessaorg/rcomp/tmp/5rc7b1321994336.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 = 164 Frequency = 1 1 2 3 4 5 6 -41060.0658 -67623.9238 -7011.8226 -31697.6790 -12159.6453 -55085.3578 7 8 9 10 11 12 115990.3182 -19119.9829 -2580.9146 9703.1439 13749.3689 1971.1094 13 14 15 16 17 18 -2835.2865 8997.6175 15733.3571 69839.6142 -25924.8451 65374.5188 19 20 21 22 23 24 -74456.4315 -16824.1069 198.1231 128164.8990 -879.9070 -55824.3179 25 26 27 28 29 30 -25288.2370 10502.2176 14575.6522 10916.4622 14933.0423 36330.3122 31 32 33 34 35 36 19459.1855 -16680.3003 58545.4437 7344.3671 30504.6101 55232.6340 37 38 39 40 41 42 122277.3189 -4895.7878 -3686.1753 52095.8733 78562.1328 4616.3818 43 44 45 46 47 48 20559.6559 -16570.9022 -2699.6740 179039.2308 5849.5098 -12033.7590 49 50 51 52 53 54 20470.0249 -36865.3276 -19035.1774 -53223.9472 63739.6297 -7739.4367 55 56 57 58 59 60 12641.1349 11565.3371 868.8472 -107106.5849 -3070.8579 32491.2757 61 62 63 64 65 66 58407.3420 -27909.8905 40313.4999 36780.7485 -8588.9365 -11599.0041 67 68 69 70 71 72 -45369.7721 188.5952 -36814.6491 -44436.0465 -5505.1671 -1339.5121 73 74 75 76 77 78 9300.1296 -10014.4894 -55260.1296 33130.5684 31391.4577 -52644.3617 79 80 81 82 83 84 -38348.0905 3021.9624 6592.7499 120964.3823 50369.5454 -44809.8281 85 86 87 88 89 90 -40725.2281 36494.7649 -53577.7418 109581.5424 72718.2904 -85305.3287 91 92 93 94 95 96 32795.8683 -63952.4284 19641.4326 -124.7386 23199.2587 -14168.3095 97 98 99 100 101 102 -87481.6394 -42733.1963 41323.7692 -43338.5177 28708.6947 -42496.1510 103 104 105 106 107 108 29371.5594 -63838.4311 3432.3227 -86847.0706 4464.6651 21960.2071 109 110 111 112 113 114 -71932.8492 -20828.1496 33277.9037 -10460.1814 -27195.7653 -24953.5582 115 116 117 118 119 120 -15644.3492 -14152.9086 48660.9318 -21431.7257 27664.7261 -53738.7381 121 122 123 124 125 126 47148.6625 -5026.4914 -8120.5216 -39153.3422 -20176.4447 -23318.4705 127 128 129 130 131 132 18905.9425 -48834.3317 67431.5659 3786.7317 3430.7856 -714.5113 133 134 135 136 137 138 -7135.6011 48817.2618 74050.8604 -13956.9016 54651.3085 -12935.3123 139 140 141 142 143 144 3085.4771 -21157.1403 -4537.8571 85701.2125 -85801.5893 105171.5017 145 146 147 148 149 150 45101.0446 -32600.5364 -21820.5141 -57005.5042 -37859.5043 -30829.4132 151 152 153 154 155 156 -37761.5043 -37404.5043 -37859.5043 -37859.5043 -2130.7913 16289.2381 157 158 159 160 161 162 -37859.5043 -37656.5043 -37736.6604 -7521.6831 -25025.4141 7550.3967 163 164 -36890.5043 -1483.8534 > postscript(file="/var/wessaorg/rcomp/tmp/6obi61321994336.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 = 164 Frequency = 1 lag(myerror, k = 1) myerror 0 -41060.0658 NA 1 -67623.9238 -41060.0658 2 -7011.8226 -67623.9238 3 -31697.6790 -7011.8226 4 -12159.6453 -31697.6790 5 -55085.3578 -12159.6453 6 115990.3182 -55085.3578 7 -19119.9829 115990.3182 8 -2580.9146 -19119.9829 9 9703.1439 -2580.9146 10 13749.3689 9703.1439 11 1971.1094 13749.3689 12 -2835.2865 1971.1094 13 8997.6175 -2835.2865 14 15733.3571 8997.6175 15 69839.6142 15733.3571 16 -25924.8451 69839.6142 17 65374.5188 -25924.8451 18 -74456.4315 65374.5188 19 -16824.1069 -74456.4315 20 198.1231 -16824.1069 21 128164.8990 198.1231 22 -879.9070 128164.8990 23 -55824.3179 -879.9070 24 -25288.2370 -55824.3179 25 10502.2176 -25288.2370 26 14575.6522 10502.2176 27 10916.4622 14575.6522 28 14933.0423 10916.4622 29 36330.3122 14933.0423 30 19459.1855 36330.3122 31 -16680.3003 19459.1855 32 58545.4437 -16680.3003 33 7344.3671 58545.4437 34 30504.6101 7344.3671 35 55232.6340 30504.6101 36 122277.3189 55232.6340 37 -4895.7878 122277.3189 38 -3686.1753 -4895.7878 39 52095.8733 -3686.1753 40 78562.1328 52095.8733 41 4616.3818 78562.1328 42 20559.6559 4616.3818 43 -16570.9022 20559.6559 44 -2699.6740 -16570.9022 45 179039.2308 -2699.6740 46 5849.5098 179039.2308 47 -12033.7590 5849.5098 48 20470.0249 -12033.7590 49 -36865.3276 20470.0249 50 -19035.1774 -36865.3276 51 -53223.9472 -19035.1774 52 63739.6297 -53223.9472 53 -7739.4367 63739.6297 54 12641.1349 -7739.4367 55 11565.3371 12641.1349 56 868.8472 11565.3371 57 -107106.5849 868.8472 58 -3070.8579 -107106.5849 59 32491.2757 -3070.8579 60 58407.3420 32491.2757 61 -27909.8905 58407.3420 62 40313.4999 -27909.8905 63 36780.7485 40313.4999 64 -8588.9365 36780.7485 65 -11599.0041 -8588.9365 66 -45369.7721 -11599.0041 67 188.5952 -45369.7721 68 -36814.6491 188.5952 69 -44436.0465 -36814.6491 70 -5505.1671 -44436.0465 71 -1339.5121 -5505.1671 72 9300.1296 -1339.5121 73 -10014.4894 9300.1296 74 -55260.1296 -10014.4894 75 33130.5684 -55260.1296 76 31391.4577 33130.5684 77 -52644.3617 31391.4577 78 -38348.0905 -52644.3617 79 3021.9624 -38348.0905 80 6592.7499 3021.9624 81 120964.3823 6592.7499 82 50369.5454 120964.3823 83 -44809.8281 50369.5454 84 -40725.2281 -44809.8281 85 36494.7649 -40725.2281 86 -53577.7418 36494.7649 87 109581.5424 -53577.7418 88 72718.2904 109581.5424 89 -85305.3287 72718.2904 90 32795.8683 -85305.3287 91 -63952.4284 32795.8683 92 19641.4326 -63952.4284 93 -124.7386 19641.4326 94 23199.2587 -124.7386 95 -14168.3095 23199.2587 96 -87481.6394 -14168.3095 97 -42733.1963 -87481.6394 98 41323.7692 -42733.1963 99 -43338.5177 41323.7692 100 28708.6947 -43338.5177 101 -42496.1510 28708.6947 102 29371.5594 -42496.1510 103 -63838.4311 29371.5594 104 3432.3227 -63838.4311 105 -86847.0706 3432.3227 106 4464.6651 -86847.0706 107 21960.2071 4464.6651 108 -71932.8492 21960.2071 109 -20828.1496 -71932.8492 110 33277.9037 -20828.1496 111 -10460.1814 33277.9037 112 -27195.7653 -10460.1814 113 -24953.5582 -27195.7653 114 -15644.3492 -24953.5582 115 -14152.9086 -15644.3492 116 48660.9318 -14152.9086 117 -21431.7257 48660.9318 118 27664.7261 -21431.7257 119 -53738.7381 27664.7261 120 47148.6625 -53738.7381 121 -5026.4914 47148.6625 122 -8120.5216 -5026.4914 123 -39153.3422 -8120.5216 124 -20176.4447 -39153.3422 125 -23318.4705 -20176.4447 126 18905.9425 -23318.4705 127 -48834.3317 18905.9425 128 67431.5659 -48834.3317 129 3786.7317 67431.5659 130 3430.7856 3786.7317 131 -714.5113 3430.7856 132 -7135.6011 -714.5113 133 48817.2618 -7135.6011 134 74050.8604 48817.2618 135 -13956.9016 74050.8604 136 54651.3085 -13956.9016 137 -12935.3123 54651.3085 138 3085.4771 -12935.3123 139 -21157.1403 3085.4771 140 -4537.8571 -21157.1403 141 85701.2125 -4537.8571 142 -85801.5893 85701.2125 143 105171.5017 -85801.5893 144 45101.0446 105171.5017 145 -32600.5364 45101.0446 146 -21820.5141 -32600.5364 147 -57005.5042 -21820.5141 148 -37859.5043 -57005.5042 149 -30829.4132 -37859.5043 150 -37761.5043 -30829.4132 151 -37404.5043 -37761.5043 152 -37859.5043 -37404.5043 153 -37859.5043 -37859.5043 154 -2130.7913 -37859.5043 155 16289.2381 -2130.7913 156 -37859.5043 16289.2381 157 -37656.5043 -37859.5043 158 -37736.6604 -37656.5043 159 -7521.6831 -37736.6604 160 -25025.4141 -7521.6831 161 7550.3967 -25025.4141 162 -36890.5043 7550.3967 163 -1483.8534 -36890.5043 164 NA -1483.8534 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -67623.9238 -41060.0658 [2,] -7011.8226 -67623.9238 [3,] -31697.6790 -7011.8226 [4,] -12159.6453 -31697.6790 [5,] -55085.3578 -12159.6453 [6,] 115990.3182 -55085.3578 [7,] -19119.9829 115990.3182 [8,] -2580.9146 -19119.9829 [9,] 9703.1439 -2580.9146 [10,] 13749.3689 9703.1439 [11,] 1971.1094 13749.3689 [12,] -2835.2865 1971.1094 [13,] 8997.6175 -2835.2865 [14,] 15733.3571 8997.6175 [15,] 69839.6142 15733.3571 [16,] -25924.8451 69839.6142 [17,] 65374.5188 -25924.8451 [18,] -74456.4315 65374.5188 [19,] -16824.1069 -74456.4315 [20,] 198.1231 -16824.1069 [21,] 128164.8990 198.1231 [22,] -879.9070 128164.8990 [23,] -55824.3179 -879.9070 [24,] -25288.2370 -55824.3179 [25,] 10502.2176 -25288.2370 [26,] 14575.6522 10502.2176 [27,] 10916.4622 14575.6522 [28,] 14933.0423 10916.4622 [29,] 36330.3122 14933.0423 [30,] 19459.1855 36330.3122 [31,] -16680.3003 19459.1855 [32,] 58545.4437 -16680.3003 [33,] 7344.3671 58545.4437 [34,] 30504.6101 7344.3671 [35,] 55232.6340 30504.6101 [36,] 122277.3189 55232.6340 [37,] -4895.7878 122277.3189 [38,] -3686.1753 -4895.7878 [39,] 52095.8733 -3686.1753 [40,] 78562.1328 52095.8733 [41,] 4616.3818 78562.1328 [42,] 20559.6559 4616.3818 [43,] -16570.9022 20559.6559 [44,] -2699.6740 -16570.9022 [45,] 179039.2308 -2699.6740 [46,] 5849.5098 179039.2308 [47,] -12033.7590 5849.5098 [48,] 20470.0249 -12033.7590 [49,] -36865.3276 20470.0249 [50,] -19035.1774 -36865.3276 [51,] -53223.9472 -19035.1774 [52,] 63739.6297 -53223.9472 [53,] -7739.4367 63739.6297 [54,] 12641.1349 -7739.4367 [55,] 11565.3371 12641.1349 [56,] 868.8472 11565.3371 [57,] -107106.5849 868.8472 [58,] -3070.8579 -107106.5849 [59,] 32491.2757 -3070.8579 [60,] 58407.3420 32491.2757 [61,] -27909.8905 58407.3420 [62,] 40313.4999 -27909.8905 [63,] 36780.7485 40313.4999 [64,] -8588.9365 36780.7485 [65,] -11599.0041 -8588.9365 [66,] -45369.7721 -11599.0041 [67,] 188.5952 -45369.7721 [68,] -36814.6491 188.5952 [69,] -44436.0465 -36814.6491 [70,] -5505.1671 -44436.0465 [71,] -1339.5121 -5505.1671 [72,] 9300.1296 -1339.5121 [73,] -10014.4894 9300.1296 [74,] -55260.1296 -10014.4894 [75,] 33130.5684 -55260.1296 [76,] 31391.4577 33130.5684 [77,] -52644.3617 31391.4577 [78,] -38348.0905 -52644.3617 [79,] 3021.9624 -38348.0905 [80,] 6592.7499 3021.9624 [81,] 120964.3823 6592.7499 [82,] 50369.5454 120964.3823 [83,] -44809.8281 50369.5454 [84,] -40725.2281 -44809.8281 [85,] 36494.7649 -40725.2281 [86,] -53577.7418 36494.7649 [87,] 109581.5424 -53577.7418 [88,] 72718.2904 109581.5424 [89,] -85305.3287 72718.2904 [90,] 32795.8683 -85305.3287 [91,] -63952.4284 32795.8683 [92,] 19641.4326 -63952.4284 [93,] -124.7386 19641.4326 [94,] 23199.2587 -124.7386 [95,] -14168.3095 23199.2587 [96,] -87481.6394 -14168.3095 [97,] -42733.1963 -87481.6394 [98,] 41323.7692 -42733.1963 [99,] -43338.5177 41323.7692 [100,] 28708.6947 -43338.5177 [101,] -42496.1510 28708.6947 [102,] 29371.5594 -42496.1510 [103,] -63838.4311 29371.5594 [104,] 3432.3227 -63838.4311 [105,] -86847.0706 3432.3227 [106,] 4464.6651 -86847.0706 [107,] 21960.2071 4464.6651 [108,] -71932.8492 21960.2071 [109,] -20828.1496 -71932.8492 [110,] 33277.9037 -20828.1496 [111,] -10460.1814 33277.9037 [112,] -27195.7653 -10460.1814 [113,] -24953.5582 -27195.7653 [114,] -15644.3492 -24953.5582 [115,] -14152.9086 -15644.3492 [116,] 48660.9318 -14152.9086 [117,] -21431.7257 48660.9318 [118,] 27664.7261 -21431.7257 [119,] -53738.7381 27664.7261 [120,] 47148.6625 -53738.7381 [121,] -5026.4914 47148.6625 [122,] -8120.5216 -5026.4914 [123,] -39153.3422 -8120.5216 [124,] -20176.4447 -39153.3422 [125,] -23318.4705 -20176.4447 [126,] 18905.9425 -23318.4705 [127,] -48834.3317 18905.9425 [128,] 67431.5659 -48834.3317 [129,] 3786.7317 67431.5659 [130,] 3430.7856 3786.7317 [131,] -714.5113 3430.7856 [132,] -7135.6011 -714.5113 [133,] 48817.2618 -7135.6011 [134,] 74050.8604 48817.2618 [135,] -13956.9016 74050.8604 [136,] 54651.3085 -13956.9016 [137,] -12935.3123 54651.3085 [138,] 3085.4771 -12935.3123 [139,] -21157.1403 3085.4771 [140,] -4537.8571 -21157.1403 [141,] 85701.2125 -4537.8571 [142,] -85801.5893 85701.2125 [143,] 105171.5017 -85801.5893 [144,] 45101.0446 105171.5017 [145,] -32600.5364 45101.0446 [146,] -21820.5141 -32600.5364 [147,] -57005.5042 -21820.5141 [148,] -37859.5043 -57005.5042 [149,] -30829.4132 -37859.5043 [150,] -37761.5043 -30829.4132 [151,] -37404.5043 -37761.5043 [152,] -37859.5043 -37404.5043 [153,] -37859.5043 -37859.5043 [154,] -2130.7913 -37859.5043 [155,] 16289.2381 -2130.7913 [156,] -37859.5043 16289.2381 [157,] -37656.5043 -37859.5043 [158,] -37736.6604 -37656.5043 [159,] -7521.6831 -37736.6604 [160,] -25025.4141 -7521.6831 [161,] 7550.3967 -25025.4141 [162,] -36890.5043 7550.3967 [163,] -1483.8534 -36890.5043 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -67623.9238 -41060.0658 2 -7011.8226 -67623.9238 3 -31697.6790 -7011.8226 4 -12159.6453 -31697.6790 5 -55085.3578 -12159.6453 6 115990.3182 -55085.3578 7 -19119.9829 115990.3182 8 -2580.9146 -19119.9829 9 9703.1439 -2580.9146 10 13749.3689 9703.1439 11 1971.1094 13749.3689 12 -2835.2865 1971.1094 13 8997.6175 -2835.2865 14 15733.3571 8997.6175 15 69839.6142 15733.3571 16 -25924.8451 69839.6142 17 65374.5188 -25924.8451 18 -74456.4315 65374.5188 19 -16824.1069 -74456.4315 20 198.1231 -16824.1069 21 128164.8990 198.1231 22 -879.9070 128164.8990 23 -55824.3179 -879.9070 24 -25288.2370 -55824.3179 25 10502.2176 -25288.2370 26 14575.6522 10502.2176 27 10916.4622 14575.6522 28 14933.0423 10916.4622 29 36330.3122 14933.0423 30 19459.1855 36330.3122 31 -16680.3003 19459.1855 32 58545.4437 -16680.3003 33 7344.3671 58545.4437 34 30504.6101 7344.3671 35 55232.6340 30504.6101 36 122277.3189 55232.6340 37 -4895.7878 122277.3189 38 -3686.1753 -4895.7878 39 52095.8733 -3686.1753 40 78562.1328 52095.8733 41 4616.3818 78562.1328 42 20559.6559 4616.3818 43 -16570.9022 20559.6559 44 -2699.6740 -16570.9022 45 179039.2308 -2699.6740 46 5849.5098 179039.2308 47 -12033.7590 5849.5098 48 20470.0249 -12033.7590 49 -36865.3276 20470.0249 50 -19035.1774 -36865.3276 51 -53223.9472 -19035.1774 52 63739.6297 -53223.9472 53 -7739.4367 63739.6297 54 12641.1349 -7739.4367 55 11565.3371 12641.1349 56 868.8472 11565.3371 57 -107106.5849 868.8472 58 -3070.8579 -107106.5849 59 32491.2757 -3070.8579 60 58407.3420 32491.2757 61 -27909.8905 58407.3420 62 40313.4999 -27909.8905 63 36780.7485 40313.4999 64 -8588.9365 36780.7485 65 -11599.0041 -8588.9365 66 -45369.7721 -11599.0041 67 188.5952 -45369.7721 68 -36814.6491 188.5952 69 -44436.0465 -36814.6491 70 -5505.1671 -44436.0465 71 -1339.5121 -5505.1671 72 9300.1296 -1339.5121 73 -10014.4894 9300.1296 74 -55260.1296 -10014.4894 75 33130.5684 -55260.1296 76 31391.4577 33130.5684 77 -52644.3617 31391.4577 78 -38348.0905 -52644.3617 79 3021.9624 -38348.0905 80 6592.7499 3021.9624 81 120964.3823 6592.7499 82 50369.5454 120964.3823 83 -44809.8281 50369.5454 84 -40725.2281 -44809.8281 85 36494.7649 -40725.2281 86 -53577.7418 36494.7649 87 109581.5424 -53577.7418 88 72718.2904 109581.5424 89 -85305.3287 72718.2904 90 32795.8683 -85305.3287 91 -63952.4284 32795.8683 92 19641.4326 -63952.4284 93 -124.7386 19641.4326 94 23199.2587 -124.7386 95 -14168.3095 23199.2587 96 -87481.6394 -14168.3095 97 -42733.1963 -87481.6394 98 41323.7692 -42733.1963 99 -43338.5177 41323.7692 100 28708.6947 -43338.5177 101 -42496.1510 28708.6947 102 29371.5594 -42496.1510 103 -63838.4311 29371.5594 104 3432.3227 -63838.4311 105 -86847.0706 3432.3227 106 4464.6651 -86847.0706 107 21960.2071 4464.6651 108 -71932.8492 21960.2071 109 -20828.1496 -71932.8492 110 33277.9037 -20828.1496 111 -10460.1814 33277.9037 112 -27195.7653 -10460.1814 113 -24953.5582 -27195.7653 114 -15644.3492 -24953.5582 115 -14152.9086 -15644.3492 116 48660.9318 -14152.9086 117 -21431.7257 48660.9318 118 27664.7261 -21431.7257 119 -53738.7381 27664.7261 120 47148.6625 -53738.7381 121 -5026.4914 47148.6625 122 -8120.5216 -5026.4914 123 -39153.3422 -8120.5216 124 -20176.4447 -39153.3422 125 -23318.4705 -20176.4447 126 18905.9425 -23318.4705 127 -48834.3317 18905.9425 128 67431.5659 -48834.3317 129 3786.7317 67431.5659 130 3430.7856 3786.7317 131 -714.5113 3430.7856 132 -7135.6011 -714.5113 133 48817.2618 -7135.6011 134 74050.8604 48817.2618 135 -13956.9016 74050.8604 136 54651.3085 -13956.9016 137 -12935.3123 54651.3085 138 3085.4771 -12935.3123 139 -21157.1403 3085.4771 140 -4537.8571 -21157.1403 141 85701.2125 -4537.8571 142 -85801.5893 85701.2125 143 105171.5017 -85801.5893 144 45101.0446 105171.5017 145 -32600.5364 45101.0446 146 -21820.5141 -32600.5364 147 -57005.5042 -21820.5141 148 -37859.5043 -57005.5042 149 -30829.4132 -37859.5043 150 -37761.5043 -30829.4132 151 -37404.5043 -37761.5043 152 -37859.5043 -37404.5043 153 -37859.5043 -37859.5043 154 -2130.7913 -37859.5043 155 16289.2381 -2130.7913 156 -37859.5043 16289.2381 157 -37656.5043 -37859.5043 158 -37736.6604 -37656.5043 159 -7521.6831 -37736.6604 160 -25025.4141 -7521.6831 161 7550.3967 -25025.4141 162 -36890.5043 7550.3967 163 -1483.8534 -36890.5043 > 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/wessaorg/rcomp/tmp/7ohau1321994336.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/wessaorg/rcomp/tmp/8hn091321994336.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/wessaorg/rcomp/tmp/97fep1321994336.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/wessaorg/rcomp/tmp/109aeo1321994336.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11i4e81321994336.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/wessaorg/rcomp/tmp/121uit1321994337.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/wessaorg/rcomp/tmp/136p4u1321994337.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/wessaorg/rcomp/tmp/141n1p1321994337.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/wessaorg/rcomp/tmp/154cjl1321994337.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/wessaorg/rcomp/tmp/160ju71321994337.tab") + } > > try(system("convert tmp/1rjf51321994336.ps tmp/1rjf51321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/2huwp1321994336.ps tmp/2huwp1321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/3e8pq1321994336.ps tmp/3e8pq1321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/4pxf91321994336.ps tmp/4pxf91321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/5rc7b1321994336.ps tmp/5rc7b1321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/6obi61321994336.ps tmp/6obi61321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/7ohau1321994336.ps tmp/7ohau1321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/8hn091321994336.ps tmp/8hn091321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/97fep1321994336.ps tmp/97fep1321994336.png",intern=TRUE)) character(0) > try(system("convert tmp/109aeo1321994336.ps tmp/109aeo1321994336.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.655 0.502 5.219