R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(210907 + ,56 + ,145 + ,30 + ,112285 + ,24188 + ,3201 + ,120982 + ,56 + ,101 + ,28 + ,84786 + ,18273 + ,371 + ,176508 + ,54 + ,98 + ,38 + ,83123 + ,14130 + ,1192 + ,179321 + ,89 + ,132 + ,30 + ,101193 + ,32287 + ,1583 + ,123185 + ,40 + ,60 + ,22 + ,38361 + ,8654 + ,1439 + ,52746 + ,25 + ,38 + ,26 + ,68504 + ,9245 + ,1764 + ,385534 + ,92 + ,144 + ,25 + ,119182 + ,33251 + ,1495 + ,33170 + ,18 + ,5 + ,18 + ,22807 + ,1271 + ,1373 + ,149061 + ,44 + ,84 + ,26 + ,116174 + ,27101 + ,1491 + ,165446 + ,33 + ,79 + ,25 + ,57635 + ,16373 + ,4041 + ,237213 + ,84 + ,127 + ,38 + ,66198 + ,19716 + ,1706 + ,173326 + ,88 + ,78 + ,44 + ,71701 + ,17753 + ,2152 + ,133131 + ,55 + ,60 + ,30 + ,57793 + ,9028 + ,1036 + ,258873 + ,60 + ,131 + ,40 + ,80444 + ,18653 + ,1882 + ,180083 + ,66 + ,84 + ,34 + ,53855 + ,8828 + ,1929 + ,324799 + ,154 + ,133 + ,47 + ,97668 + ,29498 + ,2242 + ,230964 + ,53 + ,150 + ,30 + ,133824 + ,27563 + ,1220 + ,236785 + ,119 + ,91 + ,31 + ,101481 + ,18293 + ,1289 + ,135473 + ,41 + ,132 + ,23 + ,99645 + ,22530 + ,2515 + ,202925 + ,61 + ,136 + ,36 + ,114789 + ,15977 + ,2147 + ,215147 + ,58 + ,124 + ,36 + ,99052 + ,35082 + ,2352 + ,344297 + ,75 + ,118 + ,30 + ,67654 + ,16116 + ,1638 + ,153935 + ,33 + ,70 + ,25 + ,65553 + ,15849 + ,1222 + ,132943 + ,40 + ,107 + ,39 + ,97500 + ,16026 + ,1812 + ,174724 + ,92 + ,119 + ,34 + ,69112 + ,26569 + ,1677 + ,174415 + ,100 + ,89 + ,31 + ,82753 + ,24785 + ,1579 + ,225548 + ,112 + ,112 + ,31 + ,85323 + ,17569 + ,1731 + ,223632 + ,73 + ,108 + ,33 + ,72654 + ,23825 + ,807 + ,124817 + ,40 + ,52 + ,25 + ,30727 + ,7869 + ,2452 + ,221698 + ,45 + ,112 + ,33 + ,77873 + ,14975 + ,829 + ,210767 + ,60 + ,116 + ,35 + ,117478 + ,37791 + ,1940 + ,170266 + ,62 + ,123 + ,42 + ,74007 + ,9605 + ,2662 + ,260561 + ,75 + ,125 + ,43 + ,90183 + ,27295 + ,186 + ,84853 + ,31 + ,27 + ,30 + ,61542 + ,2746 + ,1499 + ,294424 + ,77 + ,162 + ,33 + ,101494 + ,34461 + ,865 + ,215641 + ,46 + ,64 + ,32 + ,55813 + ,4787 + ,2527 + ,325107 + ,99 + ,92 + ,36 + ,79215 + ,24919 + ,2747 + ,167542 + ,66 + ,83 + ,28 + ,55461 + ,16329 + ,2702 + ,106408 + ,30 + ,41 + ,14 + ,31081 + ,12558 + ,1383 + ,265769 + ,146 + ,120 + ,32 + ,83122 + ,28522 + ,2099 + ,269651 + ,67 + ,105 + ,30 + ,70106 + ,22265 + ,4308 + ,149112 + ,56 + ,79 + ,35 + ,60578 + ,14459 + ,918 + ,152871 + ,58 + ,70 + ,28 + ,79892 + ,22240 + ,3373 + ,111665 + ,34 + ,55 + ,28 + ,49810 + ,11802 + ,1713 + ,116408 + ,61 + ,39 + ,39 + ,71570 + ,7623 + ,1438 + ,362301 + ,119 + ,67 + ,34 + ,100708 + ,11912 + ,496 + ,78800 + ,42 + ,21 + ,26 + ,33032 + ,7935 + ,2253 + ,183167 + ,66 + ,127 + ,39 + ,82875 + ,18220 + ,744 + ,277965 + ,89 + ,152 + ,39 + ,139077 + ,19199 + ,1161 + ,150629 + ,44 + ,113 + ,33 + ,71595 + ,19918 + ,2352 + ,168809 + ,66 + ,99 + ,28 + ,72260 + ,21884 + ,2144 + ,24188 + ,24 + ,7 + ,4 + ,5950 + ,2694 + ,4691 + ,329267 + ,259 + ,141 + ,39 + ,115762 + ,15808 + ,1112 + ,65029 + ,17 + ,21 + ,18 + ,32551 + ,3597 + ,2694 + ,101097 + ,64 + ,35 + ,14 + ,31701 + ,5296 + ,1973 + ,218946 + ,41 + ,109 + ,29 + ,80670 + ,25239 + ,1769 + ,244052 + ,68 + ,133 + ,44 + ,143558 + ,29801 + ,3148 + ,233328 + ,132 + ,230 + ,28 + ,120733 + ,34861 + ,1954 + ,256462 + ,105 + ,166 + ,35 + ,105195 + ,35940 + ,1226 + ,206161 + ,71 + ,68 + ,28 + ,73107 + ,16688 + ,1389 + ,311473 + ,112 + ,147 + ,38 + ,132068 + ,24683 + ,1496 + ,235800 + ,94 + ,179 + ,23 + ,149193 + ,46230 + ,2269 + ,177939 + ,82 + ,61 + ,36 + ,46821 + ,10387 + ,1833 + ,207176 + ,70 + ,101 + ,32 + ,87011 + ,21436 + ,1268 + ,196553 + ,57 + ,108 + ,29 + ,95260 + ,30546 + ,1943 + ,174184 + ,53 + ,90 + ,25 + ,55183 + ,19746 + ,893 + ,143246 + ,103 + ,114 + ,27 + ,106671 + ,15977 + ,1762 + ,187559 + ,121 + ,103 + ,36 + ,73511 + ,22583 + ,1403 + ,187681 + ,62 + ,142 + ,28 + ,92945 + ,17274 + ,1425 + ,119016 + ,52 + ,79 + ,23 + ,78664 + ,16469 + ,1857 + ,182192 + ,52 + ,88 + ,40 + ,70054 + ,14251 + ,1840 + ,73566 + ,32 + ,25 + ,23 + ,22618 + ,3007 + ,1502 + ,194979 + ,62 + ,83 + ,40 + ,74011 + ,16851 + ,1441 + ,167488 + ,45 + ,113 + ,28 + ,83737 + ,21113 + ,1420 + ,143756 + ,46 + ,118 + ,34 + ,69094 + ,17401 + ,1416 + ,275541 + ,63 + ,110 + ,33 + ,93133 + ,23958 + ,2970 + ,243199 + ,75 + ,129 + ,28 + ,95536 + ,23567 + ,1317 + ,182999 + ,88 + ,51 + ,34 + ,225920 + ,13065 + ,1644 + ,135649 + ,46 + ,93 + ,30 + ,62133 + ,15358 + ,870 + ,152299 + ,53 + ,76 + ,33 + ,61370 + ,14587 + ,1654 + ,120221 + ,37 + ,49 + ,22 + ,43836 + ,12770 + ,1054 + ,346485 + ,90 + ,118 + ,38 + ,106117 + ,24021 + ,937 + ,145790 + ,63 + ,38 + ,26 + ,38692 + ,9648 + ,3004 + ,193339 + ,78 + ,141 + ,35 + ,84651 + ,20537 + ,2008 + ,80953 + ,25 + ,58 + ,8 + ,56622 + ,7905 + ,2547 + ,122774 + ,45 + ,27 + ,24 + ,15986 + ,4527 + ,1885 + ,130585 + ,46 + ,91 + ,29 + ,95364 + ,30495 + ,1626 + ,286468 + ,144 + ,63 + ,29 + ,89691 + ,17719 + ,2445 + ,241066 + ,82 + ,56 + ,45 + ,67267 + ,27056 + ,1964 + ,148446 + ,91 + ,144 + ,37 + ,126846 + ,33473 + ,1381 + ,204713 + ,71 + ,73 + ,33 + ,41140 + ,9758 + ,1369 + ,182079 + ,63 + ,168 + ,33 + ,102860 + ,21115 + ,1659 + ,140344 + ,53 + ,64 + ,25 + ,51715 + ,7236 + ,2888 + ,220516 + ,62 + ,97 + ,32 + ,55801 + ,13790 + ,1290 + ,243060 + ,63 + ,117 + ,29 + ,111813 + ,32902 + ,2845 + ,162765 + ,32 + ,100 + ,28 + ,120293 + ,25131 + ,1982 + ,182613 + ,39 + ,149 + ,28 + ,138599 + ,30910 + ,1904 + ,232138 + ,62 + ,187 + ,31 + ,161647 + ,35947 + ,1391 + ,265318 + ,117 + ,127 + ,52 + ,115929 + ,29848 + ,602 + ,310839 + ,92 + ,245 + ,24 + ,162901 + ,42705 + ,1559 + ,225060 + ,93 + ,87 + ,41 + ,109825 + ,31808 + ,2014 + ,232317 + ,54 + ,177 + ,33 + ,129838 + ,26675 + ,2143 + ,144966 + ,144 + ,49 + ,32 + ,37510 + ,8435 + ,2146 + ,43287 + ,14 + ,49 + ,19 + ,43750 + ,7409 + ,874 + ,155754 + ,61 + ,73 + ,20 + ,40652 + ,14993 + ,1590 + ,164709 + ,109 + ,177 + ,31 + ,87771 + ,36867 + ,1590 + ,201940 + ,38 + ,94 + ,31 + ,85872 + ,33835 + ,1210 + ,235454 + ,73 + ,117 + ,32 + ,89275 + ,24164 + ,2072 + ,99466 + ,50 + ,55 + ,23 + ,192565 + ,22609 + ,1401 + ,100750 + ,72 + ,58 + ,30 + ,140867 + ,6440 + ,391 + ,224549 + ,50 + ,95 + ,31 + ,120662 + ,21916 + ,761 + ,243511 + ,71 + ,129 + ,42 + ,101338 + ,20556 + ,1386 + ,22938 + ,10 + ,11 + ,1 + ,1168 + ,238 + ,2395 + ,152474 + ,65 + ,101 + ,32 + ,65567 + ,22392 + ,1742 + ,61857 + ,25 + ,28 + ,11 + ,25162 + ,3913 + ,620 + ,132487 + ,41 + ,89 + ,36 + ,40735 + ,8388 + ,800 + ,317394 + ,86 + ,193 + ,31 + ,91413 + ,22120 + ,1684 + ,21054 + ,16 + ,4 + ,0 + ,855 + ,338 + ,1050 + ,209641 + ,42 + ,84 + ,24 + ,97068 + ,11727 + ,2699 + ,31414 + ,19 + ,39 + ,8 + ,14116 + ,3988 + ,1502 + ,244749 + ,95 + ,101 + ,33 + ,76643 + ,20923 + ,1459 + ,184510 + ,49 + ,82 + ,40 + ,110681 + ,20237 + ,2158 + ,128423 + ,64 + ,36 + ,38 + ,92696 + ,3769 + ,1421 + ,97839 + ,38 + ,75 + ,24 + ,94785 + ,12252 + ,2833 + ,38214 + ,34 + ,16 + ,8 + ,8773 + ,1888 + ,1955 + ,151101 + ,32 + ,55 + ,35 + ,83209 + ,14497 + ,2922 + ,272458 + ,65 + ,131 + ,43 + ,93815 + ,28864 + ,1002 + ,172494 + ,52 + ,131 + ,43 + ,86687 + ,21721 + ,1060 + ,328107 + ,65 + ,144 + ,41 + ,105547 + ,33644 + ,2186 + ,250579 + ,83 + ,139 + ,38 + ,103487 + ,15923 + ,3604 + ,351067 + ,95 + ,211 + ,45 + ,213688 + ,42935 + ,1035 + ,158015 + ,29 + ,78 + ,31 + ,71220 + ,18864 + ,1417 + ,85439 + ,33 + ,39 + ,28 + ,56926 + ,7785 + ,1587 + ,229242 + ,247 + ,90 + ,31 + ,91721 + ,17939 + ,1424 + ,351619 + ,139 + ,166 + ,40 + ,115168 + ,23436 + ,1701 + ,84207 + ,29 + ,12 + ,30 + ,111194 + ,325 + ,1249 + ,324598 + ,110 + ,133 + ,37 + ,135777 + ,34538 + ,1926 + ,131069 + ,67 + ,69 + ,30 + ,51513 + ,12198 + ,3352 + ,204271 + ,42 + ,119 + ,35 + ,74163 + ,26924 + ,1641 + ,165543 + ,65 + ,119 + ,32 + ,51633 + ,12716 + ,2035 + ,141722 + ,94 + ,65 + ,27 + ,75345 + ,8172 + ,2312 + ,299775 + ,95 + ,101 + ,31 + ,98952 + ,14300 + ,2201 + ,195838 + ,67 + ,196 + ,31 + ,102372 + ,25515 + ,961 + ,173260 + ,63 + ,15 + ,21 + ,37238 + ,2805 + ,1900 + ,254488 + ,83 + ,136 + ,39 + ,103772 + ,29402 + ,1254 + ,104389 + ,45 + ,89 + ,41 + ,123969 + ,16440 + ,1335 + ,199476 + ,70 + ,123 + ,32 + ,135400 + ,28732 + ,207 + ,224330 + ,83 + ,163 + ,39 + ,130115 + ,28608 + ,2429 + ,14688 + ,10 + ,5 + ,0 + ,6023 + ,2065 + ,1639 + ,181633 + ,70 + ,96 + ,30 + ,64466 + ,14817 + ,872 + ,271856 + ,103 + ,151 + ,37 + ,54990 + ,16714 + ,1318 + ,7199 + ,5 + ,6 + ,0 + ,1644 + ,556 + ,1018 + ,46660 + ,20 + ,13 + ,5 + ,6179 + ,2089 + ,1383 + ,17547 + ,5 + ,3 + ,1 + ,3926 + ,2658 + ,1314 + ,95227 + ,34 + ,23 + ,32 + ,34777 + ,1669 + ,1403 + ,152601 + ,48 + ,57 + ,24 + ,73224 + ,16267 + ,910) + ,dim=c(7 + ,156) + ,dimnames=list(c('time_in_rfc' + ,'logins' + ,'totblogs' + ,'compendiums_reviewed' + ,'totsize' + ,'totrevisions' + ,'Pageviews') + ,1:156)) > y <- array(NA,dim=c(7,156),dimnames=list(c('time_in_rfc','logins','totblogs','compendiums_reviewed','totsize','totrevisions','Pageviews'),1:156)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > 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 time_in_rfc logins totblogs compendiums_reviewed totsize totrevisions 1 210907 56 145 30 112285 24188 2 120982 56 101 28 84786 18273 3 176508 54 98 38 83123 14130 4 179321 89 132 30 101193 32287 5 123185 40 60 22 38361 8654 6 52746 25 38 26 68504 9245 7 385534 92 144 25 119182 33251 8 33170 18 5 18 22807 1271 9 149061 44 84 26 116174 27101 10 165446 33 79 25 57635 16373 11 237213 84 127 38 66198 19716 12 173326 88 78 44 71701 17753 13 133131 55 60 30 57793 9028 14 258873 60 131 40 80444 18653 15 180083 66 84 34 53855 8828 16 324799 154 133 47 97668 29498 17 230964 53 150 30 133824 27563 18 236785 119 91 31 101481 18293 19 135473 41 132 23 99645 22530 20 202925 61 136 36 114789 15977 21 215147 58 124 36 99052 35082 22 344297 75 118 30 67654 16116 23 153935 33 70 25 65553 15849 24 132943 40 107 39 97500 16026 25 174724 92 119 34 69112 26569 26 174415 100 89 31 82753 24785 27 225548 112 112 31 85323 17569 28 223632 73 108 33 72654 23825 29 124817 40 52 25 30727 7869 30 221698 45 112 33 77873 14975 31 210767 60 116 35 117478 37791 32 170266 62 123 42 74007 9605 33 260561 75 125 43 90183 27295 34 84853 31 27 30 61542 2746 35 294424 77 162 33 101494 34461 36 215641 46 64 32 55813 4787 37 325107 99 92 36 79215 24919 38 167542 66 83 28 55461 16329 39 106408 30 41 14 31081 12558 40 265769 146 120 32 83122 28522 41 269651 67 105 30 70106 22265 42 149112 56 79 35 60578 14459 43 152871 58 70 28 79892 22240 44 111665 34 55 28 49810 11802 45 116408 61 39 39 71570 7623 46 362301 119 67 34 100708 11912 47 78800 42 21 26 33032 7935 48 183167 66 127 39 82875 18220 49 277965 89 152 39 139077 19199 50 150629 44 113 33 71595 19918 51 168809 66 99 28 72260 21884 52 24188 24 7 4 5950 2694 53 329267 259 141 39 115762 15808 54 65029 17 21 18 32551 3597 55 101097 64 35 14 31701 5296 56 218946 41 109 29 80670 25239 57 244052 68 133 44 143558 29801 58 233328 132 230 28 120733 34861 59 256462 105 166 35 105195 35940 60 206161 71 68 28 73107 16688 61 311473 112 147 38 132068 24683 62 235800 94 179 23 149193 46230 63 177939 82 61 36 46821 10387 64 207176 70 101 32 87011 21436 65 196553 57 108 29 95260 30546 66 174184 53 90 25 55183 19746 67 143246 103 114 27 106671 15977 68 187559 121 103 36 73511 22583 69 187681 62 142 28 92945 17274 70 119016 52 79 23 78664 16469 71 182192 52 88 40 70054 14251 72 73566 32 25 23 22618 3007 73 194979 62 83 40 74011 16851 74 167488 45 113 28 83737 21113 75 143756 46 118 34 69094 17401 76 275541 63 110 33 93133 23958 77 243199 75 129 28 95536 23567 78 182999 88 51 34 225920 13065 79 135649 46 93 30 62133 15358 80 152299 53 76 33 61370 14587 81 120221 37 49 22 43836 12770 82 346485 90 118 38 106117 24021 83 145790 63 38 26 38692 9648 84 193339 78 141 35 84651 20537 85 80953 25 58 8 56622 7905 86 122774 45 27 24 15986 4527 87 130585 46 91 29 95364 30495 88 286468 144 63 29 89691 17719 89 241066 82 56 45 67267 27056 90 148446 91 144 37 126846 33473 91 204713 71 73 33 41140 9758 92 182079 63 168 33 102860 21115 93 140344 53 64 25 51715 7236 94 220516 62 97 32 55801 13790 95 243060 63 117 29 111813 32902 96 162765 32 100 28 120293 25131 97 182613 39 149 28 138599 30910 98 232138 62 187 31 161647 35947 99 265318 117 127 52 115929 29848 100 310839 92 245 24 162901 42705 101 225060 93 87 41 109825 31808 102 232317 54 177 33 129838 26675 103 144966 144 49 32 37510 8435 104 43287 14 49 19 43750 7409 105 155754 61 73 20 40652 14993 106 164709 109 177 31 87771 36867 107 201940 38 94 31 85872 33835 108 235454 73 117 32 89275 24164 109 99466 50 55 23 192565 22609 110 100750 72 58 30 140867 6440 111 224549 50 95 31 120662 21916 112 243511 71 129 42 101338 20556 113 22938 10 11 1 1168 238 114 152474 65 101 32 65567 22392 115 61857 25 28 11 25162 3913 116 132487 41 89 36 40735 8388 117 317394 86 193 31 91413 22120 118 21054 16 4 0 855 338 119 209641 42 84 24 97068 11727 120 31414 19 39 8 14116 3988 121 244749 95 101 33 76643 20923 122 184510 49 82 40 110681 20237 123 128423 64 36 38 92696 3769 124 97839 38 75 24 94785 12252 125 38214 34 16 8 8773 1888 126 151101 32 55 35 83209 14497 127 272458 65 131 43 93815 28864 128 172494 52 131 43 86687 21721 129 328107 65 144 41 105547 33644 130 250579 83 139 38 103487 15923 131 351067 95 211 45 213688 42935 132 158015 29 78 31 71220 18864 133 85439 33 39 28 56926 7785 134 229242 247 90 31 91721 17939 135 351619 139 166 40 115168 23436 136 84207 29 12 30 111194 325 137 324598 110 133 37 135777 34538 138 131069 67 69 30 51513 12198 139 204271 42 119 35 74163 26924 140 165543 65 119 32 51633 12716 141 141722 94 65 27 75345 8172 142 299775 95 101 31 98952 14300 143 195838 67 196 31 102372 25515 144 173260 63 15 21 37238 2805 145 254488 83 136 39 103772 29402 146 104389 45 89 41 123969 16440 147 199476 70 123 32 135400 28732 148 224330 83 163 39 130115 28608 149 14688 10 5 0 6023 2065 150 181633 70 96 30 64466 14817 151 271856 103 151 37 54990 16714 152 7199 5 6 0 1644 556 153 46660 20 13 5 6179 2089 154 17547 5 3 1 3926 2658 155 95227 34 23 32 34777 1669 156 152601 48 57 24 73224 16267 Pageviews 1 3201 2 371 3 1192 4 1583 5 1439 6 1764 7 1495 8 1373 9 1491 10 4041 11 1706 12 2152 13 1036 14 1882 15 1929 16 2242 17 1220 18 1289 19 2515 20 2147 21 2352 22 1638 23 1222 24 1812 25 1677 26 1579 27 1731 28 807 29 2452 30 829 31 1940 32 2662 33 186 34 1499 35 865 36 2527 37 2747 38 2702 39 1383 40 2099 41 4308 42 918 43 3373 44 1713 45 1438 46 496 47 2253 48 744 49 1161 50 2352 51 2144 52 4691 53 1112 54 2694 55 1973 56 1769 57 3148 58 1954 59 1226 60 1389 61 1496 62 2269 63 1833 64 1268 65 1943 66 893 67 1762 68 1403 69 1425 70 1857 71 1840 72 1502 73 1441 74 1420 75 1416 76 2970 77 1317 78 1644 79 870 80 1654 81 1054 82 937 83 3004 84 2008 85 2547 86 1885 87 1626 88 2445 89 1964 90 1381 91 1369 92 1659 93 2888 94 1290 95 2845 96 1982 97 1904 98 1391 99 602 100 1559 101 2014 102 2143 103 2146 104 874 105 1590 106 1590 107 1210 108 2072 109 1401 110 391 111 761 112 1386 113 2395 114 1742 115 620 116 800 117 1684 118 1050 119 2699 120 1502 121 1459 122 2158 123 1421 124 2833 125 1955 126 2922 127 1002 128 1060 129 2186 130 3604 131 1035 132 1417 133 1587 134 1424 135 1701 136 1249 137 1926 138 3352 139 1641 140 2035 141 2312 142 2201 143 961 144 1900 145 1254 146 1335 147 207 148 2429 149 1639 150 872 151 1318 152 1018 153 1383 154 1314 155 1403 156 910 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) logins totblogs -7.923e+03 7.266e+02 4.834e+02 compendiums_reviewed totsize totrevisions 2.093e+03 -6.233e-04 1.400e+00 Pageviews 4.893e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -116338 -26660 -2439 19373 161175 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -7.923e+03 1.510e+04 -0.525 0.600701 logins 7.266e+02 1.158e+02 6.276 3.58e-09 *** totblogs 4.834e+02 1.371e+02 3.527 0.000559 *** compendiums_reviewed 2.093e+03 4.895e+02 4.276 3.38e-05 *** totsize -6.233e-04 1.384e-01 -0.005 0.996412 totrevisions 1.400e+00 6.549e-01 2.137 0.034213 * Pageviews 4.893e+00 4.786e+00 1.022 0.308339 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 44580 on 149 degrees of freedom Multiple R-squared: 0.7097, Adjusted R-squared: 0.698 F-statistic: 60.7 on 6 and 149 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.9507033 9.859338e-02 4.929669e-02 [2,] 0.9072077 1.855846e-01 9.279228e-02 [3,] 0.8774049 2.451902e-01 1.225951e-01 [4,] 0.8089465 3.821070e-01 1.910535e-01 [5,] 0.8848907 2.302186e-01 1.151093e-01 [6,] 0.8292600 3.414801e-01 1.707400e-01 [7,] 0.7681626 4.636748e-01 2.318374e-01 [8,] 0.6931291 6.137418e-01 3.068709e-01 [9,] 0.6238743 7.522513e-01 3.761257e-01 [10,] 0.7374242 5.251516e-01 2.625758e-01 [11,] 0.6692075 6.615850e-01 3.307925e-01 [12,] 0.5944875 8.110250e-01 4.055125e-01 [13,] 0.8845118 2.309764e-01 1.154882e-01 [14,] 0.8636510 2.726979e-01 1.363490e-01 [15,] 0.8314170 3.371659e-01 1.685830e-01 [16,] 0.9020391 1.959219e-01 9.796093e-02 [17,] 0.8937450 2.125100e-01 1.062550e-01 [18,] 0.8793888 2.412223e-01 1.206112e-01 [19,] 0.8486224 3.027553e-01 1.513776e-01 [20,] 0.8077620 3.844759e-01 1.922380e-01 [21,] 0.7945586 4.108828e-01 2.054414e-01 [22,] 0.7629738 4.740525e-01 2.370262e-01 [23,] 0.7476366 5.047268e-01 2.523634e-01 [24,] 0.7156209 5.687581e-01 2.843791e-01 [25,] 0.6835544 6.328912e-01 3.164456e-01 [26,] 0.6448879 7.102241e-01 3.551121e-01 [27,] 0.7725636 4.548728e-01 2.274364e-01 [28,] 0.9005971 1.988058e-01 9.940289e-02 [29,] 0.8780985 2.438030e-01 1.219015e-01 [30,] 0.8492378 3.015244e-01 1.507622e-01 [31,] 0.8361667 3.276666e-01 1.638333e-01 [32,] 0.8524107 2.951785e-01 1.475893e-01 [33,] 0.8225919 3.548163e-01 1.774081e-01 [34,] 0.7886211 4.227577e-01 2.113789e-01 [35,] 0.7497200 5.005601e-01 2.502800e-01 [36,] 0.7188630 5.622740e-01 2.811370e-01 [37,] 0.9707900 5.841994e-02 2.920997e-02 [38,] 0.9638618 7.227646e-02 3.613823e-02 [39,] 0.9585014 8.299711e-02 4.149856e-02 [40,] 0.9500308 9.993842e-02 4.996921e-02 [41,] 0.9431104 1.137793e-01 5.688964e-02 [42,] 0.9320220 1.359560e-01 6.797801e-02 [43,] 0.9256542 1.486916e-01 7.434578e-02 [44,] 0.9633161 7.336781e-02 3.668390e-02 [45,] 0.9526415 9.471703e-02 4.735852e-02 [46,] 0.9397509 1.204982e-01 6.024910e-02 [47,] 0.9341137 1.317726e-01 6.588632e-02 [48,] 0.9181580 1.636840e-01 8.184200e-02 [49,] 0.9654287 6.914264e-02 3.457132e-02 [50,] 0.9576704 8.465927e-02 4.232964e-02 [51,] 0.9544948 9.101044e-02 4.550522e-02 [52,] 0.9533476 9.330477e-02 4.665239e-02 [53,] 0.9503938 9.921244e-02 4.960622e-02 [54,] 0.9367369 1.265261e-01 6.326306e-02 [55,] 0.9216177 1.567646e-01 7.838230e-02 [56,] 0.9025888 1.948224e-01 9.741122e-02 [57,] 0.8834918 2.330164e-01 1.165082e-01 [58,] 0.9109764 1.780471e-01 8.902356e-02 [59,] 0.9193307 1.613386e-01 8.066930e-02 [60,] 0.9005856 1.988289e-01 9.941443e-02 [61,] 0.8889355 2.221290e-01 1.110645e-01 [62,] 0.8647166 2.705669e-01 1.352834e-01 [63,] 0.8396279 3.207442e-01 1.603721e-01 [64,] 0.8090125 3.819750e-01 1.909875e-01 [65,] 0.7757276 4.485448e-01 2.242724e-01 [66,] 0.7675659 4.648683e-01 2.324341e-01 [67,] 0.8038327 3.923345e-01 1.961673e-01 [68,] 0.7921428 4.157144e-01 2.078572e-01 [69,] 0.7618760 4.762479e-01 2.381240e-01 [70,] 0.7332745 5.334510e-01 2.667255e-01 [71,] 0.6960350 6.079300e-01 3.039650e-01 [72,] 0.6546031 6.907938e-01 3.453969e-01 [73,] 0.8566061 2.867877e-01 1.433939e-01 [74,] 0.8284715 3.430570e-01 1.715285e-01 [75,] 0.8164820 3.670361e-01 1.835180e-01 [76,] 0.7833626 4.332748e-01 2.166374e-01 [77,] 0.7527400 4.945199e-01 2.472600e-01 [78,] 0.7649641 4.700718e-01 2.350359e-01 [79,] 0.8042072 3.915856e-01 1.957928e-01 [80,] 0.7773652 4.452695e-01 2.226348e-01 [81,] 0.9132850 1.734301e-01 8.671505e-02 [82,] 0.9090693 1.818614e-01 9.093071e-02 [83,] 0.9097806 1.804388e-01 9.021942e-02 [84,] 0.8880244 2.239511e-01 1.119756e-01 [85,] 0.8898365 2.203270e-01 1.101635e-01 [86,] 0.8727663 2.544674e-01 1.272337e-01 [87,] 0.8459872 3.080256e-01 1.540128e-01 [88,] 0.8277845 3.444310e-01 1.722155e-01 [89,] 0.8052618 3.894764e-01 1.947382e-01 [90,] 0.7766005 4.467991e-01 2.233995e-01 [91,] 0.7420805 5.158391e-01 2.579195e-01 [92,] 0.7039470 5.921060e-01 2.960530e-01 [93,] 0.6647020 6.705960e-01 3.352980e-01 [94,] 0.6880489 6.239021e-01 3.119511e-01 [95,] 0.6733909 6.532181e-01 3.266091e-01 [96,] 0.6293429 7.413143e-01 3.706571e-01 [97,] 0.9034813 1.930374e-01 9.651868e-02 [98,] 0.8806243 2.387514e-01 1.193757e-01 [99,] 0.8553280 2.893440e-01 1.446720e-01 [100,] 0.8618231 2.763538e-01 1.381769e-01 [101,] 0.8517804 2.964392e-01 1.482196e-01 [102,] 0.8548474 2.903052e-01 1.451526e-01 [103,] 0.8256361 3.487278e-01 1.743639e-01 [104,] 0.7884487 4.231027e-01 2.115513e-01 [105,] 0.7994691 4.010618e-01 2.005309e-01 [106,] 0.7594734 4.810532e-01 2.405266e-01 [107,] 0.7167378 5.665244e-01 2.832622e-01 [108,] 0.7584933 4.830133e-01 2.415067e-01 [109,] 0.7124750 5.750499e-01 2.875250e-01 [110,] 0.7715107 4.569785e-01 2.284893e-01 [111,] 0.7365913 5.268174e-01 2.634087e-01 [112,] 0.7011743 5.976515e-01 2.988257e-01 [113,] 0.6488471 7.023058e-01 3.511529e-01 [114,] 0.5931046 8.137908e-01 4.068954e-01 [115,] 0.5914767 8.170467e-01 4.085233e-01 [116,] 0.5412279 9.175441e-01 4.587721e-01 [117,] 0.4828061 9.656122e-01 5.171939e-01 [118,] 0.4475866 8.951732e-01 5.524134e-01 [119,] 0.4348443 8.696886e-01 5.651557e-01 [120,] 0.4808950 9.617899e-01 5.191050e-01 [121,] 0.4143025 8.286050e-01 5.856975e-01 [122,] 0.3668251 7.336503e-01 6.331749e-01 [123,] 0.3022720 6.045441e-01 6.977280e-01 [124,] 0.2596434 5.192868e-01 7.403566e-01 [125,] 0.9121324 1.757352e-01 8.786759e-02 [126,] 0.8787293 2.425413e-01 1.212707e-01 [127,] 0.8764554 2.470891e-01 1.235446e-01 [128,] 0.8302349 3.395303e-01 1.697651e-01 [129,] 0.8469474 3.061052e-01 1.530526e-01 [130,] 0.8084610 3.830780e-01 1.915390e-01 [131,] 0.7344801 5.310398e-01 2.655199e-01 [132,] 0.9958071 8.385835e-03 4.192918e-03 [133,] 0.9994061 1.187747e-03 5.938735e-04 [134,] 0.9999709 5.810043e-05 2.905021e-05 [135,] 0.9998145 3.709290e-04 1.854645e-04 [136,] 0.9997409 5.182174e-04 2.591087e-04 [137,] 0.9975806 4.838868e-03 2.419434e-03 > postscript(file="/var/wessaorg/rcomp/tmp/1eunu1353357939.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/2eqt61353357939.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/3a8w91353357939.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/4mfkh1353357939.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/5ymkt1353357939.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 = 156 Frequency = 1 1 2 3 4 5 -4189.77676 -46550.03134 -7269.25779 -56894.85918 7865.11190 6 7 8 9 10 -51810.81248 150894.77605 -20558.64774 -15165.40756 16224.96005 11 12 13 14 15 7275.57985 -47819.44621 -8370.67371 40889.25657 6523.63741 16 17 18 19 20 5969.84718 20611.83251 17525.35589 -42120.90949 -7360.03964 21 22 23 24 25 -14911.89387 147365.67660 23595.78156 -52784.41593 -58235.39111 26 27 28 29 30 -40590.62575 63.41847 19987.59987 3223.14672 48746.94622 31 32 33 34 35 -16549.31222 -40645.22969 24508.17966 -16728.51826 46615.94627 36 37 38 39 40 73198.70332 93008.36601 -7256.59316 19087.22202 -7512.12567 41 42 43 44 45 63147.47749 -19788.64502 -21372.29717 -15176.01531 -38129.81532 46 47 48 49 50 161175.42261 -30471.50685 -28973.96232 33652.17208 -36453.32654 51 52 53 54 55 -18758.96329 -23801.93709 -28272.90952 -5420.68188 -748.15324 56 57 58 59 60 39759.09920 -10841.93638 -82724.42422 -21643.64605 40913.44837 61 62 63 64 65 45639.64975 -34961.06464 -2029.74839 12285.44371 -2046.11267 66 67 68 69 70 15793.79946 -66204.47208 -55999.52302 -7783.83751 -29259.31349 71 72 73 74 75 -2831.97770 -13528.79510 3421.82488 -6961.10967 -41188.29790 76 77 78 79 80 67438.96674 36294.73444 4978.80585 -23311.44271 -12565.54486 81 82 83 84 85 8524.21000 114300.51034 6973.95707 -35343.16825 2438.47456 86 87 88 89 90 19168.41879 -50181.44589 61905.65647 20717.50199 -110330.38964 91 92 93 94 95 36361.57332 -43660.94034 2269.71486 43946.77871 28050.08886 96 97 98 99 100 -4305.44208 -20926.45096 -17286.98574 -26646.91599 15949.44638 101 102 103 104 105 -16764.18091 -1368.26891 -64682.07021 -37035.33477 13467.60406 106 107 108 109 110 -116337.94858 18704.34211 22898.36052 -42046.50682 -45306.37982 111 112 113 114 115 51012.94142 14092.09850 4133.78325 -42454.40046 6562.35410 116 117 118 119 120 -23379.53941 65507.52697 9807.83938 66650.55971 -22987.17001 121 122 123 124 125 29378.39873 -5343.11909 -19260.45408 -39286.38967 -15247.57030 126 127 128 129 130 1395.58665 34583.97660 -46224.68701 75658.16910 11613.11093 131 132 133 134 135 28755.03017 8986.27436 -26697.28168 -82705.81938 53529.53580 136 137 138 139 140 -4027.36350 53182.66830 -39274.86104 5229.34610 -25985.36726 141 142 143 144 145 -29288.00473 94244.13374 -44901.68609 71006.21179 7510.75887 146 147 148 149 150 -78684.91444 -11040.54349 -40320.53789 2021.88563 4533.65355 151 152 153 154 155 24698.30395 2830.16883 13615.18316 8146.38687 -8825.97834 156 20686.83106 > postscript(file="/var/wessaorg/rcomp/tmp/6hevs1353357939.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 -4189.77676 NA 1 -46550.03134 -4189.77676 2 -7269.25779 -46550.03134 3 -56894.85918 -7269.25779 4 7865.11190 -56894.85918 5 -51810.81248 7865.11190 6 150894.77605 -51810.81248 7 -20558.64774 150894.77605 8 -15165.40756 -20558.64774 9 16224.96005 -15165.40756 10 7275.57985 16224.96005 11 -47819.44621 7275.57985 12 -8370.67371 -47819.44621 13 40889.25657 -8370.67371 14 6523.63741 40889.25657 15 5969.84718 6523.63741 16 20611.83251 5969.84718 17 17525.35589 20611.83251 18 -42120.90949 17525.35589 19 -7360.03964 -42120.90949 20 -14911.89387 -7360.03964 21 147365.67660 -14911.89387 22 23595.78156 147365.67660 23 -52784.41593 23595.78156 24 -58235.39111 -52784.41593 25 -40590.62575 -58235.39111 26 63.41847 -40590.62575 27 19987.59987 63.41847 28 3223.14672 19987.59987 29 48746.94622 3223.14672 30 -16549.31222 48746.94622 31 -40645.22969 -16549.31222 32 24508.17966 -40645.22969 33 -16728.51826 24508.17966 34 46615.94627 -16728.51826 35 73198.70332 46615.94627 36 93008.36601 73198.70332 37 -7256.59316 93008.36601 38 19087.22202 -7256.59316 39 -7512.12567 19087.22202 40 63147.47749 -7512.12567 41 -19788.64502 63147.47749 42 -21372.29717 -19788.64502 43 -15176.01531 -21372.29717 44 -38129.81532 -15176.01531 45 161175.42261 -38129.81532 46 -30471.50685 161175.42261 47 -28973.96232 -30471.50685 48 33652.17208 -28973.96232 49 -36453.32654 33652.17208 50 -18758.96329 -36453.32654 51 -23801.93709 -18758.96329 52 -28272.90952 -23801.93709 53 -5420.68188 -28272.90952 54 -748.15324 -5420.68188 55 39759.09920 -748.15324 56 -10841.93638 39759.09920 57 -82724.42422 -10841.93638 58 -21643.64605 -82724.42422 59 40913.44837 -21643.64605 60 45639.64975 40913.44837 61 -34961.06464 45639.64975 62 -2029.74839 -34961.06464 63 12285.44371 -2029.74839 64 -2046.11267 12285.44371 65 15793.79946 -2046.11267 66 -66204.47208 15793.79946 67 -55999.52302 -66204.47208 68 -7783.83751 -55999.52302 69 -29259.31349 -7783.83751 70 -2831.97770 -29259.31349 71 -13528.79510 -2831.97770 72 3421.82488 -13528.79510 73 -6961.10967 3421.82488 74 -41188.29790 -6961.10967 75 67438.96674 -41188.29790 76 36294.73444 67438.96674 77 4978.80585 36294.73444 78 -23311.44271 4978.80585 79 -12565.54486 -23311.44271 80 8524.21000 -12565.54486 81 114300.51034 8524.21000 82 6973.95707 114300.51034 83 -35343.16825 6973.95707 84 2438.47456 -35343.16825 85 19168.41879 2438.47456 86 -50181.44589 19168.41879 87 61905.65647 -50181.44589 88 20717.50199 61905.65647 89 -110330.38964 20717.50199 90 36361.57332 -110330.38964 91 -43660.94034 36361.57332 92 2269.71486 -43660.94034 93 43946.77871 2269.71486 94 28050.08886 43946.77871 95 -4305.44208 28050.08886 96 -20926.45096 -4305.44208 97 -17286.98574 -20926.45096 98 -26646.91599 -17286.98574 99 15949.44638 -26646.91599 100 -16764.18091 15949.44638 101 -1368.26891 -16764.18091 102 -64682.07021 -1368.26891 103 -37035.33477 -64682.07021 104 13467.60406 -37035.33477 105 -116337.94858 13467.60406 106 18704.34211 -116337.94858 107 22898.36052 18704.34211 108 -42046.50682 22898.36052 109 -45306.37982 -42046.50682 110 51012.94142 -45306.37982 111 14092.09850 51012.94142 112 4133.78325 14092.09850 113 -42454.40046 4133.78325 114 6562.35410 -42454.40046 115 -23379.53941 6562.35410 116 65507.52697 -23379.53941 117 9807.83938 65507.52697 118 66650.55971 9807.83938 119 -22987.17001 66650.55971 120 29378.39873 -22987.17001 121 -5343.11909 29378.39873 122 -19260.45408 -5343.11909 123 -39286.38967 -19260.45408 124 -15247.57030 -39286.38967 125 1395.58665 -15247.57030 126 34583.97660 1395.58665 127 -46224.68701 34583.97660 128 75658.16910 -46224.68701 129 11613.11093 75658.16910 130 28755.03017 11613.11093 131 8986.27436 28755.03017 132 -26697.28168 8986.27436 133 -82705.81938 -26697.28168 134 53529.53580 -82705.81938 135 -4027.36350 53529.53580 136 53182.66830 -4027.36350 137 -39274.86104 53182.66830 138 5229.34610 -39274.86104 139 -25985.36726 5229.34610 140 -29288.00473 -25985.36726 141 94244.13374 -29288.00473 142 -44901.68609 94244.13374 143 71006.21179 -44901.68609 144 7510.75887 71006.21179 145 -78684.91444 7510.75887 146 -11040.54349 -78684.91444 147 -40320.53789 -11040.54349 148 2021.88563 -40320.53789 149 4533.65355 2021.88563 150 24698.30395 4533.65355 151 2830.16883 24698.30395 152 13615.18316 2830.16883 153 8146.38687 13615.18316 154 -8825.97834 8146.38687 155 20686.83106 -8825.97834 156 NA 20686.83106 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -46550.03134 -4189.77676 [2,] -7269.25779 -46550.03134 [3,] -56894.85918 -7269.25779 [4,] 7865.11190 -56894.85918 [5,] -51810.81248 7865.11190 [6,] 150894.77605 -51810.81248 [7,] -20558.64774 150894.77605 [8,] -15165.40756 -20558.64774 [9,] 16224.96005 -15165.40756 [10,] 7275.57985 16224.96005 [11,] -47819.44621 7275.57985 [12,] -8370.67371 -47819.44621 [13,] 40889.25657 -8370.67371 [14,] 6523.63741 40889.25657 [15,] 5969.84718 6523.63741 [16,] 20611.83251 5969.84718 [17,] 17525.35589 20611.83251 [18,] -42120.90949 17525.35589 [19,] -7360.03964 -42120.90949 [20,] -14911.89387 -7360.03964 [21,] 147365.67660 -14911.89387 [22,] 23595.78156 147365.67660 [23,] -52784.41593 23595.78156 [24,] -58235.39111 -52784.41593 [25,] -40590.62575 -58235.39111 [26,] 63.41847 -40590.62575 [27,] 19987.59987 63.41847 [28,] 3223.14672 19987.59987 [29,] 48746.94622 3223.14672 [30,] -16549.31222 48746.94622 [31,] -40645.22969 -16549.31222 [32,] 24508.17966 -40645.22969 [33,] -16728.51826 24508.17966 [34,] 46615.94627 -16728.51826 [35,] 73198.70332 46615.94627 [36,] 93008.36601 73198.70332 [37,] -7256.59316 93008.36601 [38,] 19087.22202 -7256.59316 [39,] -7512.12567 19087.22202 [40,] 63147.47749 -7512.12567 [41,] -19788.64502 63147.47749 [42,] -21372.29717 -19788.64502 [43,] -15176.01531 -21372.29717 [44,] -38129.81532 -15176.01531 [45,] 161175.42261 -38129.81532 [46,] -30471.50685 161175.42261 [47,] -28973.96232 -30471.50685 [48,] 33652.17208 -28973.96232 [49,] -36453.32654 33652.17208 [50,] -18758.96329 -36453.32654 [51,] -23801.93709 -18758.96329 [52,] -28272.90952 -23801.93709 [53,] -5420.68188 -28272.90952 [54,] -748.15324 -5420.68188 [55,] 39759.09920 -748.15324 [56,] -10841.93638 39759.09920 [57,] -82724.42422 -10841.93638 [58,] -21643.64605 -82724.42422 [59,] 40913.44837 -21643.64605 [60,] 45639.64975 40913.44837 [61,] -34961.06464 45639.64975 [62,] -2029.74839 -34961.06464 [63,] 12285.44371 -2029.74839 [64,] -2046.11267 12285.44371 [65,] 15793.79946 -2046.11267 [66,] -66204.47208 15793.79946 [67,] -55999.52302 -66204.47208 [68,] -7783.83751 -55999.52302 [69,] -29259.31349 -7783.83751 [70,] -2831.97770 -29259.31349 [71,] -13528.79510 -2831.97770 [72,] 3421.82488 -13528.79510 [73,] -6961.10967 3421.82488 [74,] -41188.29790 -6961.10967 [75,] 67438.96674 -41188.29790 [76,] 36294.73444 67438.96674 [77,] 4978.80585 36294.73444 [78,] -23311.44271 4978.80585 [79,] -12565.54486 -23311.44271 [80,] 8524.21000 -12565.54486 [81,] 114300.51034 8524.21000 [82,] 6973.95707 114300.51034 [83,] -35343.16825 6973.95707 [84,] 2438.47456 -35343.16825 [85,] 19168.41879 2438.47456 [86,] -50181.44589 19168.41879 [87,] 61905.65647 -50181.44589 [88,] 20717.50199 61905.65647 [89,] -110330.38964 20717.50199 [90,] 36361.57332 -110330.38964 [91,] -43660.94034 36361.57332 [92,] 2269.71486 -43660.94034 [93,] 43946.77871 2269.71486 [94,] 28050.08886 43946.77871 [95,] -4305.44208 28050.08886 [96,] -20926.45096 -4305.44208 [97,] -17286.98574 -20926.45096 [98,] -26646.91599 -17286.98574 [99,] 15949.44638 -26646.91599 [100,] -16764.18091 15949.44638 [101,] -1368.26891 -16764.18091 [102,] -64682.07021 -1368.26891 [103,] -37035.33477 -64682.07021 [104,] 13467.60406 -37035.33477 [105,] -116337.94858 13467.60406 [106,] 18704.34211 -116337.94858 [107,] 22898.36052 18704.34211 [108,] -42046.50682 22898.36052 [109,] -45306.37982 -42046.50682 [110,] 51012.94142 -45306.37982 [111,] 14092.09850 51012.94142 [112,] 4133.78325 14092.09850 [113,] -42454.40046 4133.78325 [114,] 6562.35410 -42454.40046 [115,] -23379.53941 6562.35410 [116,] 65507.52697 -23379.53941 [117,] 9807.83938 65507.52697 [118,] 66650.55971 9807.83938 [119,] -22987.17001 66650.55971 [120,] 29378.39873 -22987.17001 [121,] -5343.11909 29378.39873 [122,] -19260.45408 -5343.11909 [123,] -39286.38967 -19260.45408 [124,] -15247.57030 -39286.38967 [125,] 1395.58665 -15247.57030 [126,] 34583.97660 1395.58665 [127,] -46224.68701 34583.97660 [128,] 75658.16910 -46224.68701 [129,] 11613.11093 75658.16910 [130,] 28755.03017 11613.11093 [131,] 8986.27436 28755.03017 [132,] -26697.28168 8986.27436 [133,] -82705.81938 -26697.28168 [134,] 53529.53580 -82705.81938 [135,] -4027.36350 53529.53580 [136,] 53182.66830 -4027.36350 [137,] -39274.86104 53182.66830 [138,] 5229.34610 -39274.86104 [139,] -25985.36726 5229.34610 [140,] -29288.00473 -25985.36726 [141,] 94244.13374 -29288.00473 [142,] -44901.68609 94244.13374 [143,] 71006.21179 -44901.68609 [144,] 7510.75887 71006.21179 [145,] -78684.91444 7510.75887 [146,] -11040.54349 -78684.91444 [147,] -40320.53789 -11040.54349 [148,] 2021.88563 -40320.53789 [149,] 4533.65355 2021.88563 [150,] 24698.30395 4533.65355 [151,] 2830.16883 24698.30395 [152,] 13615.18316 2830.16883 [153,] 8146.38687 13615.18316 [154,] -8825.97834 8146.38687 [155,] 20686.83106 -8825.97834 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -46550.03134 -4189.77676 2 -7269.25779 -46550.03134 3 -56894.85918 -7269.25779 4 7865.11190 -56894.85918 5 -51810.81248 7865.11190 6 150894.77605 -51810.81248 7 -20558.64774 150894.77605 8 -15165.40756 -20558.64774 9 16224.96005 -15165.40756 10 7275.57985 16224.96005 11 -47819.44621 7275.57985 12 -8370.67371 -47819.44621 13 40889.25657 -8370.67371 14 6523.63741 40889.25657 15 5969.84718 6523.63741 16 20611.83251 5969.84718 17 17525.35589 20611.83251 18 -42120.90949 17525.35589 19 -7360.03964 -42120.90949 20 -14911.89387 -7360.03964 21 147365.67660 -14911.89387 22 23595.78156 147365.67660 23 -52784.41593 23595.78156 24 -58235.39111 -52784.41593 25 -40590.62575 -58235.39111 26 63.41847 -40590.62575 27 19987.59987 63.41847 28 3223.14672 19987.59987 29 48746.94622 3223.14672 30 -16549.31222 48746.94622 31 -40645.22969 -16549.31222 32 24508.17966 -40645.22969 33 -16728.51826 24508.17966 34 46615.94627 -16728.51826 35 73198.70332 46615.94627 36 93008.36601 73198.70332 37 -7256.59316 93008.36601 38 19087.22202 -7256.59316 39 -7512.12567 19087.22202 40 63147.47749 -7512.12567 41 -19788.64502 63147.47749 42 -21372.29717 -19788.64502 43 -15176.01531 -21372.29717 44 -38129.81532 -15176.01531 45 161175.42261 -38129.81532 46 -30471.50685 161175.42261 47 -28973.96232 -30471.50685 48 33652.17208 -28973.96232 49 -36453.32654 33652.17208 50 -18758.96329 -36453.32654 51 -23801.93709 -18758.96329 52 -28272.90952 -23801.93709 53 -5420.68188 -28272.90952 54 -748.15324 -5420.68188 55 39759.09920 -748.15324 56 -10841.93638 39759.09920 57 -82724.42422 -10841.93638 58 -21643.64605 -82724.42422 59 40913.44837 -21643.64605 60 45639.64975 40913.44837 61 -34961.06464 45639.64975 62 -2029.74839 -34961.06464 63 12285.44371 -2029.74839 64 -2046.11267 12285.44371 65 15793.79946 -2046.11267 66 -66204.47208 15793.79946 67 -55999.52302 -66204.47208 68 -7783.83751 -55999.52302 69 -29259.31349 -7783.83751 70 -2831.97770 -29259.31349 71 -13528.79510 -2831.97770 72 3421.82488 -13528.79510 73 -6961.10967 3421.82488 74 -41188.29790 -6961.10967 75 67438.96674 -41188.29790 76 36294.73444 67438.96674 77 4978.80585 36294.73444 78 -23311.44271 4978.80585 79 -12565.54486 -23311.44271 80 8524.21000 -12565.54486 81 114300.51034 8524.21000 82 6973.95707 114300.51034 83 -35343.16825 6973.95707 84 2438.47456 -35343.16825 85 19168.41879 2438.47456 86 -50181.44589 19168.41879 87 61905.65647 -50181.44589 88 20717.50199 61905.65647 89 -110330.38964 20717.50199 90 36361.57332 -110330.38964 91 -43660.94034 36361.57332 92 2269.71486 -43660.94034 93 43946.77871 2269.71486 94 28050.08886 43946.77871 95 -4305.44208 28050.08886 96 -20926.45096 -4305.44208 97 -17286.98574 -20926.45096 98 -26646.91599 -17286.98574 99 15949.44638 -26646.91599 100 -16764.18091 15949.44638 101 -1368.26891 -16764.18091 102 -64682.07021 -1368.26891 103 -37035.33477 -64682.07021 104 13467.60406 -37035.33477 105 -116337.94858 13467.60406 106 18704.34211 -116337.94858 107 22898.36052 18704.34211 108 -42046.50682 22898.36052 109 -45306.37982 -42046.50682 110 51012.94142 -45306.37982 111 14092.09850 51012.94142 112 4133.78325 14092.09850 113 -42454.40046 4133.78325 114 6562.35410 -42454.40046 115 -23379.53941 6562.35410 116 65507.52697 -23379.53941 117 9807.83938 65507.52697 118 66650.55971 9807.83938 119 -22987.17001 66650.55971 120 29378.39873 -22987.17001 121 -5343.11909 29378.39873 122 -19260.45408 -5343.11909 123 -39286.38967 -19260.45408 124 -15247.57030 -39286.38967 125 1395.58665 -15247.57030 126 34583.97660 1395.58665 127 -46224.68701 34583.97660 128 75658.16910 -46224.68701 129 11613.11093 75658.16910 130 28755.03017 11613.11093 131 8986.27436 28755.03017 132 -26697.28168 8986.27436 133 -82705.81938 -26697.28168 134 53529.53580 -82705.81938 135 -4027.36350 53529.53580 136 53182.66830 -4027.36350 137 -39274.86104 53182.66830 138 5229.34610 -39274.86104 139 -25985.36726 5229.34610 140 -29288.00473 -25985.36726 141 94244.13374 -29288.00473 142 -44901.68609 94244.13374 143 71006.21179 -44901.68609 144 7510.75887 71006.21179 145 -78684.91444 7510.75887 146 -11040.54349 -78684.91444 147 -40320.53789 -11040.54349 148 2021.88563 -40320.53789 149 4533.65355 2021.88563 150 24698.30395 4533.65355 151 2830.16883 24698.30395 152 13615.18316 2830.16883 153 8146.38687 13615.18316 154 -8825.97834 8146.38687 155 20686.83106 -8825.97834 > 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/7tkl61353357939.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/857y71353357939.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/9tffg1353357939.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/10bykg1353357939.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/11bbmt1353357939.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/121qr71353357939.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/13bi8u1353357939.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/14290z1353357939.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/15hurp1353357939.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/16hf971353357939.tab") + } > > try(system("convert tmp/1eunu1353357939.ps tmp/1eunu1353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/2eqt61353357939.ps tmp/2eqt61353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/3a8w91353357939.ps tmp/3a8w91353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/4mfkh1353357939.ps tmp/4mfkh1353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/5ymkt1353357939.ps tmp/5ymkt1353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/6hevs1353357939.ps tmp/6hevs1353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/7tkl61353357939.ps tmp/7tkl61353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/857y71353357939.ps tmp/857y71353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/9tffg1353357939.ps tmp/9tffg1353357939.png",intern=TRUE)) character(0) > try(system("convert tmp/10bykg1353357939.ps tmp/10bykg1353357939.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.721 0.931 9.700