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(170588 + ,95556 + ,114468 + ,86621 + ,54565 + ,88594 + ,118522 + ,63016 + ,74151 + ,152510 + ,79774 + ,77921 + ,86206 + ,31258 + ,53212 + ,37257 + ,52491 + ,34956 + ,306055 + ,91256 + ,149703 + ,32750 + ,22807 + ,6853 + ,116502 + ,77411 + ,58907 + ,130539 + ,48821 + ,67067 + ,164604 + ,52295 + ,110563 + ,128274 + ,63262 + ,58126 + ,104367 + ,50466 + ,57113 + ,193024 + ,62932 + ,77993 + ,141574 + ,38439 + ,68091 + ,254150 + ,70817 + ,124676 + ,181110 + ,105965 + ,109522 + ,198432 + ,73795 + ,75865 + ,113853 + ,82043 + ,79746 + ,159940 + ,74349 + ,77844 + ,166822 + ,82204 + ,98681 + ,286675 + ,55709 + ,105531 + ,95297 + ,37137 + ,51428 + ,108278 + ,70780 + ,65703 + ,146342 + ,55027 + ,72562 + ,146684 + ,56699 + ,81728 + ,163569 + ,65911 + ,95580 + ,162716 + ,56316 + ,98278 + ,106888 + ,26982 + ,46629 + ,188150 + ,54628 + ,115189 + ,189401 + ,96750 + ,124865 + ,129484 + ,53009 + ,59392 + ,204030 + ,64664 + ,127818 + ,68538 + ,36990 + ,17821 + ,243625 + ,85224 + ,154076 + ,167255 + ,37048 + ,64881 + ,264528 + ,59635 + ,136506 + ,122024 + ,42051 + ,66524 + ,80964 + ,26998 + ,45988 + ,209795 + ,63717 + ,107445 + ,224911 + ,55071 + ,102772 + ,115971 + ,40001 + ,46657 + ,138191 + ,54506 + ,97563 + ,81106 + ,35838 + ,36663 + ,93125 + ,50838 + ,55369 + ,307743 + ,86997 + ,77921 + ,78800 + ,33032 + ,56968 + ,158835 + ,61704 + ,77519 + ,223590 + ,117986 + ,129805 + ,131108 + ,56733 + ,72761 + ,128734 + ,55064 + ,81278 + ,24188 + ,5950 + ,15049 + ,257677 + ,84607 + ,113935 + ,65029 + ,32551 + ,25109 + ,98066 + ,31701 + ,45824 + ,173587 + ,71170 + ,89644 + ,180042 + ,101773 + ,109011 + ,197266 + ,101653 + ,134245 + ,212120 + ,81493 + ,136692 + ,141582 + ,55901 + ,50741 + ,245107 + ,109104 + ,149510 + ,206879 + ,114425 + ,147888 + ,145696 + ,36311 + ,54987 + ,173535 + ,70027 + ,74467 + ,142064 + ,73713 + ,100033 + ,117926 + ,40671 + ,85505 + ,113461 + ,89041 + ,62426 + ,145285 + ,57231 + ,82932 + ,150999 + ,68608 + ,72002 + ,91838 + ,59155 + ,65469 + ,118807 + ,55827 + ,63572 + ,69471 + ,22618 + ,23824 + ,126630 + ,58425 + ,73831 + ,145908 + ,65724 + ,63551 + ,102896 + ,56979 + ,56756 + ,190926 + ,72369 + ,81399 + ,198797 + ,79194 + ,117881 + ,112566 + ,202316 + ,70711 + ,89318 + ,44970 + ,50495 + ,120362 + ,49319 + ,53845 + ,98791 + ,36252 + ,51390 + ,283982 + ,75741 + ,104953 + ,132798 + ,38417 + ,65983 + ,137875 + ,64102 + ,76839 + ,80953 + ,56622 + ,55792 + ,109237 + ,15430 + ,25155 + ,98724 + ,72571 + ,55291 + ,226191 + ,67271 + ,84279 + ,172071 + ,43460 + ,99692 + ,118174 + ,99501 + ,59633 + ,133561 + ,28340 + ,63249 + ,152193 + ,76013 + ,82928 + ,112004 + ,37361 + ,50000 + ,169613 + ,48204 + ,69455 + ,187483 + ,76168 + ,84068 + ,130533 + ,85168 + ,76195 + ,142339 + ,125410 + ,114634 + ,201941 + ,123328 + ,139357 + ,201744 + ,83038 + ,110044 + ,247024 + ,120087 + ,155118 + ,162502 + ,91939 + ,83061 + ,182581 + ,103646 + ,127122 + ,106351 + ,29467 + ,45653 + ,43287 + ,43750 + ,19630 + ,127493 + ,34497 + ,67229 + ,127930 + ,66477 + ,86060 + ,149006 + ,71181 + ,88003 + ,187714 + ,74482 + ,95815 + ,74112 + ,174949 + ,85499 + ,94006 + ,46765 + ,27220 + ,176625 + ,90257 + ,109882 + ,141933 + ,51370 + ,72579 + ,22938 + ,1168 + ,5841 + ,125927 + ,51360 + ,68369 + ,61857 + ,25162 + ,24610 + ,91290 + ,21067 + ,30995 + ,255100 + ,58233 + ,150662 + ,21054 + ,855 + ,6622 + ,174150 + ,85903 + ,93694 + ,31414 + ,14116 + ,13155 + ,189461 + ,57637 + ,111908 + ,137544 + ,94137 + ,57550 + ,77166 + ,62147 + ,16356 + ,74567 + ,62832 + ,40174 + ,38214 + ,8773 + ,13983 + ,90961 + ,63785 + ,52316 + ,194652 + ,65196 + ,99585 + ,135261 + ,73087 + ,86271 + ,248590 + ,72631 + ,131012 + ,201748 + ,86281 + ,130274 + ,256402 + ,162365 + ,159051 + ,139144 + ,56530 + ,76506 + ,76470 + ,35606 + ,49145 + ,193518 + ,70111 + ,66398 + ,280334 + ,92046 + ,127546 + ,50999 + ,63989 + ,6802 + ,254825 + ,104911 + ,99509 + ,103239 + ,43448 + ,43106 + ,168059 + ,60029 + ,108303 + ,136709 + ,38650 + ,64167 + ,78256 + ,47261 + ,8579 + ,249232 + ,73586 + ,97811 + ,152366 + ,83042 + ,84365 + ,173260 + ,37238 + ,10901 + ,197197 + ,63958 + ,91346 + ,68388 + ,78956 + ,33660 + ,139409 + ,99518 + ,93634 + ,185366 + ,111436 + ,109348 + ,0 + ,0 + ,0 + ,14688 + ,6023 + ,7953 + ,98 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,137885 + ,42564 + ,63538 + ,185288 + ,38885 + ,108281 + ,0 + ,0 + ,0 + ,203 + ,0 + ,0 + ,7199 + ,1644 + ,4245 + ,46660 + ,6179 + ,21509 + ,17547 + ,3926 + ,7670 + ,73567 + ,23238 + ,10641 + ,969 + ,0 + ,0 + ,105477 + ,49288 + ,41243) + ,dim=c(3 + ,164) + ,dimnames=list(c('TotalRFC' + ,'TotalCharac' + ,'TotalComp') + ,1:164)) > y <- array(NA,dim=c(3,164),dimnames=list(c('TotalRFC','TotalCharac','TotalComp'),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 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x TotalCharac TotalRFC TotalComp t 1 95556 170588 114468 1 2 54565 86621 88594 2 3 63016 118522 74151 3 4 79774 152510 77921 4 5 31258 86206 53212 5 6 52491 37257 34956 6 7 91256 306055 149703 7 8 22807 32750 6853 8 9 77411 116502 58907 9 10 48821 130539 67067 10 11 52295 164604 110563 11 12 63262 128274 58126 12 13 50466 104367 57113 13 14 62932 193024 77993 14 15 38439 141574 68091 15 16 70817 254150 124676 16 17 105965 181110 109522 17 18 73795 198432 75865 18 19 82043 113853 79746 19 20 74349 159940 77844 20 21 82204 166822 98681 21 22 55709 286675 105531 22 23 37137 95297 51428 23 24 70780 108278 65703 24 25 55027 146342 72562 25 26 56699 146684 81728 26 27 65911 163569 95580 27 28 56316 162716 98278 28 29 26982 106888 46629 29 30 54628 188150 115189 30 31 96750 189401 124865 31 32 53009 129484 59392 32 33 64664 204030 127818 33 34 36990 68538 17821 34 35 85224 243625 154076 35 36 37048 167255 64881 36 37 59635 264528 136506 37 38 42051 122024 66524 38 39 26998 80964 45988 39 40 63717 209795 107445 40 41 55071 224911 102772 41 42 40001 115971 46657 42 43 54506 138191 97563 43 44 35838 81106 36663 44 45 50838 93125 55369 45 46 86997 307743 77921 46 47 33032 78800 56968 47 48 61704 158835 77519 48 49 117986 223590 129805 49 50 56733 131108 72761 50 51 55064 128734 81278 51 52 5950 24188 15049 52 53 84607 257677 113935 53 54 32551 65029 25109 54 55 31701 98066 45824 55 56 71170 173587 89644 56 57 101773 180042 109011 57 58 101653 197266 134245 58 59 81493 212120 136692 59 60 55901 141582 50741 60 61 109104 245107 149510 61 62 114425 206879 147888 62 63 36311 145696 54987 63 64 70027 173535 74467 64 65 73713 142064 100033 65 66 40671 117926 85505 66 67 89041 113461 62426 67 68 57231 145285 82932 68 69 68608 150999 72002 69 70 59155 91838 65469 70 71 55827 118807 63572 71 72 22618 69471 23824 72 73 58425 126630 73831 73 74 65724 145908 63551 74 75 56979 102896 56756 75 76 72369 190926 81399 76 77 79194 198797 117881 77 78 202316 112566 70711 78 79 44970 89318 50495 79 80 49319 120362 53845 80 81 36252 98791 51390 81 82 75741 283982 104953 82 83 38417 132798 65983 83 84 64102 137875 76839 84 85 56622 80953 55792 85 86 15430 109237 25155 86 87 72571 98724 55291 87 88 67271 226191 84279 88 89 43460 172071 99692 89 90 99501 118174 59633 90 91 28340 133561 63249 91 92 76013 152193 82928 92 93 37361 112004 50000 93 94 48204 169613 69455 94 95 76168 187483 84068 95 96 85168 130533 76195 96 97 125410 142339 114634 97 98 123328 201941 139357 98 99 83038 201744 110044 99 100 120087 247024 155118 100 101 91939 162502 83061 101 102 103646 182581 127122 102 103 29467 106351 45653 103 104 43750 43287 19630 104 105 34497 127493 67229 105 106 66477 127930 86060 106 107 71181 149006 88003 107 108 74482 187714 95815 108 109 174949 74112 85499 109 110 46765 94006 27220 110 111 90257 176625 109882 111 112 51370 141933 72579 112 113 1168 22938 5841 113 114 51360 125927 68369 114 115 25162 61857 24610 115 116 21067 91290 30995 116 117 58233 255100 150662 117 118 855 21054 6622 118 119 85903 174150 93694 119 120 14116 31414 13155 120 121 57637 189461 111908 121 122 94137 137544 57550 122 123 62147 77166 16356 123 124 62832 74567 40174 124 125 8773 38214 13983 125 126 63785 90961 52316 126 127 65196 194652 99585 127 128 73087 135261 86271 128 129 72631 248590 131012 129 130 86281 201748 130274 130 131 162365 256402 159051 131 132 56530 139144 76506 132 133 35606 76470 49145 133 134 70111 193518 66398 134 135 92046 280334 127546 135 136 63989 50999 6802 136 137 104911 254825 99509 137 138 43448 103239 43106 138 139 60029 168059 108303 139 140 38650 136709 64167 140 141 47261 78256 8579 141 142 73586 249232 97811 142 143 83042 152366 84365 143 144 37238 173260 10901 144 145 63958 197197 91346 145 146 78956 68388 33660 146 147 99518 139409 93634 147 148 111436 185366 109348 148 149 0 0 0 149 150 6023 14688 7953 150 151 0 98 0 151 152 0 455 0 152 153 0 0 0 153 154 0 0 0 154 155 42564 137885 63538 155 156 38885 185288 108281 156 157 0 0 0 157 158 0 203 0 158 159 1644 7199 4245 159 160 6179 46660 21509 160 161 3926 17547 7670 161 162 23238 73567 10641 162 163 0 969 0 163 164 49288 105477 41243 164 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) TotalRFC TotalComp t 1.310e+04 -1.829e-02 6.482e-01 2.994e+01 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -51368 -16197 -2445 10860 143100 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.310e+04 5.916e+03 2.215 0.0282 * TotalRFC -1.829e-02 5.471e-02 -0.334 0.7386 TotalComp 6.482e-01 9.677e-02 6.698 3.4e-10 *** t 2.994e+01 4.023e+01 0.744 0.4578 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 23240 on 160 degrees of freedom Multiple R-squared: 0.5277, Adjusted R-squared: 0.5188 F-statistic: 59.59 on 3 and 160 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,] 3.503384e-01 7.006768e-01 6.496616e-01 [2,] 2.039398e-01 4.078796e-01 7.960602e-01 [3,] 3.136186e-01 6.272372e-01 6.863814e-01 [4,] 2.193098e-01 4.386196e-01 7.806902e-01 [5,] 1.505480e-01 3.010959e-01 8.494520e-01 [6,] 1.200069e-01 2.400138e-01 8.799931e-01 [7,] 7.509510e-02 1.501902e-01 9.249049e-01 [8,] 4.310048e-02 8.620096e-02 9.568995e-01 [9,] 2.899987e-02 5.799973e-02 9.710001e-01 [10,] 1.597254e-02 3.194508e-02 9.840275e-01 [11,] 1.036745e-01 2.073490e-01 8.963255e-01 [12,] 7.850221e-02 1.570044e-01 9.214978e-01 [13,] 7.192442e-02 1.438488e-01 9.280756e-01 [14,] 4.987112e-02 9.974225e-02 9.501289e-01 [15,] 3.248615e-02 6.497229e-02 9.675139e-01 [16,] 3.349063e-02 6.698126e-02 9.665094e-01 [17,] 3.027521e-02 6.055041e-02 9.697248e-01 [18,] 2.179799e-02 4.359599e-02 9.782020e-01 [19,] 1.479203e-02 2.958406e-02 9.852080e-01 [20,] 1.039882e-02 2.079765e-02 9.896012e-01 [21,] 6.669342e-03 1.333868e-02 9.933307e-01 [22,] 5.517925e-03 1.103585e-02 9.944821e-01 [23,] 4.934890e-03 9.869779e-03 9.950651e-01 [24,] 5.055758e-03 1.011152e-02 9.949442e-01 [25,] 4.715656e-03 9.431312e-03 9.952843e-01 [26,] 2.976818e-03 5.953636e-03 9.970232e-01 [27,] 2.593540e-03 5.187081e-03 9.974065e-01 [28,] 1.723880e-03 3.447761e-03 9.982761e-01 [29,] 1.135129e-03 2.270257e-03 9.988649e-01 [30,] 8.113325e-04 1.622665e-03 9.991887e-01 [31,] 8.895442e-04 1.779088e-03 9.991105e-01 [32,] 5.568109e-04 1.113622e-03 9.994432e-01 [33,] 3.887126e-04 7.774253e-04 9.996113e-01 [34,] 2.424419e-04 4.848838e-04 9.997576e-01 [35,] 1.581097e-04 3.162195e-04 9.998419e-01 [36,] 9.346920e-05 1.869384e-04 9.999065e-01 [37,] 5.897591e-05 1.179518e-04 9.999410e-01 [38,] 3.395664e-05 6.791328e-05 9.999660e-01 [39,] 2.301622e-05 4.603244e-05 9.999770e-01 [40,] 8.432491e-05 1.686498e-04 9.999157e-01 [41,] 5.455059e-05 1.091012e-04 9.999454e-01 [42,] 3.800530e-05 7.601061e-05 9.999620e-01 [43,] 3.144824e-04 6.289648e-04 9.996855e-01 [44,] 2.015787e-04 4.031574e-04 9.997984e-01 [45,] 1.272744e-04 2.545487e-04 9.998727e-01 [46,] 1.159241e-04 2.318483e-04 9.998841e-01 [47,] 8.328559e-05 1.665712e-04 9.999167e-01 [48,] 5.038326e-05 1.007665e-04 9.999496e-01 [49,] 3.243510e-05 6.487021e-05 9.999676e-01 [50,] 2.338364e-05 4.676728e-05 9.999766e-01 [51,] 5.584891e-05 1.116978e-04 9.999442e-01 [52,] 5.134221e-05 1.026844e-04 9.999487e-01 [53,] 3.677695e-05 7.355389e-05 9.999632e-01 [54,] 2.525254e-05 5.050508e-05 9.999747e-01 [55,] 2.036892e-05 4.073784e-05 9.999796e-01 [56,] 1.993924e-05 3.987849e-05 9.999801e-01 [57,] 1.435098e-05 2.870195e-05 9.999856e-01 [58,] 9.945017e-06 1.989003e-05 9.999901e-01 [59,] 6.132731e-06 1.226546e-05 9.999939e-01 [60,] 8.680022e-06 1.736004e-05 9.999913e-01 [61,] 2.890252e-05 5.780504e-05 9.999711e-01 [62,] 1.956984e-05 3.913967e-05 9.999804e-01 [63,] 1.307337e-05 2.614674e-05 9.999869e-01 [64,] 8.089024e-06 1.617805e-05 9.999919e-01 [65,] 4.807644e-06 9.615287e-06 9.999952e-01 [66,] 3.310572e-06 6.621145e-06 9.999967e-01 [67,] 2.002310e-06 4.004620e-06 9.999980e-01 [68,] 1.312059e-06 2.624118e-06 9.999987e-01 [69,] 7.762391e-07 1.552478e-06 9.999992e-01 [70,] 4.558015e-07 9.116030e-07 9.999995e-01 [71,] 2.966862e-07 5.933724e-07 9.999997e-01 [72,] 3.084458e-01 6.168915e-01 6.915542e-01 [73,] 2.754292e-01 5.508585e-01 7.245708e-01 [74,] 2.411782e-01 4.823563e-01 7.588218e-01 [75,] 2.271606e-01 4.543211e-01 7.728394e-01 [76,] 1.973475e-01 3.946949e-01 8.026525e-01 [77,] 1.996289e-01 3.992578e-01 8.003711e-01 [78,] 1.709215e-01 3.418431e-01 8.290785e-01 [79,] 1.437060e-01 2.874120e-01 8.562940e-01 [80,] 1.427498e-01 2.854996e-01 8.572502e-01 [81,] 1.297221e-01 2.594441e-01 8.702779e-01 [82,] 1.084447e-01 2.168894e-01 8.915553e-01 [83,] 1.549069e-01 3.098138e-01 8.450931e-01 [84,] 2.159877e-01 4.319753e-01 7.840123e-01 [85,] 2.534730e-01 5.069460e-01 7.465270e-01 [86,] 2.197652e-01 4.395305e-01 7.802348e-01 [87,] 2.049086e-01 4.098172e-01 7.950914e-01 [88,] 1.927254e-01 3.854508e-01 8.072746e-01 [89,] 1.648453e-01 3.296906e-01 8.351547e-01 [90,] 1.490800e-01 2.981601e-01 8.509200e-01 [91,] 1.755268e-01 3.510536e-01 8.244732e-01 [92,] 1.601557e-01 3.203114e-01 8.398443e-01 [93,] 1.365083e-01 2.730166e-01 8.634917e-01 [94,] 1.136353e-01 2.272706e-01 8.863647e-01 [95,] 1.040948e-01 2.081896e-01 8.959052e-01 [96,] 8.489528e-02 1.697906e-01 9.151047e-01 [97,] 8.406730e-02 1.681346e-01 9.159327e-01 [98,] 6.883969e-02 1.376794e-01 9.311603e-01 [99,] 8.066933e-02 1.613387e-01 9.193307e-01 [100,] 6.736069e-02 1.347214e-01 9.326393e-01 [101,] 5.445238e-02 1.089048e-01 9.455476e-01 [102,] 4.415942e-02 8.831885e-02 9.558406e-01 [103,] 7.403621e-01 5.192758e-01 2.596379e-01 [104,] 7.023413e-01 5.953175e-01 2.976587e-01 [105,] 6.658435e-01 6.683130e-01 3.341565e-01 [106,] 6.362586e-01 7.274828e-01 3.637414e-01 [107,] 6.405404e-01 7.189193e-01 3.594596e-01 [108,] 6.037676e-01 7.924648e-01 3.962324e-01 [109,] 5.684576e-01 8.630847e-01 4.315424e-01 [110,] 5.693578e-01 8.612844e-01 4.306422e-01 [111,] 7.871210e-01 4.257580e-01 2.128790e-01 [112,] 8.107090e-01 3.785820e-01 1.892910e-01 [113,] 7.747326e-01 4.505349e-01 2.252674e-01 [114,] 7.707938e-01 4.584124e-01 2.292062e-01 [115,] 8.343635e-01 3.312730e-01 1.656365e-01 [116,] 8.582238e-01 2.835524e-01 1.417762e-01 [117,] 8.607547e-01 2.784906e-01 1.392453e-01 [118,] 8.446824e-01 3.106352e-01 1.553176e-01 [119,] 8.512404e-01 2.975192e-01 1.487596e-01 [120,] 8.213251e-01 3.573498e-01 1.786749e-01 [121,] 8.190643e-01 3.618714e-01 1.809357e-01 [122,] 7.790158e-01 4.419684e-01 2.209842e-01 [123,] 8.401856e-01 3.196287e-01 1.598144e-01 [124,] 8.320393e-01 3.359214e-01 1.679607e-01 [125,] 9.209105e-01 1.581790e-01 7.908952e-02 [126,] 9.067162e-01 1.865676e-01 9.328382e-02 [127,] 9.015381e-01 1.969238e-01 9.846191e-02 [128,] 8.751711e-01 2.496578e-01 1.248289e-01 [129,] 8.626044e-01 2.747912e-01 1.373956e-01 [130,] 9.027004e-01 1.945992e-01 9.729962e-02 [131,] 8.867555e-01 2.264889e-01 1.132445e-01 [132,] 8.528027e-01 2.943947e-01 1.471973e-01 [133,] 8.769211e-01 2.461579e-01 1.230789e-01 [134,] 9.031139e-01 1.937721e-01 9.688605e-02 [135,] 8.884463e-01 2.231074e-01 1.115537e-01 [136,] 8.831008e-01 2.337983e-01 1.168992e-01 [137,] 8.431325e-01 3.137351e-01 1.568675e-01 [138,] 7.967663e-01 4.064674e-01 2.032337e-01 [139,] 8.607378e-01 2.785245e-01 1.392622e-01 [140,] 9.300732e-01 1.398536e-01 6.992682e-02 [141,] 9.703011e-01 5.939781e-02 2.969891e-02 [142,] 9.999967e-01 6.568842e-06 3.284421e-06 [143,] 9.999874e-01 2.517711e-05 1.258856e-05 [144,] 9.999585e-01 8.308640e-05 4.154320e-05 [145,] 9.998516e-01 2.967321e-04 1.483661e-04 [146,] 9.994913e-01 1.017417e-03 5.087084e-04 [147,] 9.983846e-01 3.230731e-03 1.615365e-03 [148,] 9.954188e-01 9.162373e-03 4.581187e-03 [149,] 9.906827e-01 1.863470e-02 9.317349e-03 [150,] 9.850808e-01 2.983832e-02 1.491916e-02 [151,] 9.571170e-01 8.576603e-02 4.288301e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1lrlh1321911448.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/2b8nb1321911448.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/39xkr1321911448.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/4beu41321911448.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/5j41e1321911448.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 11343.5566 -14441.5508 3924.8670 18830.8145 -14911.4097 17229.9427 7 8 9 10 11 12 -13497.8490 5619.9520 27984.4059 -5668.1170 -29795.0940 14467.1165 13 14 15 16 17 18 1860.5696 2383.6693 -16661.7686 -18933.1468 24671.8994 14605.1709 19 20 21 22 23 24 18760.7251 13112.5301 7556.9390 -21216.2005 -8248.7269 16348.7036 25 26 27 28 29 30 -3184.0890 -7477.1641 -6965.1463 -18354.5287 -15260.6928 -30598.9420 31 32 33 34 35 36 5244.0261 2816.7751 -28548.4429 12569.5222 -24344.5803 -16131.1720 37 38 39 40 41 42 -38222.3282 -13080.2661 -15602.7411 -16393.8586 -21764.3168 -2482.9791 43 44 45 46 47 48 -20598.7372 -865.4062 2199.2631 27635.2453 -16965.0779 -180.4066 49 50 51 52 53 54 23364.2336 -2634.2558 -9897.3224 -18023.7444 775.7822 2743.4249 55 56 57 58 59 60 -10959.7434 1456.4420 19593.8934 3402.3159 -18102.1071 10699.2054 61 62 63 64 65 66 1743.6909 7386.9836 -11657.6331 9910.6587 -3580.6918 -27677.0609 67 68 69 70 71 72 35541.1099 -9008.7692 9527.5996 3197.3564 1562.2759 -6814.3677 73 74 75 76 77 78 -2406.4045 11878.7040 6721.6339 7718.0957 -8990.4730 143100.0487 79 80 81 82 83 84 -1597.0904 1118.2583 -10781.8638 -2655.3480 -17513.9636 1197.1032 85 86 87 88 89 90 6288.7613 -14557.0452 22827.6331 1038.9262 -33782.4872 47209.0439 91 92 93 94 95 96 -26044.3752 9183.5405 -8889.5295 -9633.5764 9155.1768 22186.9560 97 98 99 100 101 102 37698.8292 20651.5222 -671.3812 7958.8929 24942.3857 8426.3899 103 104 105 106 107 108 -14368.6228 15599.1414 -22997.3774 -3245.5534 554.5083 -530.2395 109 110 111 112 113 114 104515.9938 14442.2470 5833.9207 -9537.7476 -18686.4909 -7171.4471 115 116 117 118 119 120 -6206.6332 -13932.0300 -51368.0584 -19689.9029 11688.1524 -10533.9971 121 122 123 124 125 126 -28164.0007 42591.3322 36169.0391 21337.7726 -16439.0548 14660.2875 127 128 129 130 131 132 -12701.9693 2703.0149 -24711.3290 -11469.5832 46930.8204 -7573.0819 133 134 135 136 137 138 -11937.8956 13494.4561 -2648.7702 43336.1119 27863.3575 158.4339 139 140 141 142 143 144 -24365.6276 -17739.0346 25805.0471 -2613.0034 13757.1718 15924.6077 145 146 147 148 149 150 -9091.8835 40912.3946 23868.2824 26411.0454 -17565.8039 -16459.2437 151 152 153 154 155 156 -17623.8968 -17647.3103 -17685.5742 -17715.5168 -13844.9489 -45689.2940 157 158 159 160 161 162 -17805.3445 -17831.5745 -18841.1715 -24804.9199 -18649.8843 -269.0883 163 164 -17967.2782 6468.4510 > postscript(file="/var/wessaorg/rcomp/tmp/6a0361321911448.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 11343.5566 NA 1 -14441.5508 11343.5566 2 3924.8670 -14441.5508 3 18830.8145 3924.8670 4 -14911.4097 18830.8145 5 17229.9427 -14911.4097 6 -13497.8490 17229.9427 7 5619.9520 -13497.8490 8 27984.4059 5619.9520 9 -5668.1170 27984.4059 10 -29795.0940 -5668.1170 11 14467.1165 -29795.0940 12 1860.5696 14467.1165 13 2383.6693 1860.5696 14 -16661.7686 2383.6693 15 -18933.1468 -16661.7686 16 24671.8994 -18933.1468 17 14605.1709 24671.8994 18 18760.7251 14605.1709 19 13112.5301 18760.7251 20 7556.9390 13112.5301 21 -21216.2005 7556.9390 22 -8248.7269 -21216.2005 23 16348.7036 -8248.7269 24 -3184.0890 16348.7036 25 -7477.1641 -3184.0890 26 -6965.1463 -7477.1641 27 -18354.5287 -6965.1463 28 -15260.6928 -18354.5287 29 -30598.9420 -15260.6928 30 5244.0261 -30598.9420 31 2816.7751 5244.0261 32 -28548.4429 2816.7751 33 12569.5222 -28548.4429 34 -24344.5803 12569.5222 35 -16131.1720 -24344.5803 36 -38222.3282 -16131.1720 37 -13080.2661 -38222.3282 38 -15602.7411 -13080.2661 39 -16393.8586 -15602.7411 40 -21764.3168 -16393.8586 41 -2482.9791 -21764.3168 42 -20598.7372 -2482.9791 43 -865.4062 -20598.7372 44 2199.2631 -865.4062 45 27635.2453 2199.2631 46 -16965.0779 27635.2453 47 -180.4066 -16965.0779 48 23364.2336 -180.4066 49 -2634.2558 23364.2336 50 -9897.3224 -2634.2558 51 -18023.7444 -9897.3224 52 775.7822 -18023.7444 53 2743.4249 775.7822 54 -10959.7434 2743.4249 55 1456.4420 -10959.7434 56 19593.8934 1456.4420 57 3402.3159 19593.8934 58 -18102.1071 3402.3159 59 10699.2054 -18102.1071 60 1743.6909 10699.2054 61 7386.9836 1743.6909 62 -11657.6331 7386.9836 63 9910.6587 -11657.6331 64 -3580.6918 9910.6587 65 -27677.0609 -3580.6918 66 35541.1099 -27677.0609 67 -9008.7692 35541.1099 68 9527.5996 -9008.7692 69 3197.3564 9527.5996 70 1562.2759 3197.3564 71 -6814.3677 1562.2759 72 -2406.4045 -6814.3677 73 11878.7040 -2406.4045 74 6721.6339 11878.7040 75 7718.0957 6721.6339 76 -8990.4730 7718.0957 77 143100.0487 -8990.4730 78 -1597.0904 143100.0487 79 1118.2583 -1597.0904 80 -10781.8638 1118.2583 81 -2655.3480 -10781.8638 82 -17513.9636 -2655.3480 83 1197.1032 -17513.9636 84 6288.7613 1197.1032 85 -14557.0452 6288.7613 86 22827.6331 -14557.0452 87 1038.9262 22827.6331 88 -33782.4872 1038.9262 89 47209.0439 -33782.4872 90 -26044.3752 47209.0439 91 9183.5405 -26044.3752 92 -8889.5295 9183.5405 93 -9633.5764 -8889.5295 94 9155.1768 -9633.5764 95 22186.9560 9155.1768 96 37698.8292 22186.9560 97 20651.5222 37698.8292 98 -671.3812 20651.5222 99 7958.8929 -671.3812 100 24942.3857 7958.8929 101 8426.3899 24942.3857 102 -14368.6228 8426.3899 103 15599.1414 -14368.6228 104 -22997.3774 15599.1414 105 -3245.5534 -22997.3774 106 554.5083 -3245.5534 107 -530.2395 554.5083 108 104515.9938 -530.2395 109 14442.2470 104515.9938 110 5833.9207 14442.2470 111 -9537.7476 5833.9207 112 -18686.4909 -9537.7476 113 -7171.4471 -18686.4909 114 -6206.6332 -7171.4471 115 -13932.0300 -6206.6332 116 -51368.0584 -13932.0300 117 -19689.9029 -51368.0584 118 11688.1524 -19689.9029 119 -10533.9971 11688.1524 120 -28164.0007 -10533.9971 121 42591.3322 -28164.0007 122 36169.0391 42591.3322 123 21337.7726 36169.0391 124 -16439.0548 21337.7726 125 14660.2875 -16439.0548 126 -12701.9693 14660.2875 127 2703.0149 -12701.9693 128 -24711.3290 2703.0149 129 -11469.5832 -24711.3290 130 46930.8204 -11469.5832 131 -7573.0819 46930.8204 132 -11937.8956 -7573.0819 133 13494.4561 -11937.8956 134 -2648.7702 13494.4561 135 43336.1119 -2648.7702 136 27863.3575 43336.1119 137 158.4339 27863.3575 138 -24365.6276 158.4339 139 -17739.0346 -24365.6276 140 25805.0471 -17739.0346 141 -2613.0034 25805.0471 142 13757.1718 -2613.0034 143 15924.6077 13757.1718 144 -9091.8835 15924.6077 145 40912.3946 -9091.8835 146 23868.2824 40912.3946 147 26411.0454 23868.2824 148 -17565.8039 26411.0454 149 -16459.2437 -17565.8039 150 -17623.8968 -16459.2437 151 -17647.3103 -17623.8968 152 -17685.5742 -17647.3103 153 -17715.5168 -17685.5742 154 -13844.9489 -17715.5168 155 -45689.2940 -13844.9489 156 -17805.3445 -45689.2940 157 -17831.5745 -17805.3445 158 -18841.1715 -17831.5745 159 -24804.9199 -18841.1715 160 -18649.8843 -24804.9199 161 -269.0883 -18649.8843 162 -17967.2782 -269.0883 163 6468.4510 -17967.2782 164 NA 6468.4510 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -14441.5508 11343.5566 [2,] 3924.8670 -14441.5508 [3,] 18830.8145 3924.8670 [4,] -14911.4097 18830.8145 [5,] 17229.9427 -14911.4097 [6,] -13497.8490 17229.9427 [7,] 5619.9520 -13497.8490 [8,] 27984.4059 5619.9520 [9,] -5668.1170 27984.4059 [10,] -29795.0940 -5668.1170 [11,] 14467.1165 -29795.0940 [12,] 1860.5696 14467.1165 [13,] 2383.6693 1860.5696 [14,] -16661.7686 2383.6693 [15,] -18933.1468 -16661.7686 [16,] 24671.8994 -18933.1468 [17,] 14605.1709 24671.8994 [18,] 18760.7251 14605.1709 [19,] 13112.5301 18760.7251 [20,] 7556.9390 13112.5301 [21,] -21216.2005 7556.9390 [22,] -8248.7269 -21216.2005 [23,] 16348.7036 -8248.7269 [24,] -3184.0890 16348.7036 [25,] -7477.1641 -3184.0890 [26,] -6965.1463 -7477.1641 [27,] -18354.5287 -6965.1463 [28,] -15260.6928 -18354.5287 [29,] -30598.9420 -15260.6928 [30,] 5244.0261 -30598.9420 [31,] 2816.7751 5244.0261 [32,] -28548.4429 2816.7751 [33,] 12569.5222 -28548.4429 [34,] -24344.5803 12569.5222 [35,] -16131.1720 -24344.5803 [36,] -38222.3282 -16131.1720 [37,] -13080.2661 -38222.3282 [38,] -15602.7411 -13080.2661 [39,] -16393.8586 -15602.7411 [40,] -21764.3168 -16393.8586 [41,] -2482.9791 -21764.3168 [42,] -20598.7372 -2482.9791 [43,] -865.4062 -20598.7372 [44,] 2199.2631 -865.4062 [45,] 27635.2453 2199.2631 [46,] -16965.0779 27635.2453 [47,] -180.4066 -16965.0779 [48,] 23364.2336 -180.4066 [49,] -2634.2558 23364.2336 [50,] -9897.3224 -2634.2558 [51,] -18023.7444 -9897.3224 [52,] 775.7822 -18023.7444 [53,] 2743.4249 775.7822 [54,] -10959.7434 2743.4249 [55,] 1456.4420 -10959.7434 [56,] 19593.8934 1456.4420 [57,] 3402.3159 19593.8934 [58,] -18102.1071 3402.3159 [59,] 10699.2054 -18102.1071 [60,] 1743.6909 10699.2054 [61,] 7386.9836 1743.6909 [62,] -11657.6331 7386.9836 [63,] 9910.6587 -11657.6331 [64,] -3580.6918 9910.6587 [65,] -27677.0609 -3580.6918 [66,] 35541.1099 -27677.0609 [67,] -9008.7692 35541.1099 [68,] 9527.5996 -9008.7692 [69,] 3197.3564 9527.5996 [70,] 1562.2759 3197.3564 [71,] -6814.3677 1562.2759 [72,] -2406.4045 -6814.3677 [73,] 11878.7040 -2406.4045 [74,] 6721.6339 11878.7040 [75,] 7718.0957 6721.6339 [76,] -8990.4730 7718.0957 [77,] 143100.0487 -8990.4730 [78,] -1597.0904 143100.0487 [79,] 1118.2583 -1597.0904 [80,] -10781.8638 1118.2583 [81,] -2655.3480 -10781.8638 [82,] -17513.9636 -2655.3480 [83,] 1197.1032 -17513.9636 [84,] 6288.7613 1197.1032 [85,] -14557.0452 6288.7613 [86,] 22827.6331 -14557.0452 [87,] 1038.9262 22827.6331 [88,] -33782.4872 1038.9262 [89,] 47209.0439 -33782.4872 [90,] -26044.3752 47209.0439 [91,] 9183.5405 -26044.3752 [92,] -8889.5295 9183.5405 [93,] -9633.5764 -8889.5295 [94,] 9155.1768 -9633.5764 [95,] 22186.9560 9155.1768 [96,] 37698.8292 22186.9560 [97,] 20651.5222 37698.8292 [98,] -671.3812 20651.5222 [99,] 7958.8929 -671.3812 [100,] 24942.3857 7958.8929 [101,] 8426.3899 24942.3857 [102,] -14368.6228 8426.3899 [103,] 15599.1414 -14368.6228 [104,] -22997.3774 15599.1414 [105,] -3245.5534 -22997.3774 [106,] 554.5083 -3245.5534 [107,] -530.2395 554.5083 [108,] 104515.9938 -530.2395 [109,] 14442.2470 104515.9938 [110,] 5833.9207 14442.2470 [111,] -9537.7476 5833.9207 [112,] -18686.4909 -9537.7476 [113,] -7171.4471 -18686.4909 [114,] -6206.6332 -7171.4471 [115,] -13932.0300 -6206.6332 [116,] -51368.0584 -13932.0300 [117,] -19689.9029 -51368.0584 [118,] 11688.1524 -19689.9029 [119,] -10533.9971 11688.1524 [120,] -28164.0007 -10533.9971 [121,] 42591.3322 -28164.0007 [122,] 36169.0391 42591.3322 [123,] 21337.7726 36169.0391 [124,] -16439.0548 21337.7726 [125,] 14660.2875 -16439.0548 [126,] -12701.9693 14660.2875 [127,] 2703.0149 -12701.9693 [128,] -24711.3290 2703.0149 [129,] -11469.5832 -24711.3290 [130,] 46930.8204 -11469.5832 [131,] -7573.0819 46930.8204 [132,] -11937.8956 -7573.0819 [133,] 13494.4561 -11937.8956 [134,] -2648.7702 13494.4561 [135,] 43336.1119 -2648.7702 [136,] 27863.3575 43336.1119 [137,] 158.4339 27863.3575 [138,] -24365.6276 158.4339 [139,] -17739.0346 -24365.6276 [140,] 25805.0471 -17739.0346 [141,] -2613.0034 25805.0471 [142,] 13757.1718 -2613.0034 [143,] 15924.6077 13757.1718 [144,] -9091.8835 15924.6077 [145,] 40912.3946 -9091.8835 [146,] 23868.2824 40912.3946 [147,] 26411.0454 23868.2824 [148,] -17565.8039 26411.0454 [149,] -16459.2437 -17565.8039 [150,] -17623.8968 -16459.2437 [151,] -17647.3103 -17623.8968 [152,] -17685.5742 -17647.3103 [153,] -17715.5168 -17685.5742 [154,] -13844.9489 -17715.5168 [155,] -45689.2940 -13844.9489 [156,] -17805.3445 -45689.2940 [157,] -17831.5745 -17805.3445 [158,] -18841.1715 -17831.5745 [159,] -24804.9199 -18841.1715 [160,] -18649.8843 -24804.9199 [161,] -269.0883 -18649.8843 [162,] -17967.2782 -269.0883 [163,] 6468.4510 -17967.2782 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -14441.5508 11343.5566 2 3924.8670 -14441.5508 3 18830.8145 3924.8670 4 -14911.4097 18830.8145 5 17229.9427 -14911.4097 6 -13497.8490 17229.9427 7 5619.9520 -13497.8490 8 27984.4059 5619.9520 9 -5668.1170 27984.4059 10 -29795.0940 -5668.1170 11 14467.1165 -29795.0940 12 1860.5696 14467.1165 13 2383.6693 1860.5696 14 -16661.7686 2383.6693 15 -18933.1468 -16661.7686 16 24671.8994 -18933.1468 17 14605.1709 24671.8994 18 18760.7251 14605.1709 19 13112.5301 18760.7251 20 7556.9390 13112.5301 21 -21216.2005 7556.9390 22 -8248.7269 -21216.2005 23 16348.7036 -8248.7269 24 -3184.0890 16348.7036 25 -7477.1641 -3184.0890 26 -6965.1463 -7477.1641 27 -18354.5287 -6965.1463 28 -15260.6928 -18354.5287 29 -30598.9420 -15260.6928 30 5244.0261 -30598.9420 31 2816.7751 5244.0261 32 -28548.4429 2816.7751 33 12569.5222 -28548.4429 34 -24344.5803 12569.5222 35 -16131.1720 -24344.5803 36 -38222.3282 -16131.1720 37 -13080.2661 -38222.3282 38 -15602.7411 -13080.2661 39 -16393.8586 -15602.7411 40 -21764.3168 -16393.8586 41 -2482.9791 -21764.3168 42 -20598.7372 -2482.9791 43 -865.4062 -20598.7372 44 2199.2631 -865.4062 45 27635.2453 2199.2631 46 -16965.0779 27635.2453 47 -180.4066 -16965.0779 48 23364.2336 -180.4066 49 -2634.2558 23364.2336 50 -9897.3224 -2634.2558 51 -18023.7444 -9897.3224 52 775.7822 -18023.7444 53 2743.4249 775.7822 54 -10959.7434 2743.4249 55 1456.4420 -10959.7434 56 19593.8934 1456.4420 57 3402.3159 19593.8934 58 -18102.1071 3402.3159 59 10699.2054 -18102.1071 60 1743.6909 10699.2054 61 7386.9836 1743.6909 62 -11657.6331 7386.9836 63 9910.6587 -11657.6331 64 -3580.6918 9910.6587 65 -27677.0609 -3580.6918 66 35541.1099 -27677.0609 67 -9008.7692 35541.1099 68 9527.5996 -9008.7692 69 3197.3564 9527.5996 70 1562.2759 3197.3564 71 -6814.3677 1562.2759 72 -2406.4045 -6814.3677 73 11878.7040 -2406.4045 74 6721.6339 11878.7040 75 7718.0957 6721.6339 76 -8990.4730 7718.0957 77 143100.0487 -8990.4730 78 -1597.0904 143100.0487 79 1118.2583 -1597.0904 80 -10781.8638 1118.2583 81 -2655.3480 -10781.8638 82 -17513.9636 -2655.3480 83 1197.1032 -17513.9636 84 6288.7613 1197.1032 85 -14557.0452 6288.7613 86 22827.6331 -14557.0452 87 1038.9262 22827.6331 88 -33782.4872 1038.9262 89 47209.0439 -33782.4872 90 -26044.3752 47209.0439 91 9183.5405 -26044.3752 92 -8889.5295 9183.5405 93 -9633.5764 -8889.5295 94 9155.1768 -9633.5764 95 22186.9560 9155.1768 96 37698.8292 22186.9560 97 20651.5222 37698.8292 98 -671.3812 20651.5222 99 7958.8929 -671.3812 100 24942.3857 7958.8929 101 8426.3899 24942.3857 102 -14368.6228 8426.3899 103 15599.1414 -14368.6228 104 -22997.3774 15599.1414 105 -3245.5534 -22997.3774 106 554.5083 -3245.5534 107 -530.2395 554.5083 108 104515.9938 -530.2395 109 14442.2470 104515.9938 110 5833.9207 14442.2470 111 -9537.7476 5833.9207 112 -18686.4909 -9537.7476 113 -7171.4471 -18686.4909 114 -6206.6332 -7171.4471 115 -13932.0300 -6206.6332 116 -51368.0584 -13932.0300 117 -19689.9029 -51368.0584 118 11688.1524 -19689.9029 119 -10533.9971 11688.1524 120 -28164.0007 -10533.9971 121 42591.3322 -28164.0007 122 36169.0391 42591.3322 123 21337.7726 36169.0391 124 -16439.0548 21337.7726 125 14660.2875 -16439.0548 126 -12701.9693 14660.2875 127 2703.0149 -12701.9693 128 -24711.3290 2703.0149 129 -11469.5832 -24711.3290 130 46930.8204 -11469.5832 131 -7573.0819 46930.8204 132 -11937.8956 -7573.0819 133 13494.4561 -11937.8956 134 -2648.7702 13494.4561 135 43336.1119 -2648.7702 136 27863.3575 43336.1119 137 158.4339 27863.3575 138 -24365.6276 158.4339 139 -17739.0346 -24365.6276 140 25805.0471 -17739.0346 141 -2613.0034 25805.0471 142 13757.1718 -2613.0034 143 15924.6077 13757.1718 144 -9091.8835 15924.6077 145 40912.3946 -9091.8835 146 23868.2824 40912.3946 147 26411.0454 23868.2824 148 -17565.8039 26411.0454 149 -16459.2437 -17565.8039 150 -17623.8968 -16459.2437 151 -17647.3103 -17623.8968 152 -17685.5742 -17647.3103 153 -17715.5168 -17685.5742 154 -13844.9489 -17715.5168 155 -45689.2940 -13844.9489 156 -17805.3445 -45689.2940 157 -17831.5745 -17805.3445 158 -18841.1715 -17831.5745 159 -24804.9199 -18841.1715 160 -18649.8843 -24804.9199 161 -269.0883 -18649.8843 162 -17967.2782 -269.0883 163 6468.4510 -17967.2782 > 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/7zisa1321911448.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/8cz2y1321911448.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/9qnf21321911448.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/10v2d41321911448.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/11zywb1321911448.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/12drgw1321911448.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/13vhb61321911448.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/14ifch1321911448.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/15x4sa1321911448.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/164u8v1321911448.tab") + } > > try(system("convert tmp/1lrlh1321911448.ps tmp/1lrlh1321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/2b8nb1321911448.ps tmp/2b8nb1321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/39xkr1321911448.ps tmp/39xkr1321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/4beu41321911448.ps tmp/4beu41321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/5j41e1321911448.ps tmp/5j41e1321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/6a0361321911448.ps tmp/6a0361321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/7zisa1321911448.ps tmp/7zisa1321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/8cz2y1321911448.ps tmp/8cz2y1321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/9qnf21321911448.ps tmp/9qnf21321911448.png",intern=TRUE)) character(0) > try(system("convert tmp/10v2d41321911448.ps tmp/10v2d41321911448.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.732 0.536 5.288