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(1173 + ,170650 + ,26 + ,95556 + ,669 + ,86621 + ,20 + ,54565 + ,1154 + ,127843 + ,27 + ,63016 + ,1948 + ,152526 + ,25 + ,79774 + ,705 + ,87411 + ,15 + ,31258 + ,332 + ,38138 + ,16 + ,52491 + ,2726 + ,316392 + ,20 + ,91256 + ,345 + ,32750 + ,18 + ,22807 + ,1385 + ,120378 + ,19 + ,77411 + ,1161 + ,130554 + ,20 + ,48821 + ,1431 + ,176816 + ,30 + ,52295 + ,1228 + ,140146 + ,39 + ,63262 + ,1205 + ,113286 + ,26 + ,50466 + ,1732 + ,195452 + ,36 + ,62932 + ,1214 + ,144513 + ,31 + ,38439 + ,3221 + ,263581 + ,41 + ,70817 + ,1385 + ,183271 + ,24 + ,105965 + ,1953 + ,203428 + ,23 + ,73795 + ,883 + ,113853 + ,19 + ,82043 + ,1631 + ,159968 + ,30 + ,74349 + ,1459 + ,174585 + ,31 + ,82204 + ,1929 + ,291865 + ,26 + ,55709 + ,860 + ,96213 + ,15 + ,37137 + ,1165 + ,116390 + ,33 + ,70780 + ,2115 + ,146342 + ,28 + ,55027 + ,1939 + ,152647 + ,27 + ,56699 + ,1844 + ,166058 + ,21 + ,65911 + ,1346 + ,175505 + ,27 + ,56316 + ,1093 + ,112485 + ,21 + ,26982 + ,1625 + ,197053 + ,30 + ,54628 + ,1551 + ,191822 + ,30 + ,96750 + ,1267 + ,139127 + ,33 + ,53009 + ,1478 + ,221991 + ,35 + ,64664 + ,670 + ,75339 + ,26 + ,36990 + ,2040 + ,247985 + ,27 + ,85224 + ,1561 + ,167351 + ,25 + ,37048 + ,2078 + ,266609 + ,30 + ,59635 + ,1113 + ,122024 + ,20 + ,42051 + ,686 + ,80964 + ,8 + ,26998 + ,2065 + ,215183 + ,24 + ,63717 + ,2251 + ,225469 + ,25 + ,55071 + ,1106 + ,125382 + ,28 + ,40001 + ,1244 + ,141437 + ,23 + ,54506 + ,1021 + ,81106 + ,21 + ,35838 + ,1735 + ,93125 + ,21 + ,50838 + ,3681 + ,318668 + ,26 + ,86997 + ,918 + ,78800 + ,26 + ,33032 + ,1582 + ,161048 + ,30 + ,61704 + ,2900 + ,236367 + ,34 + ,117986 + ,1496 + ,131108 + ,30 + ,56733 + ,1116 + ,131096 + ,18 + ,55064 + ,496 + ,24188 + ,4 + ,5950 + ,1777 + ,267003 + ,31 + ,84607 + ,744 + ,65029 + ,18 + ,32551 + ,1101 + ,98066 + ,14 + ,31701 + ,1612 + ,173587 + ,20 + ,71170 + ,1849 + ,182323 + ,37 + ,101773 + ,2460 + ,197266 + ,24 + ,101653 + ,1701 + ,217289 + ,29 + ,81493 + ,1334 + ,149594 + ,24 + ,55901 + ,2549 + ,257666 + ,31 + ,109104 + ,2218 + ,209228 + ,21 + ,114425 + ,1633 + ,145696 + ,31 + ,36311 + ,1724 + ,183567 + ,26 + ,70027 + ,973 + ,145919 + ,24 + ,73713 + ,1171 + ,125555 + ,18 + ,40671 + ,1282 + ,118697 + ,21 + ,89041 + ,1977 + ,146786 + ,28 + ,57231 + ,1521 + ,155015 + ,24 + ,68608 + ,1071 + ,96487 + ,21 + ,59155 + ,1425 + ,127968 + ,30 + ,55827 + ,852 + ,71972 + ,20 + ,22618 + ,1363 + ,135746 + ,30 + ,58425 + ,1150 + ,146344 + ,24 + ,65724 + ,1100 + ,110655 + ,26 + ,56979 + ,1393 + ,203795 + ,27 + ,72369 + ,1521 + ,211093 + ,24 + ,79194 + ,1015 + ,113421 + ,23 + ,202316 + ,993 + ,101553 + ,24 + ,44970 + ,1189 + ,128390 + ,25 + ,49319 + ,1244 + ,105502 + ,18 + ,36252 + ,2622 + ,294303 + ,30 + ,75741 + ,1177 + ,132798 + ,22 + ,38417 + ,1333 + ,146390 + ,26 + ,64102 + ,870 + ,80953 + ,8 + ,56622 + ,1473 + ,109237 + ,21 + ,15430 + ,881 + ,102104 + ,26 + ,72571 + ,2489 + ,233139 + ,24 + ,67271 + ,1429 + ,175839 + ,30 + ,43460 + ,1995 + ,118217 + ,27 + ,99501 + ,1247 + ,141091 + ,24 + ,28340 + ,1357 + ,152193 + ,25 + ,76013 + ,1316 + ,126476 + ,21 + ,37361 + ,1980 + ,170379 + ,24 + ,48204 + ,1454 + ,187772 + ,24 + ,76168 + ,1030 + ,130533 + ,20 + ,85168 + ,1154 + ,143569 + ,20 + ,125410 + ,1521 + ,202077 + ,24 + ,123328 + ,2294 + ,210046 + ,40 + ,83038 + ,2274 + ,252260 + ,22 + ,120087 + ,1371 + ,166981 + ,31 + ,91939 + ,1624 + ,190562 + ,26 + ,103646 + ,999 + ,106351 + ,20 + ,29467 + ,602 + ,43287 + ,19 + ,43750 + ,1380 + ,127493 + ,15 + ,34497 + ,1207 + ,132143 + ,22 + ,66477 + ,1405 + ,151620 + ,22 + ,71181 + ,1800 + ,197727 + ,28 + ,74482 + ,682 + ,75792 + ,19 + ,174949 + ,1151 + ,94968 + ,25 + ,46765 + ,1270 + ,191351 + ,26 + ,90257 + ,1381 + ,145048 + ,32 + ,51370 + ,391 + ,22938 + ,1 + ,1168 + ,1264 + ,125927 + ,24 + ,51360 + ,530 + ,61857 + ,11 + ,25162 + ,1123 + ,103749 + ,31 + ,21067 + ,1980 + ,261544 + ,22 + ,58233 + ,387 + ,21054 + ,0 + ,855 + ,1485 + ,174409 + ,19 + ,85903 + ,449 + ,31414 + ,8 + ,14116 + ,2209 + ,198752 + ,27 + ,57637 + ,1135 + ,138507 + ,31 + ,94137 + ,813 + ,78001 + ,24 + ,62147 + ,1015 + ,82724 + ,20 + ,62832 + ,568 + ,38214 + ,8 + ,8773 + ,936 + ,91390 + ,22 + ,63785 + ,1585 + ,197612 + ,33 + ,65196 + ,871 + ,137161 + ,33 + ,73087 + ,2275 + ,251103 + ,31 + ,72631 + ,1637 + ,209835 + ,33 + ,86281 + ,2238 + ,269470 + ,35 + ,162365 + ,829 + ,139144 + ,21 + ,56530 + ,809 + ,76470 + ,20 + ,35606 + ,1904 + ,197114 + ,25 + ,70111 + ,3053 + ,291962 + ,31 + ,92046 + ,655 + ,56727 + ,22 + ,63989 + ,2617 + ,254843 + ,27 + ,104911 + ,1311 + ,105810 + ,24 + ,43448 + ,1154 + ,170155 + ,27 + ,60029 + ,1496 + ,136745 + ,26 + ,38650 + ,742 + ,84342 + ,16 + ,47261 + ,2831 + ,251448 + ,23 + ,73586 + ,1281 + ,152366 + ,24 + ,83042 + ,2035 + ,173260 + ,21 + ,37238 + ,1894 + ,212582 + ,30 + ,63958 + ,1268 + ,87850 + ,37 + ,78956 + ,1713 + ,148636 + ,24 + ,99518 + ,1568 + ,185455 + ,29 + ,111436 + ,0 + ,0 + ,0 + ,0 + ,207 + ,14688 + ,0 + ,6023 + ,5 + ,98 + ,0 + ,0 + ,8 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1301 + ,137891 + ,20 + ,42564 + ,1761 + ,188171 + ,27 + ,38885 + ,0 + ,0 + ,0 + ,0 + ,4 + ,203 + ,0 + ,0 + ,151 + ,7199 + ,0 + ,1644 + ,474 + ,46660 + ,5 + ,6179 + ,141 + ,17547 + ,1 + ,3926 + ,705 + ,73567 + ,23 + ,23238 + ,29 + ,969 + ,0 + ,0 + ,1021 + ,105477 + ,16 + ,49288) + ,dim=c(4 + ,164) + ,dimnames=list(c('Karakters' + ,'Pag.bezoeken' + ,'TijdRFC' + ,'Compendiums') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('Karakters','Pag.bezoeken','TijdRFC','Compendiums'),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 Karakters Pag.bezoeken TijdRFC Compendiums 1 1173 170650 26 95556 2 669 86621 20 54565 3 1154 127843 27 63016 4 1948 152526 25 79774 5 705 87411 15 31258 6 332 38138 16 52491 7 2726 316392 20 91256 8 345 32750 18 22807 9 1385 120378 19 77411 10 1161 130554 20 48821 11 1431 176816 30 52295 12 1228 140146 39 63262 13 1205 113286 26 50466 14 1732 195452 36 62932 15 1214 144513 31 38439 16 3221 263581 41 70817 17 1385 183271 24 105965 18 1953 203428 23 73795 19 883 113853 19 82043 20 1631 159968 30 74349 21 1459 174585 31 82204 22 1929 291865 26 55709 23 860 96213 15 37137 24 1165 116390 33 70780 25 2115 146342 28 55027 26 1939 152647 27 56699 27 1844 166058 21 65911 28 1346 175505 27 56316 29 1093 112485 21 26982 30 1625 197053 30 54628 31 1551 191822 30 96750 32 1267 139127 33 53009 33 1478 221991 35 64664 34 670 75339 26 36990 35 2040 247985 27 85224 36 1561 167351 25 37048 37 2078 266609 30 59635 38 1113 122024 20 42051 39 686 80964 8 26998 40 2065 215183 24 63717 41 2251 225469 25 55071 42 1106 125382 28 40001 43 1244 141437 23 54506 44 1021 81106 21 35838 45 1735 93125 21 50838 46 3681 318668 26 86997 47 918 78800 26 33032 48 1582 161048 30 61704 49 2900 236367 34 117986 50 1496 131108 30 56733 51 1116 131096 18 55064 52 496 24188 4 5950 53 1777 267003 31 84607 54 744 65029 18 32551 55 1101 98066 14 31701 56 1612 173587 20 71170 57 1849 182323 37 101773 58 2460 197266 24 101653 59 1701 217289 29 81493 60 1334 149594 24 55901 61 2549 257666 31 109104 62 2218 209228 21 114425 63 1633 145696 31 36311 64 1724 183567 26 70027 65 973 145919 24 73713 66 1171 125555 18 40671 67 1282 118697 21 89041 68 1977 146786 28 57231 69 1521 155015 24 68608 70 1071 96487 21 59155 71 1425 127968 30 55827 72 852 71972 20 22618 73 1363 135746 30 58425 74 1150 146344 24 65724 75 1100 110655 26 56979 76 1393 203795 27 72369 77 1521 211093 24 79194 78 1015 113421 23 202316 79 993 101553 24 44970 80 1189 128390 25 49319 81 1244 105502 18 36252 82 2622 294303 30 75741 83 1177 132798 22 38417 84 1333 146390 26 64102 85 870 80953 8 56622 86 1473 109237 21 15430 87 881 102104 26 72571 88 2489 233139 24 67271 89 1429 175839 30 43460 90 1995 118217 27 99501 91 1247 141091 24 28340 92 1357 152193 25 76013 93 1316 126476 21 37361 94 1980 170379 24 48204 95 1454 187772 24 76168 96 1030 130533 20 85168 97 1154 143569 20 125410 98 1521 202077 24 123328 99 2294 210046 40 83038 100 2274 252260 22 120087 101 1371 166981 31 91939 102 1624 190562 26 103646 103 999 106351 20 29467 104 602 43287 19 43750 105 1380 127493 15 34497 106 1207 132143 22 66477 107 1405 151620 22 71181 108 1800 197727 28 74482 109 682 75792 19 174949 110 1151 94968 25 46765 111 1270 191351 26 90257 112 1381 145048 32 51370 113 391 22938 1 1168 114 1264 125927 24 51360 115 530 61857 11 25162 116 1123 103749 31 21067 117 1980 261544 22 58233 118 387 21054 0 855 119 1485 174409 19 85903 120 449 31414 8 14116 121 2209 198752 27 57637 122 1135 138507 31 94137 123 813 78001 24 62147 124 1015 82724 20 62832 125 568 38214 8 8773 126 936 91390 22 63785 127 1585 197612 33 65196 128 871 137161 33 73087 129 2275 251103 31 72631 130 1637 209835 33 86281 131 2238 269470 35 162365 132 829 139144 21 56530 133 809 76470 20 35606 134 1904 197114 25 70111 135 3053 291962 31 92046 136 655 56727 22 63989 137 2617 254843 27 104911 138 1311 105810 24 43448 139 1154 170155 27 60029 140 1496 136745 26 38650 141 742 84342 16 47261 142 2831 251448 23 73586 143 1281 152366 24 83042 144 2035 173260 21 37238 145 1894 212582 30 63958 146 1268 87850 37 78956 147 1713 148636 24 99518 148 1568 185455 29 111436 149 0 0 0 0 150 207 14688 0 6023 151 5 98 0 0 152 8 455 0 0 153 0 0 0 0 154 0 0 0 0 155 1301 137891 20 42564 156 1761 188171 27 38885 157 0 0 0 0 158 4 203 0 0 159 151 7199 0 1644 160 474 46660 5 6179 161 141 17547 1 3926 162 705 73567 23 23238 163 29 969 0 0 164 1021 105477 16 49288 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Pag.bezoeken TijdRFC Compendiums 81.6238509 0.0082924 5.3955781 -0.0004715 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -686.9 -149.0 -32.8 118.4 857.6 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 81.6238509 59.2158546 1.378 0.170 Pag.bezoeken 0.0082924 0.0004676 17.734 <2e-16 *** TijdRFC 5.3955781 3.5575454 1.517 0.131 Compendiums -0.0004715 0.0008697 -0.542 0.589 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 279.3 on 160 degrees of freedom Multiple R-squared: 0.834, Adjusted R-squared: 0.8309 F-statistic: 268 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.8807835 2.384330e-01 1.192165e-01 [2,] 0.7881703 4.236594e-01 2.118297e-01 [3,] 0.7811148 4.377704e-01 2.188852e-01 [4,] 0.6796490 6.407020e-01 3.203510e-01 [5,] 0.5835687 8.328627e-01 4.164313e-01 [6,] 0.4767999 9.535998e-01 5.232001e-01 [7,] 0.4204646 8.409292e-01 5.795354e-01 [8,] 0.3277495 6.554990e-01 6.722505e-01 [9,] 0.2487822 4.975644e-01 7.512178e-01 [10,] 0.7726810 4.546379e-01 2.273190e-01 [11,] 0.7670771 4.658457e-01 2.329229e-01 [12,] 0.7092640 5.814720e-01 2.907360e-01 [13,] 0.6469457 7.061087e-01 3.530543e-01 [14,] 0.5850942 8.298115e-01 4.149058e-01 [15,] 0.5441644 9.116713e-01 4.558356e-01 [16,] 0.8077683 3.844633e-01 1.922317e-01 [17,] 0.7646691 4.706617e-01 2.353309e-01 [18,] 0.7111574 5.776851e-01 2.888426e-01 [19,] 0.9161291 1.677417e-01 8.387086e-02 [20,] 0.9486503 1.026994e-01 5.134971e-02 [21,] 0.9545924 9.081514e-02 4.540757e-02 [22,] 0.9540463 9.190744e-02 4.595372e-02 [23,] 0.9380725 1.238551e-01 6.192753e-02 [24,] 0.9291593 1.416815e-01 7.084075e-02 [25,] 0.9219733 1.560533e-01 7.802667e-02 [26,] 0.9042679 1.914642e-01 9.573212e-02 [27,] 0.9560854 8.782929e-02 4.391464e-02 [28,] 0.9450811 1.098377e-01 5.491887e-02 [29,] 0.9327038 1.345925e-01 6.729623e-02 [30,] 0.9139760 1.720479e-01 8.602396e-02 [31,] 0.9116580 1.766840e-01 8.834199e-02 [32,] 0.8887846 2.224307e-01 1.112154e-01 [33,] 0.8626794 2.746412e-01 1.373206e-01 [34,] 0.8450428 3.099144e-01 1.549572e-01 [35,] 0.8402738 3.194524e-01 1.597262e-01 [36,] 0.8129478 3.741044e-01 1.870522e-01 [37,] 0.7790872 4.418255e-01 2.209128e-01 [38,] 0.7587467 4.825065e-01 2.412533e-01 [39,] 0.9398466 1.203067e-01 6.015336e-02 [40,] 0.9947916 1.041672e-02 5.208360e-03 [41,] 0.9928285 1.434300e-02 7.171500e-03 [42,] 0.9900660 1.986809e-02 9.934046e-03 [43,] 0.9979520 4.095905e-03 2.047952e-03 [44,] 0.9974530 5.093942e-03 2.546971e-03 [45,] 0.9965349 6.930159e-03 3.465080e-03 [46,] 0.9961986 7.602835e-03 3.801417e-03 [47,] 0.9991822 1.635648e-03 8.178240e-04 [48,] 0.9987948 2.410371e-03 1.205186e-03 [49,] 0.9984063 3.187483e-03 1.593741e-03 [50,] 0.9976846 4.630782e-03 2.315391e-03 [51,] 0.9967734 6.453112e-03 3.226556e-03 [52,] 0.9991979 1.604275e-03 8.021374e-04 [53,] 0.9992622 1.475637e-03 7.378185e-04 [54,] 0.9989501 2.099711e-03 1.049855e-03 [55,] 0.9986975 2.605012e-03 1.302506e-03 [56,] 0.9987869 2.426121e-03 1.213061e-03 [57,] 0.9986170 2.766085e-03 1.383042e-03 [58,] 0.9979986 4.002870e-03 2.001435e-03 [59,] 0.9988103 2.379382e-03 1.189691e-03 [60,] 0.9982743 3.451479e-03 1.725739e-03 [61,] 0.9977126 4.574862e-03 2.287431e-03 [62,] 0.9992431 1.513760e-03 7.568801e-04 [63,] 0.9989021 2.195741e-03 1.097871e-03 [64,] 0.9984721 3.055854e-03 1.527927e-03 [65,] 0.9980068 3.986492e-03 1.993246e-03 [66,] 0.9972581 5.483813e-03 2.741906e-03 [67,] 0.9961372 7.725575e-03 3.862788e-03 [68,] 0.9958948 8.210412e-03 4.105206e-03 [69,] 0.9943007 1.139861e-02 5.699304e-03 [70,] 0.9972420 5.515905e-03 2.757953e-03 [71,] 0.9982192 3.561695e-03 1.780847e-03 [72,] 0.9979592 4.081615e-03 2.040807e-03 [73,] 0.9971078 5.784476e-03 2.892238e-03 [74,] 0.9960116 7.976869e-03 3.988434e-03 [75,] 0.9953739 9.252236e-03 4.626118e-03 [76,] 0.9936615 1.267706e-02 6.338528e-03 [77,] 0.9917473 1.650545e-02 8.252723e-03 [78,] 0.9890283 2.194339e-02 1.097170e-02 [79,] 0.9859422 2.811565e-02 1.405783e-02 [80,] 0.9889911 2.201780e-02 1.100890e-02 [81,] 0.9863979 2.720414e-02 1.360207e-02 [82,] 0.9893936 2.121282e-02 1.060641e-02 [83,] 0.9891201 2.175976e-02 1.087988e-02 [84,] 0.9996482 7.036353e-04 3.518177e-04 [85,] 0.9995268 9.464458e-04 4.732229e-04 [86,] 0.9993099 1.380105e-03 6.900525e-04 [87,] 0.9990065 1.986918e-03 9.934589e-04 [88,] 0.9993355 1.329010e-03 6.645052e-04 [89,] 0.9993610 1.277985e-03 6.389926e-04 [90,] 0.9992082 1.583537e-03 7.917684e-04 [91,] 0.9989407 2.118649e-03 1.059324e-03 [92,] 0.9990043 1.991463e-03 9.957313e-04 [93,] 0.9991510 1.698084e-03 8.490421e-04 [94,] 0.9987373 2.525437e-03 1.262719e-03 [95,] 0.9984939 3.012231e-03 1.506115e-03 [96,] 0.9979312 4.137666e-03 2.068833e-03 [97,] 0.9970261 5.947886e-03 2.973943e-03 [98,] 0.9959993 8.001396e-03 4.000698e-03 [99,] 0.9950569 9.886147e-03 4.943073e-03 [100,] 0.9930425 1.391505e-02 6.957527e-03 [101,] 0.9902362 1.952757e-02 9.763784e-03 [102,] 0.9865311 2.693776e-02 1.346888e-02 [103,] 0.9827034 3.459313e-02 1.729657e-02 [104,] 0.9801654 3.966927e-02 1.983463e-02 [105,] 0.9909456 1.810874e-02 9.054368e-03 [106,] 0.9873755 2.524891e-02 1.262445e-02 [107,] 0.9835133 3.297343e-02 1.648672e-02 [108,] 0.9776184 4.476317e-02 2.238159e-02 [109,] 0.9710578 5.788439e-02 2.894219e-02 [110,] 0.9616829 7.663426e-02 3.831713e-02 [111,] 0.9806812 3.863757e-02 1.931879e-02 [112,] 0.9751610 4.967808e-02 2.483904e-02 [113,] 0.9689649 6.207013e-02 3.103506e-02 [114,] 0.9599121 8.017580e-02 4.008790e-02 [115,] 0.9652912 6.941757e-02 3.470879e-02 [116,] 0.9581846 8.363074e-02 4.181537e-02 [117,] 0.9454710 1.090580e-01 5.452899e-02 [118,] 0.9422360 1.155280e-01 5.776400e-02 [119,] 0.9312149 1.375701e-01 6.878505e-02 [120,] 0.9130951 1.738097e-01 8.690487e-02 [121,] 0.9182289 1.635423e-01 8.177113e-02 [122,] 0.9533940 9.321203e-02 4.660602e-02 [123,] 0.9427720 1.144559e-01 5.722797e-02 [124,] 0.9624557 7.508869e-02 3.754434e-02 [125,] 0.9668613 6.627736e-02 3.313868e-02 [126,] 0.9939590 1.208200e-02 6.041000e-03 [127,] 0.9905140 1.897191e-02 9.485956e-03 [128,] 0.9859327 2.813465e-02 1.406733e-02 [129,] 0.9844601 3.107981e-02 1.553990e-02 [130,] 0.9766984 4.660324e-02 2.330162e-02 [131,] 0.9711192 5.776166e-02 2.888083e-02 [132,] 0.9699609 6.007826e-02 3.003913e-02 [133,] 0.9965002 6.999585e-03 3.499792e-03 [134,] 0.9943429 1.131417e-02 5.657084e-03 [135,] 0.9915814 1.683726e-02 8.418632e-03 [136,] 0.9989363 2.127465e-03 1.063732e-03 [137,] 0.9989688 2.062448e-03 1.031224e-03 [138,] 0.9999915 1.706423e-05 8.532117e-06 [139,] 0.9999762 4.757814e-05 2.378907e-05 [140,] 0.9999815 3.691617e-05 1.845808e-05 [141,] 1.0000000 6.634795e-10 3.317398e-10 [142,] 1.0000000 2.120595e-10 1.060298e-10 [143,] 1.0000000 1.818421e-09 9.092106e-10 [144,] 1.0000000 4.366206e-09 2.183103e-09 [145,] 1.0000000 4.370575e-08 2.185288e-08 [146,] 0.9999998 4.136883e-07 2.068441e-07 [147,] 0.9999983 3.497754e-06 1.748877e-06 [148,] 0.9999863 2.747361e-05 1.373681e-05 [149,] 0.9998831 2.338338e-04 1.169169e-04 [150,] 0.9991656 1.668781e-03 8.343903e-04 [151,] 0.9942241 1.155172e-02 5.775862e-03 > postscript(file="/var/wessaorg/rcomp/tmp/1yw511321990451.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/2twww1321990451.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/3hunn1321990451.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/490fr1321990451.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/5tq801321990451.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 -418.959385 -213.107846 -103.722676 504.287421 -167.669266 -127.462003 7 8 9 10 11 12 -44.166881 -94.568401 239.131510 -88.126740 -254.068547 -196.375263 13 14 15 16 17 18 67.468828 -134.964620 -215.126662 765.820749 -295.919427 95.159025 19 20 21 22 23 24 -206.576659 96.039684 -198.862866 -686.911156 -82.887427 -26.462664 25 26 27 28 29 30 694.713804 472.613962 303.120885 -310.114715 -21.982801 -226.782311 31 32 33 34 35 36 -237.545865 -121.385690 -602.824976 -159.212142 -203.520282 -25.791252 37 38 39 40 41 42 -348.209192 -68.584187 -97.447411 99.534699 190.767065 -147.561245 43 44 45 46 47 48 -108.879622 170.400249 791.805556 857.578160 58.221761 32.122271 49 50 51 52 53 54 730.497938 192.053664 -123.886755 195.021994 -646.098704 41.354513 55 56 57 58 59 60 145.579447 16.562246 103.822913 660.995241 -300.526367 -91.258774 61 62 63 64 65 66 214.876945 342.009539 193.060142 12.891561 -413.386504 -29.724175 67 68 69 70 71 72 144.762980 554.071066 56.778856 103.847570 146.664717 76.306089 73 74 75 76 77 78 21.391135 -243.677269 -12.643204 -490.138906 -403.252535 -35.872836 79 80 81 82 83 84 -39.036206 -68.925050 207.480320 -26.266115 -106.431145 -72.614584 85 86 87 88 89 90 100.610313 379.504678 -153.383740 376.311594 -252.132196 834.301335 91 92 93 94 95 96 -120.742224 -85.724361 89.891243 378.754481 -278.291673 -201.816472 97 98 99 100 101 102 -166.943982 -307.680707 293.912667 38.444000 -219.217659 -129.263922 103 104 105 106 107 108 -58.549950 79.532574 176.481063 -57.770466 -19.064162 -37.219894 109 110 111 112 113 114 -48.157522 169.020062 -496.119007 -51.862245 114.319734 32.857004 115 116 117 118 119 120 -112.056500 23.715306 -361.704452 131.190663 -104.912535 70.368600 121 122 123 124 125 126 360.734225 -218.063061 -15.634906 169.105263 130.461146 7.901306 127 128 129 130 131 132 -282.622127 -491.616838 -21.895442 -322.039644 -190.478690 -493.119716 133 134 135 136 137 138 2.130102 85.989345 426.438001 14.437595 325.891927 242.945406 139 140 141 142 143 144 -455.999746 158.366216 -103.070649 574.858542 -154.449485 420.880736 145 146 147 148 149 150 -82.156567 295.475304 316.248999 -155.428607 -81.623851 6.416701 151 152 153 154 155 156 -77.436508 -77.396901 -81.623851 -81.623851 -11.918136 -8.364495 157 158 159 160 161 162 -81.623851 -79.307212 10.454106 -18.612853 -89.675552 -99.814748 163 164 -60.659205 1.624729 > postscript(file="/var/wessaorg/rcomp/tmp/6nq691321990451.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 -418.959385 NA 1 -213.107846 -418.959385 2 -103.722676 -213.107846 3 504.287421 -103.722676 4 -167.669266 504.287421 5 -127.462003 -167.669266 6 -44.166881 -127.462003 7 -94.568401 -44.166881 8 239.131510 -94.568401 9 -88.126740 239.131510 10 -254.068547 -88.126740 11 -196.375263 -254.068547 12 67.468828 -196.375263 13 -134.964620 67.468828 14 -215.126662 -134.964620 15 765.820749 -215.126662 16 -295.919427 765.820749 17 95.159025 -295.919427 18 -206.576659 95.159025 19 96.039684 -206.576659 20 -198.862866 96.039684 21 -686.911156 -198.862866 22 -82.887427 -686.911156 23 -26.462664 -82.887427 24 694.713804 -26.462664 25 472.613962 694.713804 26 303.120885 472.613962 27 -310.114715 303.120885 28 -21.982801 -310.114715 29 -226.782311 -21.982801 30 -237.545865 -226.782311 31 -121.385690 -237.545865 32 -602.824976 -121.385690 33 -159.212142 -602.824976 34 -203.520282 -159.212142 35 -25.791252 -203.520282 36 -348.209192 -25.791252 37 -68.584187 -348.209192 38 -97.447411 -68.584187 39 99.534699 -97.447411 40 190.767065 99.534699 41 -147.561245 190.767065 42 -108.879622 -147.561245 43 170.400249 -108.879622 44 791.805556 170.400249 45 857.578160 791.805556 46 58.221761 857.578160 47 32.122271 58.221761 48 730.497938 32.122271 49 192.053664 730.497938 50 -123.886755 192.053664 51 195.021994 -123.886755 52 -646.098704 195.021994 53 41.354513 -646.098704 54 145.579447 41.354513 55 16.562246 145.579447 56 103.822913 16.562246 57 660.995241 103.822913 58 -300.526367 660.995241 59 -91.258774 -300.526367 60 214.876945 -91.258774 61 342.009539 214.876945 62 193.060142 342.009539 63 12.891561 193.060142 64 -413.386504 12.891561 65 -29.724175 -413.386504 66 144.762980 -29.724175 67 554.071066 144.762980 68 56.778856 554.071066 69 103.847570 56.778856 70 146.664717 103.847570 71 76.306089 146.664717 72 21.391135 76.306089 73 -243.677269 21.391135 74 -12.643204 -243.677269 75 -490.138906 -12.643204 76 -403.252535 -490.138906 77 -35.872836 -403.252535 78 -39.036206 -35.872836 79 -68.925050 -39.036206 80 207.480320 -68.925050 81 -26.266115 207.480320 82 -106.431145 -26.266115 83 -72.614584 -106.431145 84 100.610313 -72.614584 85 379.504678 100.610313 86 -153.383740 379.504678 87 376.311594 -153.383740 88 -252.132196 376.311594 89 834.301335 -252.132196 90 -120.742224 834.301335 91 -85.724361 -120.742224 92 89.891243 -85.724361 93 378.754481 89.891243 94 -278.291673 378.754481 95 -201.816472 -278.291673 96 -166.943982 -201.816472 97 -307.680707 -166.943982 98 293.912667 -307.680707 99 38.444000 293.912667 100 -219.217659 38.444000 101 -129.263922 -219.217659 102 -58.549950 -129.263922 103 79.532574 -58.549950 104 176.481063 79.532574 105 -57.770466 176.481063 106 -19.064162 -57.770466 107 -37.219894 -19.064162 108 -48.157522 -37.219894 109 169.020062 -48.157522 110 -496.119007 169.020062 111 -51.862245 -496.119007 112 114.319734 -51.862245 113 32.857004 114.319734 114 -112.056500 32.857004 115 23.715306 -112.056500 116 -361.704452 23.715306 117 131.190663 -361.704452 118 -104.912535 131.190663 119 70.368600 -104.912535 120 360.734225 70.368600 121 -218.063061 360.734225 122 -15.634906 -218.063061 123 169.105263 -15.634906 124 130.461146 169.105263 125 7.901306 130.461146 126 -282.622127 7.901306 127 -491.616838 -282.622127 128 -21.895442 -491.616838 129 -322.039644 -21.895442 130 -190.478690 -322.039644 131 -493.119716 -190.478690 132 2.130102 -493.119716 133 85.989345 2.130102 134 426.438001 85.989345 135 14.437595 426.438001 136 325.891927 14.437595 137 242.945406 325.891927 138 -455.999746 242.945406 139 158.366216 -455.999746 140 -103.070649 158.366216 141 574.858542 -103.070649 142 -154.449485 574.858542 143 420.880736 -154.449485 144 -82.156567 420.880736 145 295.475304 -82.156567 146 316.248999 295.475304 147 -155.428607 316.248999 148 -81.623851 -155.428607 149 6.416701 -81.623851 150 -77.436508 6.416701 151 -77.396901 -77.436508 152 -81.623851 -77.396901 153 -81.623851 -81.623851 154 -11.918136 -81.623851 155 -8.364495 -11.918136 156 -81.623851 -8.364495 157 -79.307212 -81.623851 158 10.454106 -79.307212 159 -18.612853 10.454106 160 -89.675552 -18.612853 161 -99.814748 -89.675552 162 -60.659205 -99.814748 163 1.624729 -60.659205 164 NA 1.624729 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -213.107846 -418.959385 [2,] -103.722676 -213.107846 [3,] 504.287421 -103.722676 [4,] -167.669266 504.287421 [5,] -127.462003 -167.669266 [6,] -44.166881 -127.462003 [7,] -94.568401 -44.166881 [8,] 239.131510 -94.568401 [9,] -88.126740 239.131510 [10,] -254.068547 -88.126740 [11,] -196.375263 -254.068547 [12,] 67.468828 -196.375263 [13,] -134.964620 67.468828 [14,] -215.126662 -134.964620 [15,] 765.820749 -215.126662 [16,] -295.919427 765.820749 [17,] 95.159025 -295.919427 [18,] -206.576659 95.159025 [19,] 96.039684 -206.576659 [20,] -198.862866 96.039684 [21,] -686.911156 -198.862866 [22,] -82.887427 -686.911156 [23,] -26.462664 -82.887427 [24,] 694.713804 -26.462664 [25,] 472.613962 694.713804 [26,] 303.120885 472.613962 [27,] -310.114715 303.120885 [28,] -21.982801 -310.114715 [29,] -226.782311 -21.982801 [30,] -237.545865 -226.782311 [31,] -121.385690 -237.545865 [32,] -602.824976 -121.385690 [33,] -159.212142 -602.824976 [34,] -203.520282 -159.212142 [35,] -25.791252 -203.520282 [36,] -348.209192 -25.791252 [37,] -68.584187 -348.209192 [38,] -97.447411 -68.584187 [39,] 99.534699 -97.447411 [40,] 190.767065 99.534699 [41,] -147.561245 190.767065 [42,] -108.879622 -147.561245 [43,] 170.400249 -108.879622 [44,] 791.805556 170.400249 [45,] 857.578160 791.805556 [46,] 58.221761 857.578160 [47,] 32.122271 58.221761 [48,] 730.497938 32.122271 [49,] 192.053664 730.497938 [50,] -123.886755 192.053664 [51,] 195.021994 -123.886755 [52,] -646.098704 195.021994 [53,] 41.354513 -646.098704 [54,] 145.579447 41.354513 [55,] 16.562246 145.579447 [56,] 103.822913 16.562246 [57,] 660.995241 103.822913 [58,] -300.526367 660.995241 [59,] -91.258774 -300.526367 [60,] 214.876945 -91.258774 [61,] 342.009539 214.876945 [62,] 193.060142 342.009539 [63,] 12.891561 193.060142 [64,] -413.386504 12.891561 [65,] -29.724175 -413.386504 [66,] 144.762980 -29.724175 [67,] 554.071066 144.762980 [68,] 56.778856 554.071066 [69,] 103.847570 56.778856 [70,] 146.664717 103.847570 [71,] 76.306089 146.664717 [72,] 21.391135 76.306089 [73,] -243.677269 21.391135 [74,] -12.643204 -243.677269 [75,] -490.138906 -12.643204 [76,] -403.252535 -490.138906 [77,] -35.872836 -403.252535 [78,] -39.036206 -35.872836 [79,] -68.925050 -39.036206 [80,] 207.480320 -68.925050 [81,] -26.266115 207.480320 [82,] -106.431145 -26.266115 [83,] -72.614584 -106.431145 [84,] 100.610313 -72.614584 [85,] 379.504678 100.610313 [86,] -153.383740 379.504678 [87,] 376.311594 -153.383740 [88,] -252.132196 376.311594 [89,] 834.301335 -252.132196 [90,] -120.742224 834.301335 [91,] -85.724361 -120.742224 [92,] 89.891243 -85.724361 [93,] 378.754481 89.891243 [94,] -278.291673 378.754481 [95,] -201.816472 -278.291673 [96,] -166.943982 -201.816472 [97,] -307.680707 -166.943982 [98,] 293.912667 -307.680707 [99,] 38.444000 293.912667 [100,] -219.217659 38.444000 [101,] -129.263922 -219.217659 [102,] -58.549950 -129.263922 [103,] 79.532574 -58.549950 [104,] 176.481063 79.532574 [105,] -57.770466 176.481063 [106,] -19.064162 -57.770466 [107,] -37.219894 -19.064162 [108,] -48.157522 -37.219894 [109,] 169.020062 -48.157522 [110,] -496.119007 169.020062 [111,] -51.862245 -496.119007 [112,] 114.319734 -51.862245 [113,] 32.857004 114.319734 [114,] -112.056500 32.857004 [115,] 23.715306 -112.056500 [116,] -361.704452 23.715306 [117,] 131.190663 -361.704452 [118,] -104.912535 131.190663 [119,] 70.368600 -104.912535 [120,] 360.734225 70.368600 [121,] -218.063061 360.734225 [122,] -15.634906 -218.063061 [123,] 169.105263 -15.634906 [124,] 130.461146 169.105263 [125,] 7.901306 130.461146 [126,] -282.622127 7.901306 [127,] -491.616838 -282.622127 [128,] -21.895442 -491.616838 [129,] -322.039644 -21.895442 [130,] -190.478690 -322.039644 [131,] -493.119716 -190.478690 [132,] 2.130102 -493.119716 [133,] 85.989345 2.130102 [134,] 426.438001 85.989345 [135,] 14.437595 426.438001 [136,] 325.891927 14.437595 [137,] 242.945406 325.891927 [138,] -455.999746 242.945406 [139,] 158.366216 -455.999746 [140,] -103.070649 158.366216 [141,] 574.858542 -103.070649 [142,] -154.449485 574.858542 [143,] 420.880736 -154.449485 [144,] -82.156567 420.880736 [145,] 295.475304 -82.156567 [146,] 316.248999 295.475304 [147,] -155.428607 316.248999 [148,] -81.623851 -155.428607 [149,] 6.416701 -81.623851 [150,] -77.436508 6.416701 [151,] -77.396901 -77.436508 [152,] -81.623851 -77.396901 [153,] -81.623851 -81.623851 [154,] -11.918136 -81.623851 [155,] -8.364495 -11.918136 [156,] -81.623851 -8.364495 [157,] -79.307212 -81.623851 [158,] 10.454106 -79.307212 [159,] -18.612853 10.454106 [160,] -89.675552 -18.612853 [161,] -99.814748 -89.675552 [162,] -60.659205 -99.814748 [163,] 1.624729 -60.659205 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -213.107846 -418.959385 2 -103.722676 -213.107846 3 504.287421 -103.722676 4 -167.669266 504.287421 5 -127.462003 -167.669266 6 -44.166881 -127.462003 7 -94.568401 -44.166881 8 239.131510 -94.568401 9 -88.126740 239.131510 10 -254.068547 -88.126740 11 -196.375263 -254.068547 12 67.468828 -196.375263 13 -134.964620 67.468828 14 -215.126662 -134.964620 15 765.820749 -215.126662 16 -295.919427 765.820749 17 95.159025 -295.919427 18 -206.576659 95.159025 19 96.039684 -206.576659 20 -198.862866 96.039684 21 -686.911156 -198.862866 22 -82.887427 -686.911156 23 -26.462664 -82.887427 24 694.713804 -26.462664 25 472.613962 694.713804 26 303.120885 472.613962 27 -310.114715 303.120885 28 -21.982801 -310.114715 29 -226.782311 -21.982801 30 -237.545865 -226.782311 31 -121.385690 -237.545865 32 -602.824976 -121.385690 33 -159.212142 -602.824976 34 -203.520282 -159.212142 35 -25.791252 -203.520282 36 -348.209192 -25.791252 37 -68.584187 -348.209192 38 -97.447411 -68.584187 39 99.534699 -97.447411 40 190.767065 99.534699 41 -147.561245 190.767065 42 -108.879622 -147.561245 43 170.400249 -108.879622 44 791.805556 170.400249 45 857.578160 791.805556 46 58.221761 857.578160 47 32.122271 58.221761 48 730.497938 32.122271 49 192.053664 730.497938 50 -123.886755 192.053664 51 195.021994 -123.886755 52 -646.098704 195.021994 53 41.354513 -646.098704 54 145.579447 41.354513 55 16.562246 145.579447 56 103.822913 16.562246 57 660.995241 103.822913 58 -300.526367 660.995241 59 -91.258774 -300.526367 60 214.876945 -91.258774 61 342.009539 214.876945 62 193.060142 342.009539 63 12.891561 193.060142 64 -413.386504 12.891561 65 -29.724175 -413.386504 66 144.762980 -29.724175 67 554.071066 144.762980 68 56.778856 554.071066 69 103.847570 56.778856 70 146.664717 103.847570 71 76.306089 146.664717 72 21.391135 76.306089 73 -243.677269 21.391135 74 -12.643204 -243.677269 75 -490.138906 -12.643204 76 -403.252535 -490.138906 77 -35.872836 -403.252535 78 -39.036206 -35.872836 79 -68.925050 -39.036206 80 207.480320 -68.925050 81 -26.266115 207.480320 82 -106.431145 -26.266115 83 -72.614584 -106.431145 84 100.610313 -72.614584 85 379.504678 100.610313 86 -153.383740 379.504678 87 376.311594 -153.383740 88 -252.132196 376.311594 89 834.301335 -252.132196 90 -120.742224 834.301335 91 -85.724361 -120.742224 92 89.891243 -85.724361 93 378.754481 89.891243 94 -278.291673 378.754481 95 -201.816472 -278.291673 96 -166.943982 -201.816472 97 -307.680707 -166.943982 98 293.912667 -307.680707 99 38.444000 293.912667 100 -219.217659 38.444000 101 -129.263922 -219.217659 102 -58.549950 -129.263922 103 79.532574 -58.549950 104 176.481063 79.532574 105 -57.770466 176.481063 106 -19.064162 -57.770466 107 -37.219894 -19.064162 108 -48.157522 -37.219894 109 169.020062 -48.157522 110 -496.119007 169.020062 111 -51.862245 -496.119007 112 114.319734 -51.862245 113 32.857004 114.319734 114 -112.056500 32.857004 115 23.715306 -112.056500 116 -361.704452 23.715306 117 131.190663 -361.704452 118 -104.912535 131.190663 119 70.368600 -104.912535 120 360.734225 70.368600 121 -218.063061 360.734225 122 -15.634906 -218.063061 123 169.105263 -15.634906 124 130.461146 169.105263 125 7.901306 130.461146 126 -282.622127 7.901306 127 -491.616838 -282.622127 128 -21.895442 -491.616838 129 -322.039644 -21.895442 130 -190.478690 -322.039644 131 -493.119716 -190.478690 132 2.130102 -493.119716 133 85.989345 2.130102 134 426.438001 85.989345 135 14.437595 426.438001 136 325.891927 14.437595 137 242.945406 325.891927 138 -455.999746 242.945406 139 158.366216 -455.999746 140 -103.070649 158.366216 141 574.858542 -103.070649 142 -154.449485 574.858542 143 420.880736 -154.449485 144 -82.156567 420.880736 145 295.475304 -82.156567 146 316.248999 295.475304 147 -155.428607 316.248999 148 -81.623851 -155.428607 149 6.416701 -81.623851 150 -77.436508 6.416701 151 -77.396901 -77.436508 152 -81.623851 -77.396901 153 -81.623851 -81.623851 154 -11.918136 -81.623851 155 -8.364495 -11.918136 156 -81.623851 -8.364495 157 -79.307212 -81.623851 158 10.454106 -79.307212 159 -18.612853 10.454106 160 -89.675552 -18.612853 161 -99.814748 -89.675552 162 -60.659205 -99.814748 163 1.624729 -60.659205 > 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/79k5i1321990451.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/8v76u1321990451.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/94bvx1321990451.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/107sup1321990451.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/11micv1321990451.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/12jrnd1321990451.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/13ivd61321990451.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/14mjfw1321990451.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/154ke01321990451.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/16sluw1321990451.tab") + } > > try(system("convert tmp/1yw511321990451.ps tmp/1yw511321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/2twww1321990451.ps tmp/2twww1321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/3hunn1321990451.ps tmp/3hunn1321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/490fr1321990451.ps tmp/490fr1321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/5tq801321990451.ps tmp/5tq801321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/6nq691321990451.ps tmp/6nq691321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/79k5i1321990451.ps tmp/79k5i1321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/8v76u1321990451.ps tmp/8v76u1321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/94bvx1321990451.ps tmp/94bvx1321990451.png",intern=TRUE)) character(0) > try(system("convert tmp/107sup1321990451.ps tmp/107sup1321990451.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.741 0.467 5.261