R version 2.12.1 (2010-12-16) 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(95556 + ,21387 + ,114468 + ,127 + ,54565 + ,12341 + ,88594 + ,90 + ,63016 + ,11397 + ,74151 + ,68 + ,79774 + ,25533 + ,77921 + ,111 + ,31258 + ,6630 + ,53212 + ,51 + ,52491 + ,7745 + ,34956 + ,33 + ,91256 + ,25304 + ,149703 + ,123 + ,22807 + ,1271 + ,6853 + ,5 + ,77411 + ,18035 + ,58907 + ,63 + ,48821 + ,13284 + ,67067 + ,66 + ,52295 + ,15628 + ,110563 + ,99 + ,63262 + ,13990 + ,58126 + ,72 + ,50466 + ,8532 + ,57113 + ,55 + ,62932 + ,13953 + ,77993 + ,116 + ,38439 + ,7210 + ,68091 + ,71 + ,70817 + ,22436 + ,124676 + ,125 + ,105965 + ,20238 + ,109522 + ,123 + ,73795 + ,10244 + ,75865 + ,74 + ,82043 + ,17390 + ,79746 + ,116 + ,74349 + ,9917 + ,77844 + ,117 + ,82204 + ,29625 + ,98681 + ,98 + ,55709 + ,13193 + ,105531 + ,101 + ,37137 + ,6815 + ,51428 + ,43 + ,70780 + ,11807 + ,65703 + ,103 + ,55027 + ,21472 + ,72562 + ,107 + ,56699 + ,19589 + ,81728 + ,77 + ,65911 + ,12266 + ,95580 + ,87 + ,56316 + ,18391 + ,98278 + ,99 + ,26982 + ,6711 + ,46629 + ,46 + ,54628 + ,9004 + ,115189 + ,96 + ,96750 + ,34301 + ,124865 + ,92 + ,53009 + ,8061 + ,59392 + ,96 + ,64664 + ,19463 + ,127818 + ,96 + ,36990 + ,2053 + ,17821 + ,15 + ,85224 + ,29618 + ,154076 + ,147 + ,37048 + ,3963 + ,64881 + ,56 + ,59635 + ,17609 + ,136506 + ,81 + ,42051 + ,11738 + ,66524 + ,69 + ,26998 + ,11082 + ,45988 + ,34 + ,63717 + ,22648 + ,107445 + ,98 + ,55071 + ,16538 + ,102772 + ,82 + ,40001 + ,10149 + ,46657 + ,64 + ,54506 + ,19787 + ,97563 + ,61 + ,35838 + ,7740 + ,36663 + ,45 + ,50838 + ,5873 + ,55369 + ,37 + ,86997 + ,11694 + ,77921 + ,64 + ,33032 + ,7935 + ,56968 + ,21 + ,61704 + ,15093 + ,77519 + ,104 + ,117986 + ,14533 + ,129805 + ,126 + ,56733 + ,15834 + ,72761 + ,104 + ,55064 + ,15699 + ,81278 + ,87 + ,5950 + ,2694 + ,15049 + ,7 + ,84607 + ,13834 + ,113935 + ,130 + ,32551 + ,3597 + ,25109 + ,21 + ,31701 + ,5296 + ,45824 + ,35 + ,71170 + ,21637 + ,89644 + ,97 + ,101773 + ,18081 + ,109011 + ,103 + ,101653 + ,29016 + ,134245 + ,210 + ,81493 + ,27279 + ,136692 + ,151 + ,55901 + ,12889 + ,50741 + ,57 + ,109104 + ,21550 + ,149510 + ,117 + ,114425 + ,34042 + ,147888 + ,152 + ,36311 + ,8190 + ,54987 + ,52 + ,70027 + ,16163 + ,74467 + ,83 + ,73713 + ,23471 + ,100033 + ,87 + ,40671 + ,14220 + ,85505 + ,80 + ,89041 + ,12759 + ,62426 + ,88 + ,57231 + ,18142 + ,82932 + ,83 + ,68608 + ,12416 + ,72002 + ,120 + ,59155 + ,14069 + ,65469 + ,76 + ,55827 + ,11131 + ,63572 + ,70 + ,22618 + ,3007 + ,23824 + ,26 + ,58425 + ,12530 + ,73831 + ,66 + ,65724 + ,13205 + ,63551 + ,89 + ,56979 + ,13025 + ,56756 + ,100 + ,72369 + ,18778 + ,81399 + ,98 + ,79194 + ,19793 + ,117881 + ,109 + ,202316 + ,8238 + ,70711 + ,51 + ,44970 + ,11285 + ,50495 + ,82 + ,49319 + ,10490 + ,53845 + ,65 + ,36252 + ,10457 + ,51390 + ,46 + ,75741 + ,17313 + ,104953 + ,104 + ,38417 + ,9592 + ,65983 + ,36 + ,64102 + ,14282 + ,76839 + ,123 + ,56622 + ,7905 + ,55792 + ,59 + ,15430 + ,4525 + ,25155 + ,27 + ,72571 + ,21179 + ,55291 + ,84 + ,67271 + ,13724 + ,84279 + ,61 + ,43460 + ,18446 + ,99692 + ,46 + ,99501 + ,25961 + ,59633 + ,125 + ,28340 + ,6602 + ,63249 + ,58 + ,76013 + ,16795 + ,82928 + ,152 + ,37361 + ,5463 + ,50000 + ,52 + ,48204 + ,11299 + ,69455 + ,85 + ,76168 + ,20390 + ,84068 + ,95 + ,85168 + ,18558 + ,76195 + ,78 + ,125410 + ,26262 + ,114634 + ,144 + ,123328 + ,25267 + ,139357 + ,149 + ,83038 + ,21091 + ,110044 + ,101 + ,120087 + ,32425 + ,155118 + ,205 + ,91939 + ,24380 + ,83061 + ,61 + ,103646 + ,20460 + ,127122 + ,145 + ,29467 + ,6515 + ,45653 + ,28 + ,43750 + ,7409 + ,19630 + ,49 + ,34497 + ,12300 + ,67229 + ,68 + ,66477 + ,27127 + ,86060 + ,142 + ,71181 + ,27687 + ,88003 + ,82 + ,74482 + ,19255 + ,95815 + ,105 + ,174949 + ,15070 + ,85499 + ,52 + ,46765 + ,6291 + ,27220 + ,56 + ,90257 + ,16577 + ,109882 + ,81 + ,51370 + ,13027 + ,72579 + ,100 + ,1168 + ,238 + ,5841 + ,11 + ,51360 + ,17103 + ,68369 + ,87 + ,25162 + ,3913 + ,24610 + ,31 + ,21067 + ,5654 + ,30995 + ,67 + ,58233 + ,14354 + ,150662 + ,150 + ,855 + ,338 + ,6622 + ,4 + ,85903 + ,8852 + ,93694 + ,75 + ,14116 + ,3988 + ,13155 + ,39 + ,57637 + ,15964 + ,111908 + ,88 + ,94137 + ,14784 + ,57550 + ,67 + ,62147 + ,2667 + ,16356 + ,24 + ,62832 + ,7164 + ,40174 + ,58 + ,8773 + ,1888 + ,13983 + ,16 + ,63785 + ,12367 + ,52316 + ,49 + ,65196 + ,20505 + ,99585 + ,109 + ,73087 + ,18330 + ,86271 + ,124 + ,72631 + ,24993 + ,131012 + ,115 + ,86281 + ,11869 + ,130274 + ,128 + ,162365 + ,31156 + ,159051 + ,159 + ,56530 + ,15234 + ,76506 + ,75 + ,35606 + ,6645 + ,49145 + ,30 + ,70111 + ,15007 + ,66398 + ,83 + ,92046 + ,16597 + ,127546 + ,135 + ,63989 + ,317 + ,6802 + ,8 + ,104911 + ,27627 + ,99509 + ,115 + ,43448 + ,8658 + ,43106 + ,60 + ,60029 + ,20493 + ,108303 + ,99 + ,38650 + ,8877 + ,64167 + ,98 + ,47261 + ,867 + ,8579 + ,36 + ,73586 + ,13259 + ,97811 + ,93 + ,83042 + ,20613 + ,84365 + ,158 + ,37238 + ,2805 + ,10901 + ,16 + ,63958 + ,20588 + ,91346 + ,100 + ,78956 + ,9812 + ,33660 + ,49 + ,99518 + ,20001 + ,93634 + ,89 + ,111436 + ,23042 + ,109348 + ,153 + ,0 + ,0 + ,0 + ,0 + ,6023 + ,2065 + ,7953 + ,5 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42564 + ,10902 + ,63538 + ,80 + ,38885 + ,11309 + ,108281 + ,122 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1644 + ,556 + ,4245 + ,6 + ,6179 + ,2089 + ,21509 + ,13 + ,3926 + ,2658 + ,7670 + ,3 + ,23238 + ,1419 + ,10641 + ,18 + ,0 + ,0 + ,0 + ,0 + ,49288 + ,10699 + ,41243 + ,49) + ,dim=c(4 + ,164) + ,dimnames=list(c('Characters' + ,'Revisions' + ,'Seconds' + ,'Hyperlinks') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('Characters','Revisions','Seconds','Hyperlinks'),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' > #'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 Characters Revisions Seconds Hyperlinks 1 95556 21387 114468 127 2 54565 12341 88594 90 3 63016 11397 74151 68 4 79774 25533 77921 111 5 31258 6630 53212 51 6 52491 7745 34956 33 7 91256 25304 149703 123 8 22807 1271 6853 5 9 77411 18035 58907 63 10 48821 13284 67067 66 11 52295 15628 110563 99 12 63262 13990 58126 72 13 50466 8532 57113 55 14 62932 13953 77993 116 15 38439 7210 68091 71 16 70817 22436 124676 125 17 105965 20238 109522 123 18 73795 10244 75865 74 19 82043 17390 79746 116 20 74349 9917 77844 117 21 82204 29625 98681 98 22 55709 13193 105531 101 23 37137 6815 51428 43 24 70780 11807 65703 103 25 55027 21472 72562 107 26 56699 19589 81728 77 27 65911 12266 95580 87 28 56316 18391 98278 99 29 26982 6711 46629 46 30 54628 9004 115189 96 31 96750 34301 124865 92 32 53009 8061 59392 96 33 64664 19463 127818 96 34 36990 2053 17821 15 35 85224 29618 154076 147 36 37048 3963 64881 56 37 59635 17609 136506 81 38 42051 11738 66524 69 39 26998 11082 45988 34 40 63717 22648 107445 98 41 55071 16538 102772 82 42 40001 10149 46657 64 43 54506 19787 97563 61 44 35838 7740 36663 45 45 50838 5873 55369 37 46 86997 11694 77921 64 47 33032 7935 56968 21 48 61704 15093 77519 104 49 117986 14533 129805 126 50 56733 15834 72761 104 51 55064 15699 81278 87 52 5950 2694 15049 7 53 84607 13834 113935 130 54 32551 3597 25109 21 55 31701 5296 45824 35 56 71170 21637 89644 97 57 101773 18081 109011 103 58 101653 29016 134245 210 59 81493 27279 136692 151 60 55901 12889 50741 57 61 109104 21550 149510 117 62 114425 34042 147888 152 63 36311 8190 54987 52 64 70027 16163 74467 83 65 73713 23471 100033 87 66 40671 14220 85505 80 67 89041 12759 62426 88 68 57231 18142 82932 83 69 68608 12416 72002 120 70 59155 14069 65469 76 71 55827 11131 63572 70 72 22618 3007 23824 26 73 58425 12530 73831 66 74 65724 13205 63551 89 75 56979 13025 56756 100 76 72369 18778 81399 98 77 79194 19793 117881 109 78 202316 8238 70711 51 79 44970 11285 50495 82 80 49319 10490 53845 65 81 36252 10457 51390 46 82 75741 17313 104953 104 83 38417 9592 65983 36 84 64102 14282 76839 123 85 56622 7905 55792 59 86 15430 4525 25155 27 87 72571 21179 55291 84 88 67271 13724 84279 61 89 43460 18446 99692 46 90 99501 25961 59633 125 91 28340 6602 63249 58 92 76013 16795 82928 152 93 37361 5463 50000 52 94 48204 11299 69455 85 95 76168 20390 84068 95 96 85168 18558 76195 78 97 125410 26262 114634 144 98 123328 25267 139357 149 99 83038 21091 110044 101 100 120087 32425 155118 205 101 91939 24380 83061 61 102 103646 20460 127122 145 103 29467 6515 45653 28 104 43750 7409 19630 49 105 34497 12300 67229 68 106 66477 27127 86060 142 107 71181 27687 88003 82 108 74482 19255 95815 105 109 174949 15070 85499 52 110 46765 6291 27220 56 111 90257 16577 109882 81 112 51370 13027 72579 100 113 1168 238 5841 11 114 51360 17103 68369 87 115 25162 3913 24610 31 116 21067 5654 30995 67 117 58233 14354 150662 150 118 855 338 6622 4 119 85903 8852 93694 75 120 14116 3988 13155 39 121 57637 15964 111908 88 122 94137 14784 57550 67 123 62147 2667 16356 24 124 62832 7164 40174 58 125 8773 1888 13983 16 126 63785 12367 52316 49 127 65196 20505 99585 109 128 73087 18330 86271 124 129 72631 24993 131012 115 130 86281 11869 130274 128 131 162365 31156 159051 159 132 56530 15234 76506 75 133 35606 6645 49145 30 134 70111 15007 66398 83 135 92046 16597 127546 135 136 63989 317 6802 8 137 104911 27627 99509 115 138 43448 8658 43106 60 139 60029 20493 108303 99 140 38650 8877 64167 98 141 47261 867 8579 36 142 73586 13259 97811 93 143 83042 20613 84365 158 144 37238 2805 10901 16 145 63958 20588 91346 100 146 78956 9812 33660 49 147 99518 20001 93634 89 148 111436 23042 109348 153 149 0 0 0 0 150 6023 2065 7953 5 151 0 0 0 0 152 0 0 0 0 153 0 0 0 0 154 0 0 0 0 155 42564 10902 63538 80 156 38885 11309 108281 122 157 0 0 0 0 158 0 0 0 0 159 1644 556 4245 6 160 6179 2089 21509 13 161 3926 2658 7670 3 162 23238 1419 10641 18 163 0 0 0 0 164 49288 10699 41243 49 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Revisions Seconds Hyperlinks 1.336e+04 1.351e+00 2.401e-01 1.418e+02 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -33047 -13360 -4042 7549 153619 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.336e+04 3.585e+03 3.726 0.000269 *** Revisions 1.351e+00 4.174e-01 3.237 0.001470 ** Seconds 2.401e-01 9.616e-02 2.497 0.013547 * Hyperlinks 1.418e+02 8.395e+01 1.689 0.093206 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 21960 on 160 degrees of freedom Multiple R-squared: 0.5784, Adjusted R-squared: 0.5705 F-statistic: 73.17 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,] 2.174427e-01 4.348853e-01 7.825573e-01 [2,] 1.030408e-01 2.060816e-01 8.969592e-01 [3,] 5.639000e-02 1.127800e-01 9.436100e-01 [4,] 3.628582e-02 7.257163e-02 9.637142e-01 [5,] 3.125493e-02 6.250985e-02 9.687451e-01 [6,] 1.480032e-02 2.960065e-02 9.851997e-01 [7,] 7.028611e-03 1.405722e-02 9.929714e-01 [8,] 2.970581e-03 5.941162e-03 9.970294e-01 [9,] 1.272312e-03 2.544624e-03 9.987277e-01 [10,] 9.345067e-04 1.869013e-03 9.990655e-01 [11,] 6.192237e-03 1.238447e-02 9.938078e-01 [12,] 9.744432e-03 1.948886e-02 9.902556e-01 [13,] 5.609822e-03 1.121964e-02 9.943902e-01 [14,] 3.789219e-03 7.578437e-03 9.962108e-01 [15,] 2.424749e-03 4.849497e-03 9.975753e-01 [16,] 1.508192e-03 3.016383e-03 9.984918e-01 [17,] 7.827912e-04 1.565582e-03 9.992172e-01 [18,] 3.922334e-04 7.844667e-04 9.996078e-01 [19,] 1.141374e-03 2.282748e-03 9.988586e-01 [20,] 7.554920e-04 1.510984e-03 9.992445e-01 [21,] 4.161497e-04 8.322993e-04 9.995839e-01 [22,] 3.644654e-04 7.289309e-04 9.996355e-01 [23,] 3.134839e-04 6.269679e-04 9.996865e-01 [24,] 1.669084e-04 3.338169e-04 9.998331e-01 [25,] 1.010844e-04 2.021687e-04 9.998989e-01 [26,] 5.175838e-05 1.035168e-04 9.999482e-01 [27,] 2.960217e-05 5.920434e-05 9.999704e-01 [28,] 1.908768e-05 3.817535e-05 9.999809e-01 [29,] 1.442968e-05 2.885937e-05 9.999856e-01 [30,] 7.090739e-06 1.418148e-05 9.999929e-01 [31,] 3.889913e-06 7.779826e-06 9.999961e-01 [32,] 2.832388e-06 5.664776e-06 9.999972e-01 [33,] 3.007434e-06 6.014868e-06 9.999970e-01 [34,] 2.104681e-06 4.209363e-06 9.999979e-01 [35,] 1.193064e-06 2.386128e-06 9.999988e-01 [36,] 7.612674e-07 1.522535e-06 9.999992e-01 [37,] 4.218434e-07 8.436868e-07 9.999996e-01 [38,] 2.105590e-07 4.211180e-07 9.999998e-01 [39,] 1.951077e-07 3.902155e-07 9.999998e-01 [40,] 2.797037e-06 5.594075e-06 9.999972e-01 [41,] 1.475605e-06 2.951211e-06 9.999985e-01 [42,] 7.853210e-07 1.570642e-06 9.999992e-01 [43,] 2.097057e-05 4.194114e-05 9.999790e-01 [44,] 1.468127e-05 2.936254e-05 9.999853e-01 [45,] 9.312777e-06 1.862555e-05 9.999907e-01 [46,] 8.581839e-06 1.716368e-05 9.999914e-01 [47,] 5.042593e-06 1.008519e-05 9.999950e-01 [48,] 2.824928e-06 5.649856e-06 9.999972e-01 [49,] 1.538078e-06 3.076156e-06 9.999985e-01 [50,] 8.275338e-07 1.655068e-06 9.999992e-01 [51,] 2.153309e-06 4.306618e-06 9.999978e-01 [52,] 1.695077e-06 3.390154e-06 9.999983e-01 [53,] 1.584547e-06 3.169094e-06 9.999984e-01 [54,] 9.206639e-07 1.841328e-06 9.999991e-01 [55,] 1.313299e-06 2.626598e-06 9.999987e-01 [56,] 8.792701e-07 1.758540e-06 9.999991e-01 [57,] 5.318909e-07 1.063782e-06 9.999995e-01 [58,] 3.163676e-07 6.327351e-07 9.999997e-01 [59,] 1.802235e-07 3.604470e-07 9.999998e-01 [60,] 2.384602e-07 4.769205e-07 9.999998e-01 [61,] 7.367681e-07 1.473536e-06 9.999993e-01 [62,] 4.766437e-07 9.532874e-07 9.999995e-01 [63,] 2.597183e-07 5.194366e-07 9.999997e-01 [64,] 1.376426e-07 2.752852e-07 9.999999e-01 [65,] 7.236803e-08 1.447361e-07 9.999999e-01 [66,] 3.976982e-08 7.953963e-08 1.000000e+00 [67,] 2.089290e-08 4.178580e-08 1.000000e+00 [68,] 1.128659e-08 2.257318e-08 1.000000e+00 [69,] 5.836566e-09 1.167313e-08 1.000000e+00 [70,] 2.932147e-09 5.864293e-09 1.000000e+00 [71,] 1.511600e-09 3.023199e-09 1.000000e+00 [72,] 6.434125e-01 7.131749e-01 3.565875e-01 [73,] 6.058598e-01 7.882804e-01 3.941402e-01 [74,] 5.616390e-01 8.767220e-01 4.383610e-01 [75,] 5.285654e-01 9.428693e-01 4.714346e-01 [76,] 4.837451e-01 9.674901e-01 5.162549e-01 [77,] 4.490020e-01 8.980040e-01 5.509980e-01 [78,] 4.062144e-01 8.124288e-01 5.937856e-01 [79,] 3.724961e-01 7.449922e-01 6.275039e-01 [80,] 3.506985e-01 7.013970e-01 6.493015e-01 [81,] 3.169533e-01 6.339066e-01 6.830467e-01 [82,] 2.803842e-01 5.607685e-01 7.196158e-01 [83,] 3.182993e-01 6.365986e-01 6.817007e-01 [84,] 3.117572e-01 6.235144e-01 6.882428e-01 [85,] 3.001535e-01 6.003071e-01 6.998465e-01 [86,] 2.656676e-01 5.313352e-01 7.343324e-01 [87,] 2.309044e-01 4.618088e-01 7.690956e-01 [88,] 2.032183e-01 4.064367e-01 7.967817e-01 [89,] 1.742761e-01 3.485522e-01 8.257239e-01 [90,] 1.609116e-01 3.218232e-01 8.390884e-01 [91,] 1.804883e-01 3.609766e-01 8.195117e-01 [92,] 1.765537e-01 3.531074e-01 8.234463e-01 [93,] 1.506156e-01 3.012312e-01 8.493844e-01 [94,] 1.254673e-01 2.509346e-01 8.745327e-01 [95,] 1.144998e-01 2.289996e-01 8.855002e-01 [96,] 9.932079e-02 1.986416e-01 9.006792e-01 [97,] 8.434422e-02 1.686884e-01 9.156558e-01 [98,] 7.118233e-02 1.423647e-01 9.288177e-01 [99,] 7.221008e-02 1.444202e-01 9.277899e-01 [100,] 7.624559e-02 1.524912e-01 9.237544e-01 [101,] 8.764261e-02 1.752852e-01 9.123574e-01 [102,] 7.258868e-02 1.451774e-01 9.274113e-01 [103,] 9.147981e-01 1.704038e-01 8.520190e-02 [104,] 8.996281e-01 2.007438e-01 1.003719e-01 [105,] 8.912502e-01 2.174996e-01 1.087498e-01 [106,] 8.737405e-01 2.525190e-01 1.262595e-01 [107,] 8.576219e-01 2.847562e-01 1.423781e-01 [108,] 8.519340e-01 2.961319e-01 1.480660e-01 [109,] 8.211852e-01 3.576295e-01 1.788148e-01 [110,] 8.086418e-01 3.827165e-01 1.913582e-01 [111,] 8.245101e-01 3.509798e-01 1.754899e-01 [112,] 8.028813e-01 3.942374e-01 1.971187e-01 [113,] 8.527662e-01 2.944675e-01 1.472338e-01 [114,] 8.384293e-01 3.231415e-01 1.615707e-01 [115,] 8.157950e-01 3.684101e-01 1.842050e-01 [116,] 8.625187e-01 2.749626e-01 1.374813e-01 [117,] 9.261121e-01 1.477758e-01 7.388792e-02 [118,] 9.298973e-01 1.402054e-01 7.010268e-02 [119,] 9.137747e-01 1.724507e-01 8.622533e-02 [120,] 8.999880e-01 2.000240e-01 1.000120e-01 [121,] 8.961545e-01 2.076911e-01 1.038455e-01 [122,] 8.748313e-01 2.503374e-01 1.251687e-01 [123,] 8.992933e-01 2.014134e-01 1.007067e-01 [124,] 8.917101e-01 2.165797e-01 1.082899e-01 [125,] 9.505581e-01 9.888377e-02 4.944188e-02 [126,] 9.342725e-01 1.314550e-01 6.572748e-02 [127,] 9.138326e-01 1.723347e-01 8.616737e-02 [128,] 8.880291e-01 2.239419e-01 1.119709e-01 [129,] 8.874208e-01 2.251584e-01 1.125792e-01 [130,] 9.907875e-01 1.842490e-02 9.212451e-03 [131,] 9.863828e-01 2.723445e-02 1.361723e-02 [132,] 9.788497e-01 4.230067e-02 2.115033e-02 [133,] 9.804707e-01 3.905857e-02 1.952928e-02 [134,] 9.719067e-01 5.618656e-02 2.809328e-02 [135,] 9.940073e-01 1.198547e-02 5.992737e-03 [136,] 9.948815e-01 1.023703e-02 5.118515e-03 [137,] 9.969620e-01 6.075908e-03 3.037954e-03 [138,] 9.979483e-01 4.103380e-03 2.051690e-03 [139,] 9.999020e-01 1.959032e-04 9.795161e-05 [140,] 9.999989e-01 2.133426e-06 1.066713e-06 [141,] 9.999999e-01 2.426506e-07 1.213253e-07 [142,] 9.999994e-01 1.160305e-06 5.801527e-07 [143,] 9.999974e-01 5.234696e-06 2.617348e-06 [144,] 9.999883e-01 2.344447e-05 1.172224e-05 [145,] 9.999511e-01 9.778264e-05 4.889132e-05 [146,] 9.998055e-01 3.889164e-04 1.944582e-04 [147,] 9.992669e-01 1.466163e-03 7.330813e-04 [148,] 9.974001e-01 5.199780e-03 2.599890e-03 [149,] 9.944374e-01 1.112512e-02 5.562560e-03 [150,] 9.991333e-01 1.733485e-03 8.667427e-04 [151,] 9.936435e-01 1.271298e-02 6.356489e-03 > postscript(file="/var/www/rcomp/tmp/1rip61321953372.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/2qfq91321953372.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/34hwe1321953372.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/4bcer1321953372.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/5uo2k1321953372.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 7813.7792 -9498.0024 6815.1045 -2526.6632 -11065.1491 15596.5226 7 8 9 10 11 12 -9670.4413 5376.0291 16610.7881 -7944.9475 -22759.2720 6838.1421 13 14 15 16 17 18 4069.5101 -4450.0287 -11075.5981 -20509.6670 21529.6897 17889.6371 19 20 21 22 23 24 9596.6415 12313.6850 -8766.0475 -15130.9901 -3873.5237 11091.0688 25 26 27 28 29 30 -19933.4231 -13664.6217 697.4350 -19521.6998 -13161.1942 -12162.3944 31 32 33 34 35 36 -5973.1206 888.6428 -19288.7616 14451.4620 -25983.3975 -5182.4348 37 38 39 40 41 42 -21772.1028 -12921.2469 -17195.2356 -19931.0760 -16931.9123 -7345.7968 43 44 45 46 47 48 -17658.3650 -3160.9264 11004.6529 30056.8570 -7702.5441 -5403.0139 49 50 51 52 53 54 35963.2779 -10232.7963 -11353.9257 -15654.7745 6771.6649 5326.0557 55 56 57 58 59 60 -4777.6330 -6696.6582 23210.1580 -12912.1960 -22947.8466 4864.3682 61 62 63 64 65 66 14146.3192 -1982.5782 -8687.6750 5184.5457 -7707.8591 -23771.1333 67 68 69 70 71 72 30979.3786 -12317.4454 4173.7143 294.3407 2241.7725 -4210.2402 73 74 75 76 77 78 1053.7876 6647.9458 -1782.0899 202.6316 -4662.0343 153619.1606 79 80 81 82 83 84 -7385.0719 -356.0078 -10095.1654 -951.7741 -8847.2768 -4439.9277 85 86 87 88 89 90 10822.6266 -13910.4255 5413.9109 6487.1676 -25277.0625 19027.8324 91 92 93 94 95 96 -17347.5249 -1497.5881 -2756.1355 -9147.3429 1608.3428 17383.8903 97 98 99 100 101 102 28631.4087 21249.1451 444.1387 -3386.2149 17051.1065 11566.0718 103 104 105 106 107 108 -7625.0026 8720.5036 -21261.9993 -24326.4723 -12338.6348 -2782.3424 109 110 111 112 113 114 113329.8232 10431.2292 16636.1750 -11192.6573 -15475.0892 -13855.5023 115 116 117 118 119 120 -3787.8804 -16872.0884 -31958.1004 -15118.2267 27456.0015 -13319.2857 121 122 123 124 125 126 -16634.5322 37487.6279 37854.6252 21925.1629 -12762.9547 14209.7202 127 128 129 130 131 132 -15229.3661 -3330.1261 -22253.5918 7461.2360 46183.9296 -6412.6361 133 134 135 136 137 138 -2783.5754 8767.5726 6501.0875 47433.8031 14031.2161 -464.7556 139 140 141 142 143 144 -21055.3992 -16002.7599 25566.2261 5644.5515 -822.4797 15203.1006 145 146 147 148 149 150 -13325.4061 37311.6062 24037.9263 19000.7530 -13359.6121 -12744.7755 151 152 153 154 155 156 -13359.6121 -13359.6121 -13359.6121 -13359.6121 -12121.4964 -33047.3126 157 158 159 160 161 162 -13359.6121 -13359.6121 -14336.6304 -17010.0452 -15291.4240 2854.4753 163 164 -13359.6121 4624.6854 > postscript(file="/var/www/rcomp/tmp/6w0j41321953372.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 7813.7792 NA 1 -9498.0024 7813.7792 2 6815.1045 -9498.0024 3 -2526.6632 6815.1045 4 -11065.1491 -2526.6632 5 15596.5226 -11065.1491 6 -9670.4413 15596.5226 7 5376.0291 -9670.4413 8 16610.7881 5376.0291 9 -7944.9475 16610.7881 10 -22759.2720 -7944.9475 11 6838.1421 -22759.2720 12 4069.5101 6838.1421 13 -4450.0287 4069.5101 14 -11075.5981 -4450.0287 15 -20509.6670 -11075.5981 16 21529.6897 -20509.6670 17 17889.6371 21529.6897 18 9596.6415 17889.6371 19 12313.6850 9596.6415 20 -8766.0475 12313.6850 21 -15130.9901 -8766.0475 22 -3873.5237 -15130.9901 23 11091.0688 -3873.5237 24 -19933.4231 11091.0688 25 -13664.6217 -19933.4231 26 697.4350 -13664.6217 27 -19521.6998 697.4350 28 -13161.1942 -19521.6998 29 -12162.3944 -13161.1942 30 -5973.1206 -12162.3944 31 888.6428 -5973.1206 32 -19288.7616 888.6428 33 14451.4620 -19288.7616 34 -25983.3975 14451.4620 35 -5182.4348 -25983.3975 36 -21772.1028 -5182.4348 37 -12921.2469 -21772.1028 38 -17195.2356 -12921.2469 39 -19931.0760 -17195.2356 40 -16931.9123 -19931.0760 41 -7345.7968 -16931.9123 42 -17658.3650 -7345.7968 43 -3160.9264 -17658.3650 44 11004.6529 -3160.9264 45 30056.8570 11004.6529 46 -7702.5441 30056.8570 47 -5403.0139 -7702.5441 48 35963.2779 -5403.0139 49 -10232.7963 35963.2779 50 -11353.9257 -10232.7963 51 -15654.7745 -11353.9257 52 6771.6649 -15654.7745 53 5326.0557 6771.6649 54 -4777.6330 5326.0557 55 -6696.6582 -4777.6330 56 23210.1580 -6696.6582 57 -12912.1960 23210.1580 58 -22947.8466 -12912.1960 59 4864.3682 -22947.8466 60 14146.3192 4864.3682 61 -1982.5782 14146.3192 62 -8687.6750 -1982.5782 63 5184.5457 -8687.6750 64 -7707.8591 5184.5457 65 -23771.1333 -7707.8591 66 30979.3786 -23771.1333 67 -12317.4454 30979.3786 68 4173.7143 -12317.4454 69 294.3407 4173.7143 70 2241.7725 294.3407 71 -4210.2402 2241.7725 72 1053.7876 -4210.2402 73 6647.9458 1053.7876 74 -1782.0899 6647.9458 75 202.6316 -1782.0899 76 -4662.0343 202.6316 77 153619.1606 -4662.0343 78 -7385.0719 153619.1606 79 -356.0078 -7385.0719 80 -10095.1654 -356.0078 81 -951.7741 -10095.1654 82 -8847.2768 -951.7741 83 -4439.9277 -8847.2768 84 10822.6266 -4439.9277 85 -13910.4255 10822.6266 86 5413.9109 -13910.4255 87 6487.1676 5413.9109 88 -25277.0625 6487.1676 89 19027.8324 -25277.0625 90 -17347.5249 19027.8324 91 -1497.5881 -17347.5249 92 -2756.1355 -1497.5881 93 -9147.3429 -2756.1355 94 1608.3428 -9147.3429 95 17383.8903 1608.3428 96 28631.4087 17383.8903 97 21249.1451 28631.4087 98 444.1387 21249.1451 99 -3386.2149 444.1387 100 17051.1065 -3386.2149 101 11566.0718 17051.1065 102 -7625.0026 11566.0718 103 8720.5036 -7625.0026 104 -21261.9993 8720.5036 105 -24326.4723 -21261.9993 106 -12338.6348 -24326.4723 107 -2782.3424 -12338.6348 108 113329.8232 -2782.3424 109 10431.2292 113329.8232 110 16636.1750 10431.2292 111 -11192.6573 16636.1750 112 -15475.0892 -11192.6573 113 -13855.5023 -15475.0892 114 -3787.8804 -13855.5023 115 -16872.0884 -3787.8804 116 -31958.1004 -16872.0884 117 -15118.2267 -31958.1004 118 27456.0015 -15118.2267 119 -13319.2857 27456.0015 120 -16634.5322 -13319.2857 121 37487.6279 -16634.5322 122 37854.6252 37487.6279 123 21925.1629 37854.6252 124 -12762.9547 21925.1629 125 14209.7202 -12762.9547 126 -15229.3661 14209.7202 127 -3330.1261 -15229.3661 128 -22253.5918 -3330.1261 129 7461.2360 -22253.5918 130 46183.9296 7461.2360 131 -6412.6361 46183.9296 132 -2783.5754 -6412.6361 133 8767.5726 -2783.5754 134 6501.0875 8767.5726 135 47433.8031 6501.0875 136 14031.2161 47433.8031 137 -464.7556 14031.2161 138 -21055.3992 -464.7556 139 -16002.7599 -21055.3992 140 25566.2261 -16002.7599 141 5644.5515 25566.2261 142 -822.4797 5644.5515 143 15203.1006 -822.4797 144 -13325.4061 15203.1006 145 37311.6062 -13325.4061 146 24037.9263 37311.6062 147 19000.7530 24037.9263 148 -13359.6121 19000.7530 149 -12744.7755 -13359.6121 150 -13359.6121 -12744.7755 151 -13359.6121 -13359.6121 152 -13359.6121 -13359.6121 153 -13359.6121 -13359.6121 154 -12121.4964 -13359.6121 155 -33047.3126 -12121.4964 156 -13359.6121 -33047.3126 157 -13359.6121 -13359.6121 158 -14336.6304 -13359.6121 159 -17010.0452 -14336.6304 160 -15291.4240 -17010.0452 161 2854.4753 -15291.4240 162 -13359.6121 2854.4753 163 4624.6854 -13359.6121 164 NA 4624.6854 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -9498.0024 7813.7792 [2,] 6815.1045 -9498.0024 [3,] -2526.6632 6815.1045 [4,] -11065.1491 -2526.6632 [5,] 15596.5226 -11065.1491 [6,] -9670.4413 15596.5226 [7,] 5376.0291 -9670.4413 [8,] 16610.7881 5376.0291 [9,] -7944.9475 16610.7881 [10,] -22759.2720 -7944.9475 [11,] 6838.1421 -22759.2720 [12,] 4069.5101 6838.1421 [13,] -4450.0287 4069.5101 [14,] -11075.5981 -4450.0287 [15,] -20509.6670 -11075.5981 [16,] 21529.6897 -20509.6670 [17,] 17889.6371 21529.6897 [18,] 9596.6415 17889.6371 [19,] 12313.6850 9596.6415 [20,] -8766.0475 12313.6850 [21,] -15130.9901 -8766.0475 [22,] -3873.5237 -15130.9901 [23,] 11091.0688 -3873.5237 [24,] -19933.4231 11091.0688 [25,] -13664.6217 -19933.4231 [26,] 697.4350 -13664.6217 [27,] -19521.6998 697.4350 [28,] -13161.1942 -19521.6998 [29,] -12162.3944 -13161.1942 [30,] -5973.1206 -12162.3944 [31,] 888.6428 -5973.1206 [32,] -19288.7616 888.6428 [33,] 14451.4620 -19288.7616 [34,] -25983.3975 14451.4620 [35,] -5182.4348 -25983.3975 [36,] -21772.1028 -5182.4348 [37,] -12921.2469 -21772.1028 [38,] -17195.2356 -12921.2469 [39,] -19931.0760 -17195.2356 [40,] -16931.9123 -19931.0760 [41,] -7345.7968 -16931.9123 [42,] -17658.3650 -7345.7968 [43,] -3160.9264 -17658.3650 [44,] 11004.6529 -3160.9264 [45,] 30056.8570 11004.6529 [46,] -7702.5441 30056.8570 [47,] -5403.0139 -7702.5441 [48,] 35963.2779 -5403.0139 [49,] -10232.7963 35963.2779 [50,] -11353.9257 -10232.7963 [51,] -15654.7745 -11353.9257 [52,] 6771.6649 -15654.7745 [53,] 5326.0557 6771.6649 [54,] -4777.6330 5326.0557 [55,] -6696.6582 -4777.6330 [56,] 23210.1580 -6696.6582 [57,] -12912.1960 23210.1580 [58,] -22947.8466 -12912.1960 [59,] 4864.3682 -22947.8466 [60,] 14146.3192 4864.3682 [61,] -1982.5782 14146.3192 [62,] -8687.6750 -1982.5782 [63,] 5184.5457 -8687.6750 [64,] -7707.8591 5184.5457 [65,] -23771.1333 -7707.8591 [66,] 30979.3786 -23771.1333 [67,] -12317.4454 30979.3786 [68,] 4173.7143 -12317.4454 [69,] 294.3407 4173.7143 [70,] 2241.7725 294.3407 [71,] -4210.2402 2241.7725 [72,] 1053.7876 -4210.2402 [73,] 6647.9458 1053.7876 [74,] -1782.0899 6647.9458 [75,] 202.6316 -1782.0899 [76,] -4662.0343 202.6316 [77,] 153619.1606 -4662.0343 [78,] -7385.0719 153619.1606 [79,] -356.0078 -7385.0719 [80,] -10095.1654 -356.0078 [81,] -951.7741 -10095.1654 [82,] -8847.2768 -951.7741 [83,] -4439.9277 -8847.2768 [84,] 10822.6266 -4439.9277 [85,] -13910.4255 10822.6266 [86,] 5413.9109 -13910.4255 [87,] 6487.1676 5413.9109 [88,] -25277.0625 6487.1676 [89,] 19027.8324 -25277.0625 [90,] -17347.5249 19027.8324 [91,] -1497.5881 -17347.5249 [92,] -2756.1355 -1497.5881 [93,] -9147.3429 -2756.1355 [94,] 1608.3428 -9147.3429 [95,] 17383.8903 1608.3428 [96,] 28631.4087 17383.8903 [97,] 21249.1451 28631.4087 [98,] 444.1387 21249.1451 [99,] -3386.2149 444.1387 [100,] 17051.1065 -3386.2149 [101,] 11566.0718 17051.1065 [102,] -7625.0026 11566.0718 [103,] 8720.5036 -7625.0026 [104,] -21261.9993 8720.5036 [105,] -24326.4723 -21261.9993 [106,] -12338.6348 -24326.4723 [107,] -2782.3424 -12338.6348 [108,] 113329.8232 -2782.3424 [109,] 10431.2292 113329.8232 [110,] 16636.1750 10431.2292 [111,] -11192.6573 16636.1750 [112,] -15475.0892 -11192.6573 [113,] -13855.5023 -15475.0892 [114,] -3787.8804 -13855.5023 [115,] -16872.0884 -3787.8804 [116,] -31958.1004 -16872.0884 [117,] -15118.2267 -31958.1004 [118,] 27456.0015 -15118.2267 [119,] -13319.2857 27456.0015 [120,] -16634.5322 -13319.2857 [121,] 37487.6279 -16634.5322 [122,] 37854.6252 37487.6279 [123,] 21925.1629 37854.6252 [124,] -12762.9547 21925.1629 [125,] 14209.7202 -12762.9547 [126,] -15229.3661 14209.7202 [127,] -3330.1261 -15229.3661 [128,] -22253.5918 -3330.1261 [129,] 7461.2360 -22253.5918 [130,] 46183.9296 7461.2360 [131,] -6412.6361 46183.9296 [132,] -2783.5754 -6412.6361 [133,] 8767.5726 -2783.5754 [134,] 6501.0875 8767.5726 [135,] 47433.8031 6501.0875 [136,] 14031.2161 47433.8031 [137,] -464.7556 14031.2161 [138,] -21055.3992 -464.7556 [139,] -16002.7599 -21055.3992 [140,] 25566.2261 -16002.7599 [141,] 5644.5515 25566.2261 [142,] -822.4797 5644.5515 [143,] 15203.1006 -822.4797 [144,] -13325.4061 15203.1006 [145,] 37311.6062 -13325.4061 [146,] 24037.9263 37311.6062 [147,] 19000.7530 24037.9263 [148,] -13359.6121 19000.7530 [149,] -12744.7755 -13359.6121 [150,] -13359.6121 -12744.7755 [151,] -13359.6121 -13359.6121 [152,] -13359.6121 -13359.6121 [153,] -13359.6121 -13359.6121 [154,] -12121.4964 -13359.6121 [155,] -33047.3126 -12121.4964 [156,] -13359.6121 -33047.3126 [157,] -13359.6121 -13359.6121 [158,] -14336.6304 -13359.6121 [159,] -17010.0452 -14336.6304 [160,] -15291.4240 -17010.0452 [161,] 2854.4753 -15291.4240 [162,] -13359.6121 2854.4753 [163,] 4624.6854 -13359.6121 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -9498.0024 7813.7792 2 6815.1045 -9498.0024 3 -2526.6632 6815.1045 4 -11065.1491 -2526.6632 5 15596.5226 -11065.1491 6 -9670.4413 15596.5226 7 5376.0291 -9670.4413 8 16610.7881 5376.0291 9 -7944.9475 16610.7881 10 -22759.2720 -7944.9475 11 6838.1421 -22759.2720 12 4069.5101 6838.1421 13 -4450.0287 4069.5101 14 -11075.5981 -4450.0287 15 -20509.6670 -11075.5981 16 21529.6897 -20509.6670 17 17889.6371 21529.6897 18 9596.6415 17889.6371 19 12313.6850 9596.6415 20 -8766.0475 12313.6850 21 -15130.9901 -8766.0475 22 -3873.5237 -15130.9901 23 11091.0688 -3873.5237 24 -19933.4231 11091.0688 25 -13664.6217 -19933.4231 26 697.4350 -13664.6217 27 -19521.6998 697.4350 28 -13161.1942 -19521.6998 29 -12162.3944 -13161.1942 30 -5973.1206 -12162.3944 31 888.6428 -5973.1206 32 -19288.7616 888.6428 33 14451.4620 -19288.7616 34 -25983.3975 14451.4620 35 -5182.4348 -25983.3975 36 -21772.1028 -5182.4348 37 -12921.2469 -21772.1028 38 -17195.2356 -12921.2469 39 -19931.0760 -17195.2356 40 -16931.9123 -19931.0760 41 -7345.7968 -16931.9123 42 -17658.3650 -7345.7968 43 -3160.9264 -17658.3650 44 11004.6529 -3160.9264 45 30056.8570 11004.6529 46 -7702.5441 30056.8570 47 -5403.0139 -7702.5441 48 35963.2779 -5403.0139 49 -10232.7963 35963.2779 50 -11353.9257 -10232.7963 51 -15654.7745 -11353.9257 52 6771.6649 -15654.7745 53 5326.0557 6771.6649 54 -4777.6330 5326.0557 55 -6696.6582 -4777.6330 56 23210.1580 -6696.6582 57 -12912.1960 23210.1580 58 -22947.8466 -12912.1960 59 4864.3682 -22947.8466 60 14146.3192 4864.3682 61 -1982.5782 14146.3192 62 -8687.6750 -1982.5782 63 5184.5457 -8687.6750 64 -7707.8591 5184.5457 65 -23771.1333 -7707.8591 66 30979.3786 -23771.1333 67 -12317.4454 30979.3786 68 4173.7143 -12317.4454 69 294.3407 4173.7143 70 2241.7725 294.3407 71 -4210.2402 2241.7725 72 1053.7876 -4210.2402 73 6647.9458 1053.7876 74 -1782.0899 6647.9458 75 202.6316 -1782.0899 76 -4662.0343 202.6316 77 153619.1606 -4662.0343 78 -7385.0719 153619.1606 79 -356.0078 -7385.0719 80 -10095.1654 -356.0078 81 -951.7741 -10095.1654 82 -8847.2768 -951.7741 83 -4439.9277 -8847.2768 84 10822.6266 -4439.9277 85 -13910.4255 10822.6266 86 5413.9109 -13910.4255 87 6487.1676 5413.9109 88 -25277.0625 6487.1676 89 19027.8324 -25277.0625 90 -17347.5249 19027.8324 91 -1497.5881 -17347.5249 92 -2756.1355 -1497.5881 93 -9147.3429 -2756.1355 94 1608.3428 -9147.3429 95 17383.8903 1608.3428 96 28631.4087 17383.8903 97 21249.1451 28631.4087 98 444.1387 21249.1451 99 -3386.2149 444.1387 100 17051.1065 -3386.2149 101 11566.0718 17051.1065 102 -7625.0026 11566.0718 103 8720.5036 -7625.0026 104 -21261.9993 8720.5036 105 -24326.4723 -21261.9993 106 -12338.6348 -24326.4723 107 -2782.3424 -12338.6348 108 113329.8232 -2782.3424 109 10431.2292 113329.8232 110 16636.1750 10431.2292 111 -11192.6573 16636.1750 112 -15475.0892 -11192.6573 113 -13855.5023 -15475.0892 114 -3787.8804 -13855.5023 115 -16872.0884 -3787.8804 116 -31958.1004 -16872.0884 117 -15118.2267 -31958.1004 118 27456.0015 -15118.2267 119 -13319.2857 27456.0015 120 -16634.5322 -13319.2857 121 37487.6279 -16634.5322 122 37854.6252 37487.6279 123 21925.1629 37854.6252 124 -12762.9547 21925.1629 125 14209.7202 -12762.9547 126 -15229.3661 14209.7202 127 -3330.1261 -15229.3661 128 -22253.5918 -3330.1261 129 7461.2360 -22253.5918 130 46183.9296 7461.2360 131 -6412.6361 46183.9296 132 -2783.5754 -6412.6361 133 8767.5726 -2783.5754 134 6501.0875 8767.5726 135 47433.8031 6501.0875 136 14031.2161 47433.8031 137 -464.7556 14031.2161 138 -21055.3992 -464.7556 139 -16002.7599 -21055.3992 140 25566.2261 -16002.7599 141 5644.5515 25566.2261 142 -822.4797 5644.5515 143 15203.1006 -822.4797 144 -13325.4061 15203.1006 145 37311.6062 -13325.4061 146 24037.9263 37311.6062 147 19000.7530 24037.9263 148 -13359.6121 19000.7530 149 -12744.7755 -13359.6121 150 -13359.6121 -12744.7755 151 -13359.6121 -13359.6121 152 -13359.6121 -13359.6121 153 -13359.6121 -13359.6121 154 -12121.4964 -13359.6121 155 -33047.3126 -12121.4964 156 -13359.6121 -33047.3126 157 -13359.6121 -13359.6121 158 -14336.6304 -13359.6121 159 -17010.0452 -14336.6304 160 -15291.4240 -17010.0452 161 2854.4753 -15291.4240 162 -13359.6121 2854.4753 163 4624.6854 -13359.6121 > 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/7sm6c1321953372.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/8gnb81321953372.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/961ew1321953372.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/10g46l1321953372.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/11l3zx1321953372.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/12fep91321953372.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/133suz1321953372.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/14td4m1321953372.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/15zayf1321953372.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/16yan51321953372.tab") + } > > try(system("convert tmp/1rip61321953372.ps tmp/1rip61321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/2qfq91321953372.ps tmp/2qfq91321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/34hwe1321953372.ps tmp/34hwe1321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/4bcer1321953372.ps tmp/4bcer1321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/5uo2k1321953372.ps tmp/5uo2k1321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/6w0j41321953372.ps tmp/6w0j41321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/7sm6c1321953372.ps tmp/7sm6c1321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/8gnb81321953372.ps tmp/8gnb81321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/961ew1321953372.ps tmp/961ew1321953372.png",intern=TRUE)) character(0) > try(system("convert tmp/10g46l1321953372.ps tmp/10g46l1321953372.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.240 0.652 7.370