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(170650 + ,95556 + ,128 + ,86621 + ,54565 + ,89 + ,127843 + ,63016 + ,68 + ,152526 + ,79774 + ,108 + ,92389 + ,31258 + ,51 + ,38138 + ,52491 + ,33 + ,316392 + ,91256 + ,119 + ,32750 + ,22807 + ,5 + ,1323444 + ,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 1323444 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 4.279e+04 6.785e-01 8.679e+02 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -118553 -37908 -11355 14708 1173451 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.279e+04 1.768e+04 2.421 0.0166 * Karakters 6.785e-01 3.358e-01 2.021 0.0450 * Blogs 8.679e+02 2.611e+02 3.324 0.0011 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 103900 on 161 degrees of freedom Multiple R-squared: 0.2221, Adjusted R-squared: 0.2125 F-statistic: 22.99 on 2 and 161 DF, p-value: 1.652e-09 > 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.03063666 6.127332e-02 9.693633e-01 [2,] 0.21334470 4.266894e-01 7.866553e-01 [3,] 0.12345810 2.469162e-01 8.765419e-01 [4,] 1.00000000 9.779955e-39 4.889977e-39 [5,] 1.00000000 5.177864e-38 2.588932e-38 [6,] 1.00000000 1.511294e-39 7.556472e-40 [7,] 1.00000000 2.336786e-39 1.168393e-39 [8,] 1.00000000 9.922993e-39 4.961497e-39 [9,] 1.00000000 7.719170e-39 3.859585e-39 [10,] 1.00000000 9.512138e-39 4.756069e-39 [11,] 1.00000000 1.285570e-38 6.427852e-39 [12,] 1.00000000 3.649144e-40 1.824572e-40 [13,] 1.00000000 4.640189e-40 2.320094e-40 [14,] 1.00000000 3.810875e-40 1.905438e-40 [15,] 1.00000000 1.840740e-39 9.203701e-40 [16,] 1.00000000 5.412876e-39 2.706438e-39 [17,] 1.00000000 1.937227e-40 9.686135e-41 [18,] 1.00000000 9.791752e-40 4.895876e-40 [19,] 1.00000000 2.215548e-39 1.107774e-39 [20,] 1.00000000 8.731858e-39 4.365929e-39 [21,] 1.00000000 4.410813e-38 2.205407e-38 [22,] 1.00000000 1.941174e-37 9.705872e-38 [23,] 1.00000000 7.994769e-37 3.997384e-37 [24,] 1.00000000 3.476933e-36 1.738466e-36 [25,] 1.00000000 9.912117e-36 4.956059e-36 [26,] 1.00000000 1.194852e-35 5.974262e-36 [27,] 1.00000000 5.326575e-35 2.663287e-35 [28,] 1.00000000 1.192290e-34 5.961452e-35 [29,] 1.00000000 3.090743e-34 1.545371e-34 [30,] 1.00000000 1.064211e-33 5.321053e-34 [31,] 1.00000000 2.335253e-33 1.167627e-33 [32,] 1.00000000 4.441749e-34 2.220875e-34 [33,] 1.00000000 1.935651e-33 9.678257e-34 [34,] 1.00000000 8.101902e-33 4.050951e-33 [35,] 1.00000000 1.811961e-32 9.059806e-33 [36,] 1.00000000 1.751252e-32 8.756258e-33 [37,] 1.00000000 7.144328e-32 3.572164e-32 [38,] 1.00000000 2.328215e-31 1.164107e-31 [39,] 1.00000000 8.303941e-31 4.151970e-31 [40,] 1.00000000 2.127570e-30 1.063785e-30 [41,] 1.00000000 9.621386e-33 4.810693e-33 [42,] 1.00000000 3.494321e-32 1.747161e-32 [43,] 1.00000000 1.414893e-31 7.074464e-32 [44,] 1.00000000 2.439621e-31 1.219811e-31 [45,] 1.00000000 7.904991e-31 3.952495e-31 [46,] 1.00000000 2.934667e-30 1.467333e-30 [47,] 1.00000000 6.650438e-31 3.325219e-31 [48,] 1.00000000 8.361542e-31 4.180771e-31 [49,] 1.00000000 3.112971e-30 1.556485e-30 [50,] 1.00000000 1.143773e-29 5.718865e-30 [51,] 1.00000000 3.973880e-29 1.986940e-29 [52,] 1.00000000 1.142284e-28 5.711422e-29 [53,] 1.00000000 4.763521e-29 2.381761e-29 [54,] 1.00000000 1.801400e-28 9.006998e-29 [55,] 1.00000000 4.878812e-28 2.439406e-28 [56,] 1.00000000 6.890596e-28 3.445298e-28 [57,] 1.00000000 1.896157e-27 9.480783e-28 [58,] 1.00000000 4.298275e-27 2.149138e-27 [59,] 1.00000000 1.023889e-26 5.119446e-27 [60,] 1.00000000 3.426915e-26 1.713458e-26 [61,] 1.00000000 1.207630e-25 6.038152e-26 [62,] 1.00000000 2.212486e-25 1.106243e-25 [63,] 1.00000000 7.600762e-25 3.800381e-25 [64,] 1.00000000 2.077305e-24 1.038652e-24 [65,] 1.00000000 4.570975e-24 2.285488e-24 [66,] 1.00000000 1.511288e-23 7.556441e-24 [67,] 1.00000000 4.992772e-23 2.496386e-23 [68,] 1.00000000 1.550409e-22 7.752046e-23 [69,] 1.00000000 4.927089e-22 2.463545e-22 [70,] 1.00000000 8.984446e-22 4.492223e-22 [71,] 1.00000000 2.151300e-21 1.075650e-21 [72,] 1.00000000 5.204067e-21 2.602033e-21 [73,] 1.00000000 3.130244e-21 1.565122e-21 [74,] 1.00000000 7.713779e-21 3.856890e-21 [75,] 1.00000000 2.387395e-20 1.193698e-20 [76,] 1.00000000 7.196986e-20 3.598493e-20 [77,] 1.00000000 6.636760e-21 3.318380e-21 [78,] 1.00000000 1.054112e-20 5.270562e-21 [79,] 1.00000000 2.438112e-20 1.219056e-20 [80,] 1.00000000 5.518838e-20 2.759419e-20 [81,] 1.00000000 1.145426e-19 5.727130e-20 [82,] 1.00000000 2.003921e-19 1.001960e-19 [83,] 1.00000000 2.642879e-20 1.321439e-20 [84,] 1.00000000 1.620812e-20 8.104059e-21 [85,] 1.00000000 9.101647e-21 4.550823e-21 [86,] 1.00000000 1.892643e-20 9.463216e-21 [87,] 1.00000000 2.378043e-20 1.189021e-20 [88,] 1.00000000 6.352920e-20 3.176460e-20 [89,] 1.00000000 2.081664e-19 1.040832e-19 [90,] 1.00000000 5.418551e-19 2.709276e-19 [91,] 1.00000000 1.690606e-18 8.453028e-19 [92,] 1.00000000 6.345604e-19 3.172802e-19 [93,] 1.00000000 1.115539e-18 5.577695e-19 [94,] 1.00000000 2.157235e-18 1.078617e-18 [95,] 1.00000000 3.121395e-18 1.560698e-18 [96,] 1.00000000 7.431273e-18 3.715636e-18 [97,] 1.00000000 1.177621e-17 5.888104e-18 [98,] 1.00000000 2.207504e-17 1.103752e-17 [99,] 1.00000000 2.814744e-17 1.407372e-17 [100,] 1.00000000 8.966836e-17 4.483418e-17 [101,] 1.00000000 1.426192e-17 7.130959e-18 [102,] 1.00000000 4.820106e-17 2.410053e-17 [103,] 1.00000000 1.476336e-16 7.381678e-17 [104,] 1.00000000 5.336854e-17 2.668427e-17 [105,] 1.00000000 1.660507e-16 8.302533e-17 [106,] 1.00000000 4.597362e-16 2.298681e-16 [107,] 1.00000000 1.498022e-15 7.490109e-16 [108,] 1.00000000 4.684028e-15 2.342014e-15 [109,] 1.00000000 1.274760e-14 6.373801e-15 [110,] 1.00000000 4.030018e-14 2.015009e-14 [111,] 1.00000000 1.274358e-13 6.371789e-14 [112,] 1.00000000 2.180284e-13 1.090142e-13 [113,] 1.00000000 6.648197e-13 3.324099e-13 [114,] 1.00000000 1.816079e-12 9.080394e-13 [115,] 1.00000000 3.559430e-12 1.779715e-12 [116,] 1.00000000 5.485475e-12 2.742738e-12 [117,] 1.00000000 1.603263e-11 8.016317e-12 [118,] 1.00000000 4.728728e-11 2.364364e-11 [119,] 1.00000000 9.171645e-11 4.585822e-11 [120,] 1.00000000 2.670084e-10 1.335042e-10 [121,] 1.00000000 6.541652e-10 3.270826e-10 [122,] 1.00000000 1.718961e-09 8.594807e-10 [123,] 1.00000000 2.400835e-09 1.200418e-09 [124,] 1.00000000 2.304935e-09 1.152467e-09 [125,] 1.00000000 6.714269e-09 3.357134e-09 [126,] 0.99999999 1.313223e-08 6.566115e-09 [127,] 0.99999998 3.734845e-08 1.867422e-08 [128,] 0.99999995 1.035904e-07 5.179522e-08 [129,] 0.99999991 1.814704e-07 9.073522e-08 [130,] 0.99999992 1.513588e-07 7.567938e-08 [131,] 0.99999982 3.546889e-07 1.773444e-07 [132,] 0.99999970 5.940813e-07 2.970406e-07 [133,] 0.99999918 1.643252e-06 8.216258e-07 [134,] 0.99999791 4.181163e-06 2.090582e-06 [135,] 0.99999448 1.103817e-05 5.519087e-06 [136,] 0.99998576 2.847421e-05 1.423711e-05 [137,] 0.99999599 8.011007e-06 4.005504e-06 [138,] 0.99999714 5.712693e-06 2.856347e-06 [139,] 1.00000000 3.981293e-09 1.990646e-09 [140,] 1.00000000 5.816835e-10 2.908418e-10 [141,] 1.00000000 3.294852e-09 1.647426e-09 [142,] 0.99999999 1.389382e-08 6.946912e-09 [143,] 1.00000000 8.529110e-12 4.264555e-12 [144,] 1.00000000 8.701486e-11 4.350743e-11 [145,] 1.00000000 9.089790e-10 4.544895e-10 [146,] 1.00000000 8.574771e-09 4.287386e-09 [147,] 0.99999996 7.795041e-08 3.897520e-08 [148,] 0.99999967 6.587049e-07 3.293524e-07 [149,] 0.99999740 5.209096e-06 2.604548e-06 [150,] 0.99998401 3.197481e-05 1.598741e-05 [151,] 0.99986558 2.688356e-04 1.344178e-04 [152,] 0.99907895 1.842091e-03 9.210456e-04 [153,] 0.99432409 1.135182e-02 5.675910e-03 > postscript(file="/var/www/rcomp/tmp/16ikp1321989110.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/2r44c1321989110.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/3ycid1321989110.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/4lkgp1321989110.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/546ci1321989110.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 -48070.15807 -70436.28016 -16722.31892 -38127.05755 -15872.62176 6 7 8 9 10 -68908.51554 108400.83610 -29852.99949 1173450.69438 3836.39388 11 12 13 14 15 13487.73310 -7189.99722 -11480.69361 9283.55891 14020.39978 16 17 18 19 20 68590.59483 -37304.56539 53676.18409 -80943.42215 -22664.38258 21 22 23 24 25 -9037.71805 127294.35942 -8226.48567 -61216.91606 -24915.47212 26 27 28 29 30 4556.74548 7112.52059 9448.32399 11464.41082 34745.45688 31 32 33 34 35 4404.67404 -18610.31032 53741.54917 -5566.92307 28464.24421 36 37 38 39 40 50821.03619 115658.63305 -8315.72902 -9652.41594 47576.12650 41 42 43 44 45 74143.81273 772.87364 11325.24756 -23319.98144 -15403.64649 46 47 48 49 50 161302.29134 -4627.77691 -13872.16416 5898.86765 -37835.38464 51 52 53 54 55 -22828.19496 -82084.60627 59183.85239 -18072.39920 5471.49156 56 57 58 59 60 5017.04915 -13407.74281 -98496.42526 -3160.79989 22007.36096 61 62 63 64 65 45047.09351 -37050.15391 34876.63507 27459.40766 -17562.12467 66 67 68 69 70 -12527.53547 -59149.86576 -4877.83355 -37608.59128 -51533.91030 71 72 73 74 75 -12643.13359 -7861.13858 551.69627 -16175.10738 -56719.46715 76 77 78 79 80 26845.72229 24305.17224 -108306.54981 -39943.33616 -3409.68070 81 82 83 84 85 -72.81613 114914.17066 41392.49814 -44044.00945 -50594.54296 86 87 88 89 90 32545.36822 -62831.47459 96101.52350 64305.42964 -95368.72573 91 92 93 94 95 31204.84285 -62813.56269 14097.24897 -1859.41096 14320.38314 96 97 98 99 100 -28240.44646 -100541.15771 -53713.87165 31422.21795 -43167.76237 101 102 103 104 105 8865.70441 -48402.17187 21002.62220 -71715.10441 2278.96170 106 107 108 109 110 -81600.52074 -4787.46575 15872.29076 -118552.62383 -28155.33643 111 112 113 114 115 17886.54461 -10236.53661 -30189.58861 -27219.72133 -22306.10166 116 117 118 119 120 -11484.32771 57419.76677 -25785.77151 11710.17994 -54801.06018 121 122 123 124 125 42999.08345 -24490.32217 -26918.30566 -51301.43769 -24413.48066 126 127 128 129 130 -37206.65216 16850.69773 -52426.33758 63560.91494 -855.86178 131 132 133 134 135 -18016.55033 -7024.74295 -16515.61114 39055.24861 69548.08304 136 137 138 139 140 -36423.38888 41925.96896 -18436.29607 710.98603 -17324.58938 141 142 143 144 145 -16791.75164 78012.53496 -83032.56477 92185.79903 41339.92175 146 147 148 149 150 -51040.78163 -38328.76705 -64002.51296 -42787.94323 -36526.38509 151 152 153 154 155 -42689.94323 -42332.94323 -42787.94323 -42787.94323 -3211.84990 156 157 158 159 160 25036.89397 -42787.94323 -42584.94323 -41911.97784 -11603.59058 161 162 163 164 -30508.64852 -611.39924 -41818.94323 -11229.93946 > postscript(file="/var/www/rcomp/tmp/6vmpu1321989110.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 -48070.15807 NA 1 -70436.28016 -48070.15807 2 -16722.31892 -70436.28016 3 -38127.05755 -16722.31892 4 -15872.62176 -38127.05755 5 -68908.51554 -15872.62176 6 108400.83610 -68908.51554 7 -29852.99949 108400.83610 8 1173450.69438 -29852.99949 9 3836.39388 1173450.69438 10 13487.73310 3836.39388 11 -7189.99722 13487.73310 12 -11480.69361 -7189.99722 13 9283.55891 -11480.69361 14 14020.39978 9283.55891 15 68590.59483 14020.39978 16 -37304.56539 68590.59483 17 53676.18409 -37304.56539 18 -80943.42215 53676.18409 19 -22664.38258 -80943.42215 20 -9037.71805 -22664.38258 21 127294.35942 -9037.71805 22 -8226.48567 127294.35942 23 -61216.91606 -8226.48567 24 -24915.47212 -61216.91606 25 4556.74548 -24915.47212 26 7112.52059 4556.74548 27 9448.32399 7112.52059 28 11464.41082 9448.32399 29 34745.45688 11464.41082 30 4404.67404 34745.45688 31 -18610.31032 4404.67404 32 53741.54917 -18610.31032 33 -5566.92307 53741.54917 34 28464.24421 -5566.92307 35 50821.03619 28464.24421 36 115658.63305 50821.03619 37 -8315.72902 115658.63305 38 -9652.41594 -8315.72902 39 47576.12650 -9652.41594 40 74143.81273 47576.12650 41 772.87364 74143.81273 42 11325.24756 772.87364 43 -23319.98144 11325.24756 44 -15403.64649 -23319.98144 45 161302.29134 -15403.64649 46 -4627.77691 161302.29134 47 -13872.16416 -4627.77691 48 5898.86765 -13872.16416 49 -37835.38464 5898.86765 50 -22828.19496 -37835.38464 51 -82084.60627 -22828.19496 52 59183.85239 -82084.60627 53 -18072.39920 59183.85239 54 5471.49156 -18072.39920 55 5017.04915 5471.49156 56 -13407.74281 5017.04915 57 -98496.42526 -13407.74281 58 -3160.79989 -98496.42526 59 22007.36096 -3160.79989 60 45047.09351 22007.36096 61 -37050.15391 45047.09351 62 34876.63507 -37050.15391 63 27459.40766 34876.63507 64 -17562.12467 27459.40766 65 -12527.53547 -17562.12467 66 -59149.86576 -12527.53547 67 -4877.83355 -59149.86576 68 -37608.59128 -4877.83355 69 -51533.91030 -37608.59128 70 -12643.13359 -51533.91030 71 -7861.13858 -12643.13359 72 551.69627 -7861.13858 73 -16175.10738 551.69627 74 -56719.46715 -16175.10738 75 26845.72229 -56719.46715 76 24305.17224 26845.72229 77 -108306.54981 24305.17224 78 -39943.33616 -108306.54981 79 -3409.68070 -39943.33616 80 -72.81613 -3409.68070 81 114914.17066 -72.81613 82 41392.49814 114914.17066 83 -44044.00945 41392.49814 84 -50594.54296 -44044.00945 85 32545.36822 -50594.54296 86 -62831.47459 32545.36822 87 96101.52350 -62831.47459 88 64305.42964 96101.52350 89 -95368.72573 64305.42964 90 31204.84285 -95368.72573 91 -62813.56269 31204.84285 92 14097.24897 -62813.56269 93 -1859.41096 14097.24897 94 14320.38314 -1859.41096 95 -28240.44646 14320.38314 96 -100541.15771 -28240.44646 97 -53713.87165 -100541.15771 98 31422.21795 -53713.87165 99 -43167.76237 31422.21795 100 8865.70441 -43167.76237 101 -48402.17187 8865.70441 102 21002.62220 -48402.17187 103 -71715.10441 21002.62220 104 2278.96170 -71715.10441 105 -81600.52074 2278.96170 106 -4787.46575 -81600.52074 107 15872.29076 -4787.46575 108 -118552.62383 15872.29076 109 -28155.33643 -118552.62383 110 17886.54461 -28155.33643 111 -10236.53661 17886.54461 112 -30189.58861 -10236.53661 113 -27219.72133 -30189.58861 114 -22306.10166 -27219.72133 115 -11484.32771 -22306.10166 116 57419.76677 -11484.32771 117 -25785.77151 57419.76677 118 11710.17994 -25785.77151 119 -54801.06018 11710.17994 120 42999.08345 -54801.06018 121 -24490.32217 42999.08345 122 -26918.30566 -24490.32217 123 -51301.43769 -26918.30566 124 -24413.48066 -51301.43769 125 -37206.65216 -24413.48066 126 16850.69773 -37206.65216 127 -52426.33758 16850.69773 128 63560.91494 -52426.33758 129 -855.86178 63560.91494 130 -18016.55033 -855.86178 131 -7024.74295 -18016.55033 132 -16515.61114 -7024.74295 133 39055.24861 -16515.61114 134 69548.08304 39055.24861 135 -36423.38888 69548.08304 136 41925.96896 -36423.38888 137 -18436.29607 41925.96896 138 710.98603 -18436.29607 139 -17324.58938 710.98603 140 -16791.75164 -17324.58938 141 78012.53496 -16791.75164 142 -83032.56477 78012.53496 143 92185.79903 -83032.56477 144 41339.92175 92185.79903 145 -51040.78163 41339.92175 146 -38328.76705 -51040.78163 147 -64002.51296 -38328.76705 148 -42787.94323 -64002.51296 149 -36526.38509 -42787.94323 150 -42689.94323 -36526.38509 151 -42332.94323 -42689.94323 152 -42787.94323 -42332.94323 153 -42787.94323 -42787.94323 154 -3211.84990 -42787.94323 155 25036.89397 -3211.84990 156 -42787.94323 25036.89397 157 -42584.94323 -42787.94323 158 -41911.97784 -42584.94323 159 -11603.59058 -41911.97784 160 -30508.64852 -11603.59058 161 -611.39924 -30508.64852 162 -41818.94323 -611.39924 163 -11229.93946 -41818.94323 164 NA -11229.93946 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -70436.28016 -48070.15807 [2,] -16722.31892 -70436.28016 [3,] -38127.05755 -16722.31892 [4,] -15872.62176 -38127.05755 [5,] -68908.51554 -15872.62176 [6,] 108400.83610 -68908.51554 [7,] -29852.99949 108400.83610 [8,] 1173450.69438 -29852.99949 [9,] 3836.39388 1173450.69438 [10,] 13487.73310 3836.39388 [11,] -7189.99722 13487.73310 [12,] -11480.69361 -7189.99722 [13,] 9283.55891 -11480.69361 [14,] 14020.39978 9283.55891 [15,] 68590.59483 14020.39978 [16,] -37304.56539 68590.59483 [17,] 53676.18409 -37304.56539 [18,] -80943.42215 53676.18409 [19,] -22664.38258 -80943.42215 [20,] -9037.71805 -22664.38258 [21,] 127294.35942 -9037.71805 [22,] -8226.48567 127294.35942 [23,] -61216.91606 -8226.48567 [24,] -24915.47212 -61216.91606 [25,] 4556.74548 -24915.47212 [26,] 7112.52059 4556.74548 [27,] 9448.32399 7112.52059 [28,] 11464.41082 9448.32399 [29,] 34745.45688 11464.41082 [30,] 4404.67404 34745.45688 [31,] -18610.31032 4404.67404 [32,] 53741.54917 -18610.31032 [33,] -5566.92307 53741.54917 [34,] 28464.24421 -5566.92307 [35,] 50821.03619 28464.24421 [36,] 115658.63305 50821.03619 [37,] -8315.72902 115658.63305 [38,] -9652.41594 -8315.72902 [39,] 47576.12650 -9652.41594 [40,] 74143.81273 47576.12650 [41,] 772.87364 74143.81273 [42,] 11325.24756 772.87364 [43,] -23319.98144 11325.24756 [44,] -15403.64649 -23319.98144 [45,] 161302.29134 -15403.64649 [46,] -4627.77691 161302.29134 [47,] -13872.16416 -4627.77691 [48,] 5898.86765 -13872.16416 [49,] -37835.38464 5898.86765 [50,] -22828.19496 -37835.38464 [51,] -82084.60627 -22828.19496 [52,] 59183.85239 -82084.60627 [53,] -18072.39920 59183.85239 [54,] 5471.49156 -18072.39920 [55,] 5017.04915 5471.49156 [56,] -13407.74281 5017.04915 [57,] -98496.42526 -13407.74281 [58,] -3160.79989 -98496.42526 [59,] 22007.36096 -3160.79989 [60,] 45047.09351 22007.36096 [61,] -37050.15391 45047.09351 [62,] 34876.63507 -37050.15391 [63,] 27459.40766 34876.63507 [64,] -17562.12467 27459.40766 [65,] -12527.53547 -17562.12467 [66,] -59149.86576 -12527.53547 [67,] -4877.83355 -59149.86576 [68,] -37608.59128 -4877.83355 [69,] -51533.91030 -37608.59128 [70,] -12643.13359 -51533.91030 [71,] -7861.13858 -12643.13359 [72,] 551.69627 -7861.13858 [73,] -16175.10738 551.69627 [74,] -56719.46715 -16175.10738 [75,] 26845.72229 -56719.46715 [76,] 24305.17224 26845.72229 [77,] -108306.54981 24305.17224 [78,] -39943.33616 -108306.54981 [79,] -3409.68070 -39943.33616 [80,] -72.81613 -3409.68070 [81,] 114914.17066 -72.81613 [82,] 41392.49814 114914.17066 [83,] -44044.00945 41392.49814 [84,] -50594.54296 -44044.00945 [85,] 32545.36822 -50594.54296 [86,] -62831.47459 32545.36822 [87,] 96101.52350 -62831.47459 [88,] 64305.42964 96101.52350 [89,] -95368.72573 64305.42964 [90,] 31204.84285 -95368.72573 [91,] -62813.56269 31204.84285 [92,] 14097.24897 -62813.56269 [93,] -1859.41096 14097.24897 [94,] 14320.38314 -1859.41096 [95,] -28240.44646 14320.38314 [96,] -100541.15771 -28240.44646 [97,] -53713.87165 -100541.15771 [98,] 31422.21795 -53713.87165 [99,] -43167.76237 31422.21795 [100,] 8865.70441 -43167.76237 [101,] -48402.17187 8865.70441 [102,] 21002.62220 -48402.17187 [103,] -71715.10441 21002.62220 [104,] 2278.96170 -71715.10441 [105,] -81600.52074 2278.96170 [106,] -4787.46575 -81600.52074 [107,] 15872.29076 -4787.46575 [108,] -118552.62383 15872.29076 [109,] -28155.33643 -118552.62383 [110,] 17886.54461 -28155.33643 [111,] -10236.53661 17886.54461 [112,] -30189.58861 -10236.53661 [113,] -27219.72133 -30189.58861 [114,] -22306.10166 -27219.72133 [115,] -11484.32771 -22306.10166 [116,] 57419.76677 -11484.32771 [117,] -25785.77151 57419.76677 [118,] 11710.17994 -25785.77151 [119,] -54801.06018 11710.17994 [120,] 42999.08345 -54801.06018 [121,] -24490.32217 42999.08345 [122,] -26918.30566 -24490.32217 [123,] -51301.43769 -26918.30566 [124,] -24413.48066 -51301.43769 [125,] -37206.65216 -24413.48066 [126,] 16850.69773 -37206.65216 [127,] -52426.33758 16850.69773 [128,] 63560.91494 -52426.33758 [129,] -855.86178 63560.91494 [130,] -18016.55033 -855.86178 [131,] -7024.74295 -18016.55033 [132,] -16515.61114 -7024.74295 [133,] 39055.24861 -16515.61114 [134,] 69548.08304 39055.24861 [135,] -36423.38888 69548.08304 [136,] 41925.96896 -36423.38888 [137,] -18436.29607 41925.96896 [138,] 710.98603 -18436.29607 [139,] -17324.58938 710.98603 [140,] -16791.75164 -17324.58938 [141,] 78012.53496 -16791.75164 [142,] -83032.56477 78012.53496 [143,] 92185.79903 -83032.56477 [144,] 41339.92175 92185.79903 [145,] -51040.78163 41339.92175 [146,] -38328.76705 -51040.78163 [147,] -64002.51296 -38328.76705 [148,] -42787.94323 -64002.51296 [149,] -36526.38509 -42787.94323 [150,] -42689.94323 -36526.38509 [151,] -42332.94323 -42689.94323 [152,] -42787.94323 -42332.94323 [153,] -42787.94323 -42787.94323 [154,] -3211.84990 -42787.94323 [155,] 25036.89397 -3211.84990 [156,] -42787.94323 25036.89397 [157,] -42584.94323 -42787.94323 [158,] -41911.97784 -42584.94323 [159,] -11603.59058 -41911.97784 [160,] -30508.64852 -11603.59058 [161,] -611.39924 -30508.64852 [162,] -41818.94323 -611.39924 [163,] -11229.93946 -41818.94323 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -70436.28016 -48070.15807 2 -16722.31892 -70436.28016 3 -38127.05755 -16722.31892 4 -15872.62176 -38127.05755 5 -68908.51554 -15872.62176 6 108400.83610 -68908.51554 7 -29852.99949 108400.83610 8 1173450.69438 -29852.99949 9 3836.39388 1173450.69438 10 13487.73310 3836.39388 11 -7189.99722 13487.73310 12 -11480.69361 -7189.99722 13 9283.55891 -11480.69361 14 14020.39978 9283.55891 15 68590.59483 14020.39978 16 -37304.56539 68590.59483 17 53676.18409 -37304.56539 18 -80943.42215 53676.18409 19 -22664.38258 -80943.42215 20 -9037.71805 -22664.38258 21 127294.35942 -9037.71805 22 -8226.48567 127294.35942 23 -61216.91606 -8226.48567 24 -24915.47212 -61216.91606 25 4556.74548 -24915.47212 26 7112.52059 4556.74548 27 9448.32399 7112.52059 28 11464.41082 9448.32399 29 34745.45688 11464.41082 30 4404.67404 34745.45688 31 -18610.31032 4404.67404 32 53741.54917 -18610.31032 33 -5566.92307 53741.54917 34 28464.24421 -5566.92307 35 50821.03619 28464.24421 36 115658.63305 50821.03619 37 -8315.72902 115658.63305 38 -9652.41594 -8315.72902 39 47576.12650 -9652.41594 40 74143.81273 47576.12650 41 772.87364 74143.81273 42 11325.24756 772.87364 43 -23319.98144 11325.24756 44 -15403.64649 -23319.98144 45 161302.29134 -15403.64649 46 -4627.77691 161302.29134 47 -13872.16416 -4627.77691 48 5898.86765 -13872.16416 49 -37835.38464 5898.86765 50 -22828.19496 -37835.38464 51 -82084.60627 -22828.19496 52 59183.85239 -82084.60627 53 -18072.39920 59183.85239 54 5471.49156 -18072.39920 55 5017.04915 5471.49156 56 -13407.74281 5017.04915 57 -98496.42526 -13407.74281 58 -3160.79989 -98496.42526 59 22007.36096 -3160.79989 60 45047.09351 22007.36096 61 -37050.15391 45047.09351 62 34876.63507 -37050.15391 63 27459.40766 34876.63507 64 -17562.12467 27459.40766 65 -12527.53547 -17562.12467 66 -59149.86576 -12527.53547 67 -4877.83355 -59149.86576 68 -37608.59128 -4877.83355 69 -51533.91030 -37608.59128 70 -12643.13359 -51533.91030 71 -7861.13858 -12643.13359 72 551.69627 -7861.13858 73 -16175.10738 551.69627 74 -56719.46715 -16175.10738 75 26845.72229 -56719.46715 76 24305.17224 26845.72229 77 -108306.54981 24305.17224 78 -39943.33616 -108306.54981 79 -3409.68070 -39943.33616 80 -72.81613 -3409.68070 81 114914.17066 -72.81613 82 41392.49814 114914.17066 83 -44044.00945 41392.49814 84 -50594.54296 -44044.00945 85 32545.36822 -50594.54296 86 -62831.47459 32545.36822 87 96101.52350 -62831.47459 88 64305.42964 96101.52350 89 -95368.72573 64305.42964 90 31204.84285 -95368.72573 91 -62813.56269 31204.84285 92 14097.24897 -62813.56269 93 -1859.41096 14097.24897 94 14320.38314 -1859.41096 95 -28240.44646 14320.38314 96 -100541.15771 -28240.44646 97 -53713.87165 -100541.15771 98 31422.21795 -53713.87165 99 -43167.76237 31422.21795 100 8865.70441 -43167.76237 101 -48402.17187 8865.70441 102 21002.62220 -48402.17187 103 -71715.10441 21002.62220 104 2278.96170 -71715.10441 105 -81600.52074 2278.96170 106 -4787.46575 -81600.52074 107 15872.29076 -4787.46575 108 -118552.62383 15872.29076 109 -28155.33643 -118552.62383 110 17886.54461 -28155.33643 111 -10236.53661 17886.54461 112 -30189.58861 -10236.53661 113 -27219.72133 -30189.58861 114 -22306.10166 -27219.72133 115 -11484.32771 -22306.10166 116 57419.76677 -11484.32771 117 -25785.77151 57419.76677 118 11710.17994 -25785.77151 119 -54801.06018 11710.17994 120 42999.08345 -54801.06018 121 -24490.32217 42999.08345 122 -26918.30566 -24490.32217 123 -51301.43769 -26918.30566 124 -24413.48066 -51301.43769 125 -37206.65216 -24413.48066 126 16850.69773 -37206.65216 127 -52426.33758 16850.69773 128 63560.91494 -52426.33758 129 -855.86178 63560.91494 130 -18016.55033 -855.86178 131 -7024.74295 -18016.55033 132 -16515.61114 -7024.74295 133 39055.24861 -16515.61114 134 69548.08304 39055.24861 135 -36423.38888 69548.08304 136 41925.96896 -36423.38888 137 -18436.29607 41925.96896 138 710.98603 -18436.29607 139 -17324.58938 710.98603 140 -16791.75164 -17324.58938 141 78012.53496 -16791.75164 142 -83032.56477 78012.53496 143 92185.79903 -83032.56477 144 41339.92175 92185.79903 145 -51040.78163 41339.92175 146 -38328.76705 -51040.78163 147 -64002.51296 -38328.76705 148 -42787.94323 -64002.51296 149 -36526.38509 -42787.94323 150 -42689.94323 -36526.38509 151 -42332.94323 -42689.94323 152 -42787.94323 -42332.94323 153 -42787.94323 -42787.94323 154 -3211.84990 -42787.94323 155 25036.89397 -3211.84990 156 -42787.94323 25036.89397 157 -42584.94323 -42787.94323 158 -41911.97784 -42584.94323 159 -11603.59058 -41911.97784 160 -30508.64852 -11603.59058 161 -611.39924 -30508.64852 162 -41818.94323 -611.39924 163 -11229.93946 -41818.94323 > 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/72b1c1321989110.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/8spby1321989110.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/98voz1321989110.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/100scy1321989110.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/114vbq1321989110.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/12fsgj1321989110.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/13ys1u1321989110.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/14erog1321989110.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/153ptv1321989110.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/16f5uo1321989110.tab") + } > > try(system("convert tmp/16ikp1321989110.ps tmp/16ikp1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/2r44c1321989110.ps tmp/2r44c1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/3ycid1321989110.ps tmp/3ycid1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/4lkgp1321989110.ps tmp/4lkgp1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/546ci1321989110.ps tmp/546ci1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/6vmpu1321989110.ps tmp/6vmpu1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/72b1c1321989110.ps tmp/72b1c1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/8spby1321989110.ps tmp/8spby1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/98voz1321989110.ps tmp/98voz1321989110.png",intern=TRUE)) character(0) > try(system("convert tmp/100scy1321989110.ps tmp/100scy1321989110.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.090 0.280 6.395