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(95556 + ,114468 + ,127 + ,128 + ,54565 + ,88594 + ,90 + ,89 + ,63016 + ,74151 + ,68 + ,68 + ,79774 + ,77921 + ,111 + ,108 + ,31258 + ,53212 + ,51 + ,51 + ,52491 + ,34956 + ,33 + ,33 + ,91256 + ,149703 + ,123 + ,119 + ,22807 + ,6853 + ,5 + ,5 + ,77411 + ,58907 + ,63 + ,63 + ,48821 + ,67067 + ,66 + ,66 + ,52295 + ,110563 + ,99 + ,98 + ,63262 + ,58126 + ,72 + ,71 + ,50466 + ,57113 + ,55 + ,55 + ,62932 + ,77993 + ,116 + ,116 + ,38439 + ,68091 + ,71 + ,71 + ,70817 + ,124676 + ,125 + ,120 + ,105965 + ,109522 + ,123 + ,122 + ,73795 + ,75865 + ,74 + ,74 + ,82043 + ,79746 + ,116 + ,111 + ,74349 + ,77844 + ,117 + ,103 + ,82204 + ,98681 + ,98 + ,98 + ,55709 + ,105531 + ,101 + ,100 + ,37137 + ,51428 + ,43 + ,42 + ,70780 + ,65703 + ,103 + ,100 + ,55027 + ,72562 + ,107 + ,105 + ,56699 + ,81728 + ,77 + ,77 + ,65911 + ,95580 + ,87 + ,83 + ,56316 + ,98278 + ,99 + ,98 + ,26982 + ,46629 + ,46 + ,46 + ,54628 + ,115189 + ,96 + ,95 + ,96750 + ,124865 + ,92 + ,91 + ,53009 + ,59392 + ,96 + ,91 + ,64664 + ,127818 + ,96 + ,94 + ,36990 + ,17821 + ,15 + ,15 + ,85224 + ,154076 + ,147 + ,137 + ,37048 + ,64881 + ,56 + ,56 + ,59635 + ,136506 + ,81 + ,78 + ,42051 + ,66524 + ,69 + ,68 + ,26998 + ,45988 + ,34 + ,34 + ,63717 + ,107445 + ,98 + ,94 + ,55071 + ,102772 + ,82 + ,82 + ,40001 + ,46657 + ,64 + ,63 + ,54506 + ,97563 + ,61 + ,58 + ,35838 + ,36663 + ,45 + ,43 + ,50838 + ,55369 + ,37 + ,36 + ,86997 + ,77921 + ,64 + ,64 + ,33032 + ,56968 + ,21 + ,21 + ,61704 + ,77519 + ,104 + ,104 + ,117986 + ,129805 + ,126 + ,124 + ,56733 + ,72761 + ,104 + ,101 + ,55064 + ,81278 + ,87 + ,85 + ,5950 + ,15049 + ,7 + ,7 + ,84607 + ,113935 + ,130 + ,124 + ,32551 + ,25109 + ,21 + ,21 + ,31701 + ,45824 + ,35 + ,35 + ,71170 + ,89644 + ,97 + ,95 + ,101773 + ,109011 + ,103 + ,102 + ,101653 + ,134245 + ,210 + ,212 + ,81493 + ,136692 + ,151 + ,141 + ,55901 + ,50741 + ,57 + ,54 + ,109104 + ,149510 + ,117 + ,117 + ,114425 + ,147888 + ,152 + ,145 + ,36311 + ,54987 + ,52 + ,50 + ,70027 + ,74467 + ,83 + ,80 + ,73713 + ,100033 + ,87 + ,87 + ,40671 + ,85505 + ,80 + ,78 + ,89041 + ,62426 + ,88 + ,86 + ,57231 + ,82932 + ,83 + ,82 + ,68608 + ,72002 + ,120 + ,119 + ,59155 + ,65469 + ,76 + ,75 + ,55827 + ,63572 + ,70 + ,70 + ,22618 + ,23824 + ,26 + ,25 + ,58425 + ,73831 + ,66 + ,66 + ,65724 + ,63551 + ,89 + ,89 + ,56979 + ,56756 + ,100 + ,99 + ,72369 + ,81399 + ,98 + ,98 + ,79194 + ,117881 + ,109 + ,104 + ,202316 + ,70711 + ,51 + ,48 + ,44970 + ,50495 + ,82 + ,81 + ,49319 + ,53845 + ,65 + ,64 + ,36252 + ,51390 + ,46 + ,44 + ,75741 + ,104953 + ,104 + ,104 + ,38417 + ,65983 + ,36 + ,36 + ,64102 + ,76839 + ,123 + ,120 + ,56622 + ,55792 + ,59 + ,58 + ,15430 + ,25155 + ,27 + ,27 + ,72571 + ,55291 + ,84 + ,84 + ,67271 + ,84279 + ,61 + ,56 + ,43460 + ,99692 + ,46 + ,46 + ,99501 + ,59633 + ,125 + ,119 + ,28340 + ,63249 + ,58 + ,57 + ,76013 + ,82928 + ,152 + ,139 + ,37361 + ,50000 + ,52 + ,51 + ,48204 + ,69455 + ,85 + ,85 + ,76168 + ,84068 + ,95 + ,91 + ,85168 + ,76195 + ,78 + ,79 + ,125410 + ,114634 + ,144 + ,142 + ,123328 + ,139357 + ,149 + ,149 + ,83038 + ,110044 + ,101 + ,96 + ,120087 + ,155118 + ,205 + ,198 + ,91939 + ,83061 + ,61 + ,61 + ,103646 + ,127122 + ,145 + ,145 + ,29467 + ,45653 + ,28 + ,26 + ,43750 + ,19630 + ,49 + ,49 + ,34497 + ,67229 + ,68 + ,68 + ,66477 + ,86060 + ,142 + ,145 + ,71181 + ,88003 + ,82 + ,82 + ,74482 + ,95815 + ,105 + ,102 + ,174949 + ,85499 + ,52 + ,52 + ,46765 + ,27220 + ,56 + ,56 + ,90257 + ,109882 + ,81 + ,80 + ,51370 + ,72579 + ,100 + ,99 + ,1168 + ,5841 + ,11 + ,11 + ,51360 + ,68369 + ,87 + ,87 + ,25162 + ,24610 + ,31 + ,28 + ,21067 + ,30995 + ,67 + ,67 + ,58233 + ,150662 + ,150 + ,150 + ,855 + ,6622 + ,4 + ,4 + ,85903 + ,93694 + ,75 + ,71 + ,14116 + ,13155 + ,39 + ,39 + ,57637 + ,111908 + ,88 + ,87 + ,94137 + ,57550 + ,67 + ,66 + ,62147 + ,16356 + ,24 + ,23 + ,62832 + ,40174 + ,58 + ,56 + ,8773 + ,13983 + ,16 + ,16 + ,63785 + ,52316 + ,49 + ,49 + ,65196 + ,99585 + ,109 + ,108 + ,73087 + ,86271 + ,124 + ,112 + ,72631 + ,131012 + ,115 + ,110 + ,86281 + ,130274 + ,128 + ,126 + ,162365 + ,159051 + ,159 + ,155 + ,56530 + ,76506 + ,75 + ,75 + ,35606 + ,49145 + ,30 + ,30 + ,70111 + ,66398 + ,83 + ,78 + ,92046 + ,127546 + ,135 + ,135 + ,63989 + ,6802 + ,8 + ,8 + ,104911 + ,99509 + ,115 + ,114 + ,43448 + ,43106 + ,60 + ,60 + ,60029 + ,108303 + ,99 + ,99 + ,38650 + ,64167 + ,98 + ,98 + ,47261 + ,8579 + ,36 + ,33 + ,73586 + ,97811 + ,93 + ,93 + ,83042 + ,84365 + ,158 + ,157 + ,37238 + ,10901 + ,16 + ,15 + ,63958 + ,91346 + ,100 + ,98 + ,78956 + ,33660 + ,49 + ,49 + ,99518 + ,93634 + ,89 + ,88 + ,111436 + ,109348 + ,153 + ,151 + ,0 + ,0 + ,0 + ,0 + ,6023 + ,7953 + ,5 + ,5 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42564 + ,63538 + ,80 + ,80 + ,38885 + ,108281 + ,122 + ,122 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1644 + ,4245 + ,6 + ,6 + ,6179 + ,21509 + ,13 + ,13 + ,3926 + ,7670 + ,3 + ,3 + ,23238 + ,10641 + ,18 + ,18 + ,0 + ,0 + ,0 + ,0 + ,49288 + ,41243 + ,49 + ,48) + ,dim=c(4 + ,164) + ,dimnames=list(c('Characters' + ,'Seconds' + ,'Hyperlinks' + ,'Blogs') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('Characters','Seconds','Hyperlinks','Blogs'),1:164)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > 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 Seconds Characters Hyperlinks Blogs 1 114468 95556 127 128 2 88594 54565 90 89 3 74151 63016 68 68 4 77921 79774 111 108 5 53212 31258 51 51 6 34956 52491 33 33 7 149703 91256 123 119 8 6853 22807 5 5 9 58907 77411 63 63 10 67067 48821 66 66 11 110563 52295 99 98 12 58126 63262 72 71 13 57113 50466 55 55 14 77993 62932 116 116 15 68091 38439 71 71 16 124676 70817 125 120 17 109522 105965 123 122 18 75865 73795 74 74 19 79746 82043 116 111 20 77844 74349 117 103 21 98681 82204 98 98 22 105531 55709 101 100 23 51428 37137 43 42 24 65703 70780 103 100 25 72562 55027 107 105 26 81728 56699 77 77 27 95580 65911 87 83 28 98278 56316 99 98 29 46629 26982 46 46 30 115189 54628 96 95 31 124865 96750 92 91 32 59392 53009 96 91 33 127818 64664 96 94 34 17821 36990 15 15 35 154076 85224 147 137 36 64881 37048 56 56 37 136506 59635 81 78 38 66524 42051 69 68 39 45988 26998 34 34 40 107445 63717 98 94 41 102772 55071 82 82 42 46657 40001 64 63 43 97563 54506 61 58 44 36663 35838 45 43 45 55369 50838 37 36 46 77921 86997 64 64 47 56968 33032 21 21 48 77519 61704 104 104 49 129805 117986 126 124 50 72761 56733 104 101 51 81278 55064 87 85 52 15049 5950 7 7 53 113935 84607 130 124 54 25109 32551 21 21 55 45824 31701 35 35 56 89644 71170 97 95 57 109011 101773 103 102 58 134245 101653 210 212 59 136692 81493 151 141 60 50741 55901 57 54 61 149510 109104 117 117 62 147888 114425 152 145 63 54987 36311 52 50 64 74467 70027 83 80 65 100033 73713 87 87 66 85505 40671 80 78 67 62426 89041 88 86 68 82932 57231 83 82 69 72002 68608 120 119 70 65469 59155 76 75 71 63572 55827 70 70 72 23824 22618 26 25 73 73831 58425 66 66 74 63551 65724 89 89 75 56756 56979 100 99 76 81399 72369 98 98 77 117881 79194 109 104 78 70711 202316 51 48 79 50495 44970 82 81 80 53845 49319 65 64 81 51390 36252 46 44 82 104953 75741 104 104 83 65983 38417 36 36 84 76839 64102 123 120 85 55792 56622 59 58 86 25155 15430 27 27 87 55291 72571 84 84 88 84279 67271 61 56 89 99692 43460 46 46 90 59633 99501 125 119 91 63249 28340 58 57 92 82928 76013 152 139 93 50000 37361 52 51 94 69455 48204 85 85 95 84068 76168 95 91 96 76195 85168 78 79 97 114634 125410 144 142 98 139357 123328 149 149 99 110044 83038 101 96 100 155118 120087 205 198 101 83061 91939 61 61 102 127122 103646 145 145 103 45653 29467 28 26 104 19630 43750 49 49 105 67229 34497 68 68 106 86060 66477 142 145 107 88003 71181 82 82 108 95815 74482 105 102 109 85499 174949 52 52 110 27220 46765 56 56 111 109882 90257 81 80 112 72579 51370 100 99 113 5841 1168 11 11 114 68369 51360 87 87 115 24610 25162 31 28 116 30995 21067 67 67 117 150662 58233 150 150 118 6622 855 4 4 119 93694 85903 75 71 120 13155 14116 39 39 121 111908 57637 88 87 122 57550 94137 67 66 123 16356 62147 24 23 124 40174 62832 58 56 125 13983 8773 16 16 126 52316 63785 49 49 127 99585 65196 109 108 128 86271 73087 124 112 129 131012 72631 115 110 130 130274 86281 128 126 131 159051 162365 159 155 132 76506 56530 75 75 133 49145 35606 30 30 134 66398 70111 83 78 135 127546 92046 135 135 136 6802 63989 8 8 137 99509 104911 115 114 138 43106 43448 60 60 139 108303 60029 99 99 140 64167 38650 98 98 141 8579 47261 36 33 142 97811 73586 93 93 143 84365 83042 158 157 144 10901 37238 16 15 145 91346 63958 100 98 146 33660 78956 49 49 147 93634 99518 89 88 148 109348 111436 153 151 149 0 0 0 0 150 7953 6023 5 5 151 0 0 0 0 152 0 0 0 0 153 0 0 0 0 154 0 0 0 0 155 63538 42564 80 80 156 108281 38885 122 122 157 0 0 0 0 158 0 0 0 0 159 4245 1644 6 6 160 21509 6179 13 13 161 7670 3926 3 3 162 10641 23238 18 18 163 0 0 0 0 164 41243 49288 49 48 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Characters Hyperlinks Blogs 5972.7674 0.2724 253.2831 396.0328 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -52227 -11553 -2033 10714 62885 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.973e+03 3.225e+03 1.852 0.0659 . Characters 2.723e-01 6.319e-02 4.310 2.85e-05 *** Hyperlinks 2.533e+02 6.403e+02 0.396 0.6930 Blogs 3.960e+02 6.532e+02 0.606 0.5452 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 19130 on 160 degrees of freedom Multiple R-squared: 0.7741, Adjusted R-squared: 0.7699 F-statistic: 182.8 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,] 0.8169160 3.661679e-01 1.830840e-01 [2,] 0.7007387 5.985227e-01 2.992613e-01 [3,] 0.5749631 8.500738e-01 4.250369e-01 [4,] 0.4497071 8.994141e-01 5.502929e-01 [5,] 0.3898838 7.797675e-01 6.101162e-01 [6,] 0.3400857 6.801714e-01 6.599143e-01 [7,] 0.2492217 4.984433e-01 7.507783e-01 [8,] 0.3797260 7.594521e-01 6.202740e-01 [9,] 0.2947933 5.895866e-01 7.052067e-01 [10,] 0.2279547 4.559094e-01 7.720453e-01 [11,] 0.1676907 3.353813e-01 8.323093e-01 [12,] 0.1240744 2.481489e-01 8.759256e-01 [13,] 0.2600001 5.200001e-01 7.399999e-01 [14,] 0.2487800 4.975600e-01 7.512200e-01 [15,] 0.1971638 3.943277e-01 8.028362e-01 [16,] 0.1695027 3.390054e-01 8.304973e-01 [17,] 0.1346426 2.692852e-01 8.653574e-01 [18,] 0.1852737 3.705474e-01 8.147263e-01 [19,] 0.2110246 4.220492e-01 7.889754e-01 [20,] 0.1740609 3.481218e-01 8.259391e-01 [21,] 0.1801730 3.603459e-01 8.198270e-01 [22,] 0.1484995 2.969990e-01 8.515005e-01 [23,] 0.1138679 2.277358e-01 8.861321e-01 [24,] 0.1571052 3.142105e-01 8.428948e-01 [25,] 0.2715564 5.431128e-01 7.284436e-01 [26,] 0.2835048 5.670096e-01 7.164952e-01 [27,] 0.4766039 9.532078e-01 5.233961e-01 [28,] 0.4249093 8.498186e-01 5.750907e-01 [29,] 0.5335458 9.329085e-01 4.664542e-01 [30,] 0.4933825 9.867649e-01 5.066175e-01 [31,] 0.8790153 2.419694e-01 1.209847e-01 [32,] 0.8505817 2.988365e-01 1.494183e-01 [33,] 0.8245290 3.509421e-01 1.754710e-01 [34,] 0.8201515 3.596969e-01 1.798485e-01 [35,] 0.8364700 3.270601e-01 1.635300e-01 [36,] 0.8249716 3.500567e-01 1.750284e-01 [37,] 0.8959764 2.080471e-01 1.040236e-01 [38,] 0.8779170 2.441659e-01 1.220830e-01 [39,] 0.8590377 2.819246e-01 1.409623e-01 [40,] 0.8308305 3.383389e-01 1.691695e-01 [41,] 0.8573985 2.852031e-01 1.426015e-01 [42,] 0.8548470 2.903061e-01 1.451530e-01 [43,] 0.8304341 3.391319e-01 1.695659e-01 [44,] 0.8299625 3.400750e-01 1.700375e-01 [45,] 0.7992361 4.015279e-01 2.007639e-01 [46,] 0.7642469 4.715062e-01 2.357531e-01 [47,] 0.7284711 5.430579e-01 2.715289e-01 [48,] 0.6925689 6.148622e-01 3.074311e-01 [49,] 0.6550574 6.898851e-01 3.449426e-01 [50,] 0.6130853 7.738295e-01 3.869147e-01 [51,] 0.5732841 8.534317e-01 4.267159e-01 [52,] 0.6839949 6.320102e-01 3.160051e-01 [53,] 0.6663942 6.672116e-01 3.336058e-01 [54,] 0.6416605 7.166790e-01 3.583395e-01 [55,] 0.7378985 5.242030e-01 2.621015e-01 [56,] 0.7224942 5.550117e-01 2.775058e-01 [57,] 0.6872041 6.255918e-01 3.127959e-01 [58,] 0.6555468 6.889065e-01 3.444532e-01 [59,] 0.6424069 7.151861e-01 3.575931e-01 [60,] 0.6386904 7.226191e-01 3.613096e-01 [61,] 0.6955703 6.088593e-01 3.044297e-01 [62,] 0.6619630 6.760740e-01 3.380370e-01 [63,] 0.7242859 5.514283e-01 2.757141e-01 [64,] 0.6923902 6.152195e-01 3.076098e-01 [65,] 0.6548804 6.902392e-01 3.451196e-01 [66,] 0.6194430 7.611140e-01 3.805570e-01 [67,] 0.5846980 8.306040e-01 4.153020e-01 [68,] 0.5855494 8.289012e-01 4.144506e-01 [69,] 0.6415663 7.168674e-01 3.584337e-01 [70,] 0.6069506 7.860987e-01 3.930494e-01 [71,] 0.6253441 7.493117e-01 3.746559e-01 [72,] 0.6769365 6.461270e-01 3.230635e-01 [73,] 0.6870333 6.259335e-01 3.129667e-01 [74,] 0.6541349 6.917303e-01 3.458651e-01 [75,] 0.6190866 7.618267e-01 3.809134e-01 [76,] 0.5910740 8.178521e-01 4.089260e-01 [77,] 0.6290068 7.419863e-01 3.709932e-01 [78,] 0.6578218 6.843565e-01 3.421782e-01 [79,] 0.6185387 7.629226e-01 3.814613e-01 [80,] 0.5783659 8.432682e-01 4.216341e-01 [81,] 0.6089929 7.820141e-01 3.910071e-01 [82,] 0.6410455 7.179091e-01 3.589545e-01 [83,] 0.8747509 2.504982e-01 1.252491e-01 [84,] 0.9677274 6.454528e-02 3.227264e-02 [85,] 0.9642998 7.140043e-02 3.570022e-02 [86,] 0.9817669 3.646614e-02 1.823307e-02 [87,] 0.9763852 4.722970e-02 2.361485e-02 [88,] 0.9695863 6.082730e-02 3.041365e-02 [89,] 0.9607753 7.844933e-02 3.922467e-02 [90,] 0.9502284 9.954319e-02 4.977160e-02 [91,] 0.9479753 1.040495e-01 5.202475e-02 [92,] 0.9353913 1.292174e-01 6.460869e-02 [93,] 0.9365648 1.268704e-01 6.343520e-02 [94,] 0.9308844 1.382311e-01 6.911556e-02 [95,] 0.9260868 1.478263e-01 7.391315e-02 [96,] 0.9079959 1.840081e-01 9.200407e-02 [97,] 0.9059740 1.880520e-01 9.402599e-02 [98,] 0.9316930 1.366140e-01 6.830702e-02 [99,] 0.9197743 1.604513e-01 8.022567e-02 [100,] 0.9535925 9.281490e-02 4.640745e-02 [101,] 0.9451273 1.097455e-01 5.487273e-02 [102,] 0.9307347 1.385307e-01 6.926534e-02 [103,] 0.9165964 1.668072e-01 8.340360e-02 [104,] 0.9358620 1.282760e-01 6.413799e-02 [105,] 0.9615350 7.693000e-02 3.846500e-02 [106,] 0.9560591 8.788179e-02 4.394090e-02 [107,] 0.9456013 1.087973e-01 5.439867e-02 [108,] 0.9335062 1.329876e-01 6.649379e-02 [109,] 0.9180011 1.639979e-01 8.199895e-02 [110,] 0.9371079 1.257842e-01 6.289209e-02 [111,] 0.9528240 9.435193e-02 4.717596e-02 [112,] 0.9396385 1.207229e-01 6.036146e-02 [113,] 0.9521757 9.564865e-02 4.782432e-02 [114,] 0.9576104 8.477913e-02 4.238956e-02 [115,] 0.9838106 3.237887e-02 1.618943e-02 [116,] 0.9796917 4.061651e-02 2.030826e-02 [117,] 0.9772852 4.542966e-02 2.271483e-02 [118,] 0.9748855 5.022893e-02 2.511446e-02 [119,] 0.9656110 6.877797e-02 3.438899e-02 [120,] 0.9538026 9.239485e-02 4.619742e-02 [121,] 0.9401167 1.197666e-01 5.988329e-02 [122,] 0.9358491 1.283019e-01 6.415094e-02 [123,] 0.9767544 4.649126e-02 2.324563e-02 [124,] 0.9840970 3.180598e-02 1.590299e-02 [125,] 0.9900682 1.986369e-02 9.931845e-03 [126,] 0.9873546 2.529078e-02 1.264539e-02 [127,] 0.9897833 2.043345e-02 1.021673e-02 [128,] 0.9916618 1.667639e-02 8.338196e-03 [129,] 0.9898791 2.024174e-02 1.012087e-02 [130,] 0.9886979 2.260410e-02 1.130205e-02 [131,] 0.9828264 3.434717e-02 1.717359e-02 [132,] 0.9775313 4.493745e-02 2.246873e-02 [133,] 0.9898966 2.020677e-02 1.010338e-02 [134,] 0.9875001 2.499974e-02 1.249987e-02 [135,] 0.9850472 2.990569e-02 1.495284e-02 [136,] 0.9924859 1.502829e-02 7.514143e-03 [137,] 0.9999699 6.015430e-05 3.007715e-05 [138,] 0.9999280 1.440729e-04 7.203645e-05 [139,] 0.9999149 1.701244e-04 8.506219e-05 [140,] 0.9999911 1.770117e-05 8.850586e-06 [141,] 0.9999998 3.467132e-07 1.733566e-07 [142,] 0.9999999 1.267509e-07 6.337546e-08 [143,] 0.9999997 6.642546e-07 3.321273e-07 [144,] 0.9999988 2.382964e-06 1.191482e-06 [145,] 0.9999939 1.229238e-05 6.146189e-06 [146,] 0.9999699 6.010049e-05 3.005025e-05 [147,] 0.9998617 2.766331e-04 1.383166e-04 [148,] 0.9994061 1.187765e-03 5.938826e-04 [149,] 0.9975018 4.996357e-03 2.498179e-03 [150,] 0.9958006 8.398734e-03 4.199367e-03 [151,] 0.9794086 4.118286e-02 2.059143e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1v08d1321972386.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/24z971321972386.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/3nl0u1321972386.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/4kgeg1321972386.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/5w9a91321972386.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 -388.6385 9718.0315 6862.3167 -20664.2184 5610.9910 -6740.1373 7 8 9 10 11 12 40594.8961 -8577.8421 -9055.5871 4942.9621 26461.4233 -11430.9125 13 14 15 16 17 18 1683.4212 -20439.9717 5547.9239 20231.8662 -4780.2041 1744.7563 19 20 21 22 23 24 -21911.6955 -18803.2522 6686.9791 19200.9872 7816.4036 -25238.1715 25 26 27 28 29 30 -17082.1327 10315.9104 16749.9906 13081.3024 3439.1409 32399.9777 31 32 33 34 35 36 33201.2992 -21371.9557 42691.7022 -7965.7470 33403.3276 12456.5026 37 38 39 40 41 42 62885.1244 4691.8591 10585.5748 22070.0518 28556.7170 -11370.2429 43 44 45 46 47 48 38325.3285 -7497.4123 11921.8269 6698.3462 28363.3201 -12787.7340 49 50 51 52 53 54 10676.9571 -15003.7818 4610.1094 2910.5362 2884.6077 -3364.6794 55 56 57 58 59 60 8491.3950 2096.4747 8836.8078 -36561.4158 14438.2030 -6279.3364 61 62 63 64 65 66 37852.7510 14827.7461 6152.5543 -3282.7726 17493.9816 17302.2599 67 68 69 70 71 72 -24144.8551 7875.1571 -30178.0634 -5566.6333 -3057.3884 -4794.9701 73 74 75 76 77 78 9091.3091 -18110.8432 -29270.5818 -7916.4550 21544.4424 -22289.6203 79 80 81 82 83 84 -20573.2390 -7369.3196 6467.5187 10823.2839 26171.9740 -25269.7348 85 86 87 88 89 90 -3515.3986 -2551.6644 -24989.0464 22356.8417 52014.3515 -52227.1990 91 92 93 94 95 96 12293.5305 -37294.5344 483.5536 -4838.0008 -2750.0348 -4015.9811 97 98 99 100 101 102 -18203.6592 3047.7288 17855.0552 -13898.0472 12440.3386 -1229.6074 103 104 105 106 107 108 14266.1031 -30074.5779 7707.4769 -31408.7670 9400.1525 2566.9555 109 110 111 112 113 114 -1885.6221 -27850.9260 27129.1456 -11919.9686 -7592.3482 -8082.1705 115 116 117 118 119 120 -7156.3436 -24219.5416 31432.0603 -2180.8908 17210.9534 -21985.5875 121 122 123 124 125 126 33494.0031 -17169.1504 -21730.0760 -19779.3456 -4768.1525 -2845.1176 127 128 129 130 131 132 5476.6716 -15369.8234 32566.9822 18482.1937 7200.9592 6438.5695 133 134 135 136 137 138 13995.4466 -10582.5844 8846.8165 -21792.7230 -9311.6191 -13658.8036 139 140 141 142 143 144 21699.0327 -15965.0728 -32452.5942 11410.6744 -46420.1749 -15206.5730 145 146 147 148 149 150 3814.7178 -25632.9451 3164.3812 -25527.6787 -5972.7674 -2906.7135 151 152 153 154 155 156 -5972.7674 -5972.7674 -5972.7674 -5972.7674 -5972.3650 12501.3420 157 158 159 160 161 162 -5972.7674 -5972.7674 -6071.4072 5412.2722 -1319.9629 -13348.3325 163 164 -5972.7674 -9573.8215 > postscript(file="/var/wessaorg/rcomp/tmp/6l8i71321972386.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 -388.6385 NA 1 9718.0315 -388.6385 2 6862.3167 9718.0315 3 -20664.2184 6862.3167 4 5610.9910 -20664.2184 5 -6740.1373 5610.9910 6 40594.8961 -6740.1373 7 -8577.8421 40594.8961 8 -9055.5871 -8577.8421 9 4942.9621 -9055.5871 10 26461.4233 4942.9621 11 -11430.9125 26461.4233 12 1683.4212 -11430.9125 13 -20439.9717 1683.4212 14 5547.9239 -20439.9717 15 20231.8662 5547.9239 16 -4780.2041 20231.8662 17 1744.7563 -4780.2041 18 -21911.6955 1744.7563 19 -18803.2522 -21911.6955 20 6686.9791 -18803.2522 21 19200.9872 6686.9791 22 7816.4036 19200.9872 23 -25238.1715 7816.4036 24 -17082.1327 -25238.1715 25 10315.9104 -17082.1327 26 16749.9906 10315.9104 27 13081.3024 16749.9906 28 3439.1409 13081.3024 29 32399.9777 3439.1409 30 33201.2992 32399.9777 31 -21371.9557 33201.2992 32 42691.7022 -21371.9557 33 -7965.7470 42691.7022 34 33403.3276 -7965.7470 35 12456.5026 33403.3276 36 62885.1244 12456.5026 37 4691.8591 62885.1244 38 10585.5748 4691.8591 39 22070.0518 10585.5748 40 28556.7170 22070.0518 41 -11370.2429 28556.7170 42 38325.3285 -11370.2429 43 -7497.4123 38325.3285 44 11921.8269 -7497.4123 45 6698.3462 11921.8269 46 28363.3201 6698.3462 47 -12787.7340 28363.3201 48 10676.9571 -12787.7340 49 -15003.7818 10676.9571 50 4610.1094 -15003.7818 51 2910.5362 4610.1094 52 2884.6077 2910.5362 53 -3364.6794 2884.6077 54 8491.3950 -3364.6794 55 2096.4747 8491.3950 56 8836.8078 2096.4747 57 -36561.4158 8836.8078 58 14438.2030 -36561.4158 59 -6279.3364 14438.2030 60 37852.7510 -6279.3364 61 14827.7461 37852.7510 62 6152.5543 14827.7461 63 -3282.7726 6152.5543 64 17493.9816 -3282.7726 65 17302.2599 17493.9816 66 -24144.8551 17302.2599 67 7875.1571 -24144.8551 68 -30178.0634 7875.1571 69 -5566.6333 -30178.0634 70 -3057.3884 -5566.6333 71 -4794.9701 -3057.3884 72 9091.3091 -4794.9701 73 -18110.8432 9091.3091 74 -29270.5818 -18110.8432 75 -7916.4550 -29270.5818 76 21544.4424 -7916.4550 77 -22289.6203 21544.4424 78 -20573.2390 -22289.6203 79 -7369.3196 -20573.2390 80 6467.5187 -7369.3196 81 10823.2839 6467.5187 82 26171.9740 10823.2839 83 -25269.7348 26171.9740 84 -3515.3986 -25269.7348 85 -2551.6644 -3515.3986 86 -24989.0464 -2551.6644 87 22356.8417 -24989.0464 88 52014.3515 22356.8417 89 -52227.1990 52014.3515 90 12293.5305 -52227.1990 91 -37294.5344 12293.5305 92 483.5536 -37294.5344 93 -4838.0008 483.5536 94 -2750.0348 -4838.0008 95 -4015.9811 -2750.0348 96 -18203.6592 -4015.9811 97 3047.7288 -18203.6592 98 17855.0552 3047.7288 99 -13898.0472 17855.0552 100 12440.3386 -13898.0472 101 -1229.6074 12440.3386 102 14266.1031 -1229.6074 103 -30074.5779 14266.1031 104 7707.4769 -30074.5779 105 -31408.7670 7707.4769 106 9400.1525 -31408.7670 107 2566.9555 9400.1525 108 -1885.6221 2566.9555 109 -27850.9260 -1885.6221 110 27129.1456 -27850.9260 111 -11919.9686 27129.1456 112 -7592.3482 -11919.9686 113 -8082.1705 -7592.3482 114 -7156.3436 -8082.1705 115 -24219.5416 -7156.3436 116 31432.0603 -24219.5416 117 -2180.8908 31432.0603 118 17210.9534 -2180.8908 119 -21985.5875 17210.9534 120 33494.0031 -21985.5875 121 -17169.1504 33494.0031 122 -21730.0760 -17169.1504 123 -19779.3456 -21730.0760 124 -4768.1525 -19779.3456 125 -2845.1176 -4768.1525 126 5476.6716 -2845.1176 127 -15369.8234 5476.6716 128 32566.9822 -15369.8234 129 18482.1937 32566.9822 130 7200.9592 18482.1937 131 6438.5695 7200.9592 132 13995.4466 6438.5695 133 -10582.5844 13995.4466 134 8846.8165 -10582.5844 135 -21792.7230 8846.8165 136 -9311.6191 -21792.7230 137 -13658.8036 -9311.6191 138 21699.0327 -13658.8036 139 -15965.0728 21699.0327 140 -32452.5942 -15965.0728 141 11410.6744 -32452.5942 142 -46420.1749 11410.6744 143 -15206.5730 -46420.1749 144 3814.7178 -15206.5730 145 -25632.9451 3814.7178 146 3164.3812 -25632.9451 147 -25527.6787 3164.3812 148 -5972.7674 -25527.6787 149 -2906.7135 -5972.7674 150 -5972.7674 -2906.7135 151 -5972.7674 -5972.7674 152 -5972.7674 -5972.7674 153 -5972.7674 -5972.7674 154 -5972.3650 -5972.7674 155 12501.3420 -5972.3650 156 -5972.7674 12501.3420 157 -5972.7674 -5972.7674 158 -6071.4072 -5972.7674 159 5412.2722 -6071.4072 160 -1319.9629 5412.2722 161 -13348.3325 -1319.9629 162 -5972.7674 -13348.3325 163 -9573.8215 -5972.7674 164 NA -9573.8215 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 9718.0315 -388.6385 [2,] 6862.3167 9718.0315 [3,] -20664.2184 6862.3167 [4,] 5610.9910 -20664.2184 [5,] -6740.1373 5610.9910 [6,] 40594.8961 -6740.1373 [7,] -8577.8421 40594.8961 [8,] -9055.5871 -8577.8421 [9,] 4942.9621 -9055.5871 [10,] 26461.4233 4942.9621 [11,] -11430.9125 26461.4233 [12,] 1683.4212 -11430.9125 [13,] -20439.9717 1683.4212 [14,] 5547.9239 -20439.9717 [15,] 20231.8662 5547.9239 [16,] -4780.2041 20231.8662 [17,] 1744.7563 -4780.2041 [18,] -21911.6955 1744.7563 [19,] -18803.2522 -21911.6955 [20,] 6686.9791 -18803.2522 [21,] 19200.9872 6686.9791 [22,] 7816.4036 19200.9872 [23,] -25238.1715 7816.4036 [24,] -17082.1327 -25238.1715 [25,] 10315.9104 -17082.1327 [26,] 16749.9906 10315.9104 [27,] 13081.3024 16749.9906 [28,] 3439.1409 13081.3024 [29,] 32399.9777 3439.1409 [30,] 33201.2992 32399.9777 [31,] -21371.9557 33201.2992 [32,] 42691.7022 -21371.9557 [33,] -7965.7470 42691.7022 [34,] 33403.3276 -7965.7470 [35,] 12456.5026 33403.3276 [36,] 62885.1244 12456.5026 [37,] 4691.8591 62885.1244 [38,] 10585.5748 4691.8591 [39,] 22070.0518 10585.5748 [40,] 28556.7170 22070.0518 [41,] -11370.2429 28556.7170 [42,] 38325.3285 -11370.2429 [43,] -7497.4123 38325.3285 [44,] 11921.8269 -7497.4123 [45,] 6698.3462 11921.8269 [46,] 28363.3201 6698.3462 [47,] -12787.7340 28363.3201 [48,] 10676.9571 -12787.7340 [49,] -15003.7818 10676.9571 [50,] 4610.1094 -15003.7818 [51,] 2910.5362 4610.1094 [52,] 2884.6077 2910.5362 [53,] -3364.6794 2884.6077 [54,] 8491.3950 -3364.6794 [55,] 2096.4747 8491.3950 [56,] 8836.8078 2096.4747 [57,] -36561.4158 8836.8078 [58,] 14438.2030 -36561.4158 [59,] -6279.3364 14438.2030 [60,] 37852.7510 -6279.3364 [61,] 14827.7461 37852.7510 [62,] 6152.5543 14827.7461 [63,] -3282.7726 6152.5543 [64,] 17493.9816 -3282.7726 [65,] 17302.2599 17493.9816 [66,] -24144.8551 17302.2599 [67,] 7875.1571 -24144.8551 [68,] -30178.0634 7875.1571 [69,] -5566.6333 -30178.0634 [70,] -3057.3884 -5566.6333 [71,] -4794.9701 -3057.3884 [72,] 9091.3091 -4794.9701 [73,] -18110.8432 9091.3091 [74,] -29270.5818 -18110.8432 [75,] -7916.4550 -29270.5818 [76,] 21544.4424 -7916.4550 [77,] -22289.6203 21544.4424 [78,] -20573.2390 -22289.6203 [79,] -7369.3196 -20573.2390 [80,] 6467.5187 -7369.3196 [81,] 10823.2839 6467.5187 [82,] 26171.9740 10823.2839 [83,] -25269.7348 26171.9740 [84,] -3515.3986 -25269.7348 [85,] -2551.6644 -3515.3986 [86,] -24989.0464 -2551.6644 [87,] 22356.8417 -24989.0464 [88,] 52014.3515 22356.8417 [89,] -52227.1990 52014.3515 [90,] 12293.5305 -52227.1990 [91,] -37294.5344 12293.5305 [92,] 483.5536 -37294.5344 [93,] -4838.0008 483.5536 [94,] -2750.0348 -4838.0008 [95,] -4015.9811 -2750.0348 [96,] -18203.6592 -4015.9811 [97,] 3047.7288 -18203.6592 [98,] 17855.0552 3047.7288 [99,] -13898.0472 17855.0552 [100,] 12440.3386 -13898.0472 [101,] -1229.6074 12440.3386 [102,] 14266.1031 -1229.6074 [103,] -30074.5779 14266.1031 [104,] 7707.4769 -30074.5779 [105,] -31408.7670 7707.4769 [106,] 9400.1525 -31408.7670 [107,] 2566.9555 9400.1525 [108,] -1885.6221 2566.9555 [109,] -27850.9260 -1885.6221 [110,] 27129.1456 -27850.9260 [111,] -11919.9686 27129.1456 [112,] -7592.3482 -11919.9686 [113,] -8082.1705 -7592.3482 [114,] -7156.3436 -8082.1705 [115,] -24219.5416 -7156.3436 [116,] 31432.0603 -24219.5416 [117,] -2180.8908 31432.0603 [118,] 17210.9534 -2180.8908 [119,] -21985.5875 17210.9534 [120,] 33494.0031 -21985.5875 [121,] -17169.1504 33494.0031 [122,] -21730.0760 -17169.1504 [123,] -19779.3456 -21730.0760 [124,] -4768.1525 -19779.3456 [125,] -2845.1176 -4768.1525 [126,] 5476.6716 -2845.1176 [127,] -15369.8234 5476.6716 [128,] 32566.9822 -15369.8234 [129,] 18482.1937 32566.9822 [130,] 7200.9592 18482.1937 [131,] 6438.5695 7200.9592 [132,] 13995.4466 6438.5695 [133,] -10582.5844 13995.4466 [134,] 8846.8165 -10582.5844 [135,] -21792.7230 8846.8165 [136,] -9311.6191 -21792.7230 [137,] -13658.8036 -9311.6191 [138,] 21699.0327 -13658.8036 [139,] -15965.0728 21699.0327 [140,] -32452.5942 -15965.0728 [141,] 11410.6744 -32452.5942 [142,] -46420.1749 11410.6744 [143,] -15206.5730 -46420.1749 [144,] 3814.7178 -15206.5730 [145,] -25632.9451 3814.7178 [146,] 3164.3812 -25632.9451 [147,] -25527.6787 3164.3812 [148,] -5972.7674 -25527.6787 [149,] -2906.7135 -5972.7674 [150,] -5972.7674 -2906.7135 [151,] -5972.7674 -5972.7674 [152,] -5972.7674 -5972.7674 [153,] -5972.7674 -5972.7674 [154,] -5972.3650 -5972.7674 [155,] 12501.3420 -5972.3650 [156,] -5972.7674 12501.3420 [157,] -5972.7674 -5972.7674 [158,] -6071.4072 -5972.7674 [159,] 5412.2722 -6071.4072 [160,] -1319.9629 5412.2722 [161,] -13348.3325 -1319.9629 [162,] -5972.7674 -13348.3325 [163,] -9573.8215 -5972.7674 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 9718.0315 -388.6385 2 6862.3167 9718.0315 3 -20664.2184 6862.3167 4 5610.9910 -20664.2184 5 -6740.1373 5610.9910 6 40594.8961 -6740.1373 7 -8577.8421 40594.8961 8 -9055.5871 -8577.8421 9 4942.9621 -9055.5871 10 26461.4233 4942.9621 11 -11430.9125 26461.4233 12 1683.4212 -11430.9125 13 -20439.9717 1683.4212 14 5547.9239 -20439.9717 15 20231.8662 5547.9239 16 -4780.2041 20231.8662 17 1744.7563 -4780.2041 18 -21911.6955 1744.7563 19 -18803.2522 -21911.6955 20 6686.9791 -18803.2522 21 19200.9872 6686.9791 22 7816.4036 19200.9872 23 -25238.1715 7816.4036 24 -17082.1327 -25238.1715 25 10315.9104 -17082.1327 26 16749.9906 10315.9104 27 13081.3024 16749.9906 28 3439.1409 13081.3024 29 32399.9777 3439.1409 30 33201.2992 32399.9777 31 -21371.9557 33201.2992 32 42691.7022 -21371.9557 33 -7965.7470 42691.7022 34 33403.3276 -7965.7470 35 12456.5026 33403.3276 36 62885.1244 12456.5026 37 4691.8591 62885.1244 38 10585.5748 4691.8591 39 22070.0518 10585.5748 40 28556.7170 22070.0518 41 -11370.2429 28556.7170 42 38325.3285 -11370.2429 43 -7497.4123 38325.3285 44 11921.8269 -7497.4123 45 6698.3462 11921.8269 46 28363.3201 6698.3462 47 -12787.7340 28363.3201 48 10676.9571 -12787.7340 49 -15003.7818 10676.9571 50 4610.1094 -15003.7818 51 2910.5362 4610.1094 52 2884.6077 2910.5362 53 -3364.6794 2884.6077 54 8491.3950 -3364.6794 55 2096.4747 8491.3950 56 8836.8078 2096.4747 57 -36561.4158 8836.8078 58 14438.2030 -36561.4158 59 -6279.3364 14438.2030 60 37852.7510 -6279.3364 61 14827.7461 37852.7510 62 6152.5543 14827.7461 63 -3282.7726 6152.5543 64 17493.9816 -3282.7726 65 17302.2599 17493.9816 66 -24144.8551 17302.2599 67 7875.1571 -24144.8551 68 -30178.0634 7875.1571 69 -5566.6333 -30178.0634 70 -3057.3884 -5566.6333 71 -4794.9701 -3057.3884 72 9091.3091 -4794.9701 73 -18110.8432 9091.3091 74 -29270.5818 -18110.8432 75 -7916.4550 -29270.5818 76 21544.4424 -7916.4550 77 -22289.6203 21544.4424 78 -20573.2390 -22289.6203 79 -7369.3196 -20573.2390 80 6467.5187 -7369.3196 81 10823.2839 6467.5187 82 26171.9740 10823.2839 83 -25269.7348 26171.9740 84 -3515.3986 -25269.7348 85 -2551.6644 -3515.3986 86 -24989.0464 -2551.6644 87 22356.8417 -24989.0464 88 52014.3515 22356.8417 89 -52227.1990 52014.3515 90 12293.5305 -52227.1990 91 -37294.5344 12293.5305 92 483.5536 -37294.5344 93 -4838.0008 483.5536 94 -2750.0348 -4838.0008 95 -4015.9811 -2750.0348 96 -18203.6592 -4015.9811 97 3047.7288 -18203.6592 98 17855.0552 3047.7288 99 -13898.0472 17855.0552 100 12440.3386 -13898.0472 101 -1229.6074 12440.3386 102 14266.1031 -1229.6074 103 -30074.5779 14266.1031 104 7707.4769 -30074.5779 105 -31408.7670 7707.4769 106 9400.1525 -31408.7670 107 2566.9555 9400.1525 108 -1885.6221 2566.9555 109 -27850.9260 -1885.6221 110 27129.1456 -27850.9260 111 -11919.9686 27129.1456 112 -7592.3482 -11919.9686 113 -8082.1705 -7592.3482 114 -7156.3436 -8082.1705 115 -24219.5416 -7156.3436 116 31432.0603 -24219.5416 117 -2180.8908 31432.0603 118 17210.9534 -2180.8908 119 -21985.5875 17210.9534 120 33494.0031 -21985.5875 121 -17169.1504 33494.0031 122 -21730.0760 -17169.1504 123 -19779.3456 -21730.0760 124 -4768.1525 -19779.3456 125 -2845.1176 -4768.1525 126 5476.6716 -2845.1176 127 -15369.8234 5476.6716 128 32566.9822 -15369.8234 129 18482.1937 32566.9822 130 7200.9592 18482.1937 131 6438.5695 7200.9592 132 13995.4466 6438.5695 133 -10582.5844 13995.4466 134 8846.8165 -10582.5844 135 -21792.7230 8846.8165 136 -9311.6191 -21792.7230 137 -13658.8036 -9311.6191 138 21699.0327 -13658.8036 139 -15965.0728 21699.0327 140 -32452.5942 -15965.0728 141 11410.6744 -32452.5942 142 -46420.1749 11410.6744 143 -15206.5730 -46420.1749 144 3814.7178 -15206.5730 145 -25632.9451 3814.7178 146 3164.3812 -25632.9451 147 -25527.6787 3164.3812 148 -5972.7674 -25527.6787 149 -2906.7135 -5972.7674 150 -5972.7674 -2906.7135 151 -5972.7674 -5972.7674 152 -5972.7674 -5972.7674 153 -5972.7674 -5972.7674 154 -5972.3650 -5972.7674 155 12501.3420 -5972.3650 156 -5972.7674 12501.3420 157 -5972.7674 -5972.7674 158 -6071.4072 -5972.7674 159 5412.2722 -6071.4072 160 -1319.9629 5412.2722 161 -13348.3325 -1319.9629 162 -5972.7674 -13348.3325 163 -9573.8215 -5972.7674 > 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/73giw1321972386.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/85rd11321972386.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/9rmew1321972386.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/10mo3a1321972386.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/11a35u1321972386.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/12kkah1321972386.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/13tlqf1321972387.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/14t9mx1321972387.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/15p5uv1321972387.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/16w8wn1321972387.tab") + } > > try(system("convert tmp/1v08d1321972386.ps tmp/1v08d1321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/24z971321972386.ps tmp/24z971321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/3nl0u1321972386.ps tmp/3nl0u1321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/4kgeg1321972386.ps tmp/4kgeg1321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/5w9a91321972386.ps tmp/5w9a91321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/6l8i71321972386.ps tmp/6l8i71321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/73giw1321972386.ps tmp/73giw1321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/85rd11321972386.ps tmp/85rd11321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/9rmew1321972386.ps tmp/9rmew1321972386.png",intern=TRUE)) character(0) > try(system("convert tmp/10mo3a1321972386.ps tmp/10mo3a1321972386.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.661 0.536 5.297