R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(252101 + ,62 + ,438 + ,92 + ,34 + ,104 + ,165119 + ,134577 + ,59 + ,330 + ,58 + ,30 + ,111 + ,107269 + ,198520 + ,62 + ,609 + ,62 + ,38 + ,93 + ,93497 + ,189326 + ,94 + ,1015 + ,108 + ,34 + ,119 + ,100269 + ,137449 + ,43 + ,294 + ,55 + ,25 + ,57 + ,91627 + ,65295 + ,27 + ,164 + ,8 + ,31 + ,80 + ,47552 + ,439387 + ,103 + ,1912 + ,134 + ,29 + ,107 + ,233933 + ,33186 + ,19 + ,111 + ,1 + ,18 + ,22 + ,6853 + ,178368 + ,51 + ,698 + ,64 + ,30 + ,103 + ,104380 + ,186657 + ,38 + ,556 + ,77 + ,29 + ,72 + ,98431 + ,261949 + ,96 + ,711 + ,86 + ,38 + ,123 + ,156949 + ,191051 + ,95 + ,495 + ,93 + ,49 + ,164 + ,81817 + ,138866 + ,57 + ,544 + ,44 + ,33 + ,100 + ,59238 + ,296878 + ,66 + ,959 + ,106 + ,46 + ,143 + ,101138 + ,192648 + ,72 + ,540 + ,63 + ,38 + ,79 + ,107158 + ,333462 + ,162 + ,1486 + ,160 + ,52 + ,183 + ,155499 + ,243571 + ,58 + ,635 + ,104 + ,32 + ,123 + ,156274 + ,263451 + ,130 + ,940 + ,86 + ,35 + ,81 + ,121777 + ,155679 + ,48 + ,452 + ,93 + ,25 + ,74 + ,105037 + ,227053 + ,70 + ,617 + ,119 + ,42 + ,158 + ,118661 + ,240028 + ,63 + ,695 + ,107 + ,40 + ,133 + ,131187 + ,388549 + ,90 + ,1046 + ,86 + ,35 + ,128 + ,145026 + ,156540 + ,34 + ,405 + ,50 + ,25 + ,84 + ,107016 + ,148421 + ,43 + ,477 + ,92 + ,46 + ,184 + ,87242 + ,177732 + ,97 + ,1012 + ,123 + ,36 + ,127 + ,91699 + ,191441 + ,105 + ,842 + ,81 + ,35 + ,128 + ,110087 + ,249893 + ,122 + ,994 + ,93 + ,38 + ,118 + ,145447 + ,236812 + ,76 + ,530 + ,113 + ,35 + ,125 + ,143307 + ,142329 + ,45 + ,515 + ,52 + ,28 + ,89 + ,61678 + ,259667 + ,53 + ,766 + ,113 + ,37 + ,122 + ,210080 + ,231625 + ,65 + ,734 + ,112 + ,40 + ,151 + ,165005 + ,176062 + ,67 + ,551 + ,44 + ,42 + ,122 + ,97806 + ,286683 + ,79 + ,718 + ,123 + ,44 + ,162 + ,184471 + ,87485 + ,33 + ,280 + ,38 + ,33 + ,121 + ,27786 + ,322865 + ,83 + ,1055 + ,111 + ,35 + ,132 + ,184458 + ,247082 + ,51 + ,950 + ,77 + ,37 + ,110 + ,98765 + ,344092 + ,104 + ,1035 + ,92 + ,39 + ,135 + ,178441 + ,191653 + ,74 + ,552 + ,74 + ,32 + ,80 + ,100619 + ,114673 + ,31 + ,275 + ,33 + ,17 + ,46 + ,58391 + ,284224 + ,161 + ,986 + ,105 + ,34 + ,127 + ,151672 + ,284195 + ,72 + ,1336 + ,108 + ,33 + ,103 + ,124437 + ,155363 + ,59 + ,565 + ,66 + ,35 + ,95 + ,79929 + ,177306 + ,67 + ,571 + ,69 + ,32 + ,100 + ,123064 + ,144571 + ,49 + ,404 + ,62 + ,35 + ,102 + ,50466 + ,140319 + ,73 + ,985 + ,50 + ,45 + ,45 + ,100991 + ,405267 + ,135 + ,1851 + ,91 + ,38 + ,122 + ,79367 + ,78800 + ,42 + ,330 + ,20 + ,26 + ,66 + ,56968 + ,201970 + ,69 + ,611 + ,101 + ,45 + ,159 + ,106257 + ,302674 + ,99 + ,1249 + ,129 + ,44 + ,153 + ,178412 + ,164733 + ,50 + ,812 + ,93 + ,40 + ,131 + ,98520 + ,194221 + ,68 + ,501 + ,89 + ,33 + ,113 + ,153670 + ,24188 + ,24 + ,218 + ,8 + ,4 + ,7 + ,15049 + ,342263 + ,279 + ,785 + ,79 + ,41 + ,147 + ,174478 + ,65029 + ,17 + ,255 + ,21 + ,18 + ,61 + ,25109 + ,101097 + ,64 + ,454 + ,30 + ,14 + ,41 + ,45824 + ,246088 + ,46 + ,944 + ,86 + ,33 + ,108 + ,116772 + ,273108 + ,75 + ,600 + ,116 + ,49 + ,184 + ,189150 + ,282220 + ,160 + ,977 + ,106 + ,32 + ,115 + ,194404 + ,273495 + ,119 + ,863 + ,127 + ,37 + ,132 + ,185881 + ,214872 + ,74 + ,690 + ,75 + ,32 + ,113 + ,67508 + ,335121 + ,123 + ,1176 + ,138 + ,41 + ,141 + ,188597 + ,267171 + ,106 + ,1013 + ,114 + ,25 + ,65 + ,203618 + ,187938 + ,88 + ,890 + ,55 + ,40 + ,87 + ,87232 + ,229512 + ,78 + ,777 + ,67 + ,35 + ,121 + ,110875 + ,209798 + ,61 + ,521 + ,45 + ,33 + ,112 + ,144756 + ,201345 + ,60 + ,409 + ,88 + ,28 + ,81 + ,129825 + ,163833 + ,113 + ,493 + ,67 + ,31 + ,116 + ,92189 + ,204250 + ,129 + ,757 + ,75 + ,40 + ,132 + ,121158 + ,197813 + ,67 + ,736 + ,114 + ,32 + ,104 + ,96219 + ,132955 + ,60 + ,511 + ,123 + ,25 + ,80 + ,84128 + ,216092 + ,59 + ,789 + ,86 + ,42 + ,145 + ,97960 + ,73566 + ,32 + ,385 + ,22 + ,23 + ,67 + ,23824 + ,213198 + ,67 + ,644 + ,67 + ,42 + ,159 + ,103515 + ,181713 + ,49 + ,664 + ,77 + ,38 + ,90 + ,91313 + ,148698 + ,49 + ,505 + ,105 + ,34 + ,120 + ,85407 + ,300103 + ,70 + ,878 + ,119 + ,38 + ,126 + ,95871 + ,251437 + ,78 + ,769 + ,88 + ,32 + ,118 + ,143846 + ,197295 + ,101 + ,499 + ,78 + ,37 + ,112 + ,155387 + ,158163 + ,55 + ,546 + ,112 + ,34 + ,123 + ,74429 + ,155529 + ,57 + ,551 + ,66 + ,33 + ,98 + ,74004 + ,132672 + ,41 + ,565 + ,58 + ,25 + ,78 + ,71987 + ,377205 + ,100 + ,1086 + ,132 + ,40 + ,119 + ,150629 + ,145905 + ,66 + ,649 + ,30 + ,26 + ,99 + ,68580 + ,223701 + ,86 + ,540 + ,100 + ,40 + ,81 + ,119855 + ,80953 + ,25 + ,437 + ,49 + ,8 + ,27 + ,55792 + ,130805 + ,47 + ,732 + ,26 + ,27 + ,77 + ,25157 + ,135082 + ,48 + ,308 + ,67 + ,32 + ,118 + ,90895 + ,300170 + ,154 + ,1236 + ,57 + ,33 + ,122 + ,117510 + ,271806 + ,95 + ,783 + ,95 + ,50 + ,103 + ,144774 + ,150949 + ,96 + ,933 + ,139 + ,37 + ,129 + ,77529 + ,225805 + ,79 + ,710 + ,73 + ,33 + ,69 + ,103123 + ,197389 + ,67 + ,563 + ,134 + ,34 + ,121 + ,104669 + ,156583 + ,56 + ,508 + ,37 + ,28 + ,81 + ,82414 + ,222599 + ,66 + ,936 + ,98 + ,32 + ,119 + ,82390 + ,261601 + ,70 + ,838 + ,58 + ,32 + ,116 + ,128446 + ,178489 + ,35 + ,523 + ,78 + ,32 + ,123 + ,111542 + ,200657 + ,43 + ,500 + ,88 + ,31 + ,111 + ,136048 + ,259084 + ,67 + ,691 + ,142 + ,35 + ,100 + ,197257 + ,313075 + ,130 + ,1060 + ,127 + ,58 + ,221 + ,162079 + ,346933 + ,100 + ,1232 + ,139 + ,27 + ,95 + ,206286 + ,246440 + ,104 + ,735 + ,108 + ,45 + ,153 + ,109858 + ,252444 + ,58 + ,757 + ,128 + ,37 + ,118 + ,182125 + ,159965 + ,159 + ,574 + ,62 + ,32 + ,50 + ,74168 + ,43287 + ,14 + ,214 + ,13 + ,19 + ,64 + ,19630 + ,172239 + ,68 + ,661 + ,89 + ,22 + ,34 + ,88634 + ,181897 + ,119 + ,630 + ,83 + ,35 + ,76 + ,128321 + ,227681 + ,43 + ,1015 + ,116 + ,36 + ,112 + ,118936 + ,260464 + ,81 + ,893 + ,157 + ,36 + ,115 + ,127044 + ,106288 + ,54 + ,293 + ,28 + ,23 + ,69 + ,178377 + ,109632 + ,76 + ,446 + ,83 + ,36 + ,108 + ,69581 + ,268905 + ,58 + ,538 + ,72 + ,36 + ,130 + ,168019 + ,266805 + ,78 + ,627 + ,134 + ,42 + ,110 + ,113598 + ,23623 + ,11 + ,156 + ,12 + ,1 + ,0 + ,5841 + ,152474 + ,65 + ,577 + ,106 + ,32 + ,83 + ,93116 + ,61857 + ,25 + ,192 + ,23 + ,11 + ,30 + ,24610 + ,144889 + ,43 + ,437 + ,83 + ,40 + ,106 + ,60611 + ,346600 + ,99 + ,1054 + ,126 + ,34 + ,91 + ,226620 + ,21054 + ,16 + ,146 + ,4 + ,0 + ,0 + ,6622 + ,224051 + ,45 + ,751 + ,71 + ,27 + ,69 + ,121996 + ,31414 + ,19 + ,200 + ,18 + ,8 + ,9 + ,13155 + ,261043 + ,105 + ,1050 + ,98 + ,35 + ,123 + ,154158 + ,197819 + ,57 + ,590 + ,66 + ,41 + ,143 + ,78489 + ,154984 + ,73 + ,430 + ,44 + ,40 + ,125 + ,22007 + ,112933 + ,45 + ,467 + ,29 + ,28 + ,81 + ,72530 + ,38214 + ,34 + ,276 + ,16 + ,8 + ,21 + ,13983 + ,158671 + ,33 + ,528 + ,56 + ,35 + ,124 + ,73397 + ,302148 + ,70 + ,898 + ,112 + ,47 + ,168 + ,143878 + ,177918 + ,55 + ,411 + ,46 + ,46 + ,149 + ,119956 + ,350552 + ,70 + ,1362 + ,129 + ,42 + ,147 + ,181558 + ,275578 + ,91 + ,743 + ,139 + ,48 + ,145 + ,208236 + ,366217 + ,105 + ,1068 + ,136 + ,49 + ,172 + ,237085 + ,172464 + ,31 + ,431 + ,66 + ,35 + ,126 + ,110297 + ,94381 + ,35 + ,380 + ,42 + ,32 + ,89 + ,61394 + ,243875 + ,278 + ,788 + ,70 + ,36 + ,137 + ,81420 + ,382487 + ,153 + ,1367 + ,97 + ,42 + ,149 + ,191154 + ,114525 + ,40 + ,449 + ,49 + ,35 + ,121 + ,11798 + ,335681 + ,119 + ,1461 + ,113 + ,37 + ,133 + ,135724 + ,147989 + ,72 + ,651 + ,55 + ,34 + ,93 + ,68614 + ,216638 + ,44 + ,494 + ,100 + ,36 + ,119 + ,139926 + ,192862 + ,72 + ,667 + ,80 + ,36 + ,102 + ,105203 + ,184818 + ,107 + ,510 + ,29 + ,32 + ,45 + ,80338 + ,336707 + ,105 + ,1472 + ,95 + ,33 + ,104 + ,121376 + ,215836 + ,76 + ,675 + ,114 + ,35 + ,111 + ,124922 + ,173260 + ,63 + ,716 + ,41 + ,21 + ,78 + ,10901 + ,271773 + ,89 + ,814 + ,128 + ,40 + ,120 + ,135471 + ,130908 + ,52 + ,556 + ,142 + ,49 + ,176 + ,66395 + ,204009 + ,75 + ,887 + ,88 + ,33 + ,109 + ,134041 + ,245514 + ,92 + ,663 + ,147 + ,39 + ,132 + ,153554 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,14688 + ,10 + ,85 + ,4 + ,0 + ,0 + ,7953 + ,98 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,455 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,195765 + ,75 + ,607 + ,56 + ,33 + ,78 + ,98922 + ,326038 + ,121 + ,934 + ,121 + ,42 + ,104 + ,165395 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,4 + ,0 + ,0 + ,0 + ,0 + ,0 + ,7199 + ,5 + ,74 + ,7 + ,0 + ,0 + ,4245 + ,46660 + ,20 + ,259 + ,12 + ,5 + ,13 + ,21509 + ,17547 + ,5 + ,69 + ,0 + ,1 + ,4 + ,7670 + ,107465 + ,38 + ,267 + ,37 + ,38 + ,65 + ,15167 + ,969 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,173102 + ,58 + ,517 + ,47 + ,28 + ,55 + ,63891) + ,dim=c(7 + ,164) + ,dimnames=list(c('Time' + ,'Logins' + ,'Views' + ,'Blogs' + ,'Reviews' + ,'LFM' + ,'Compendia_time ') + ,1:164)) > y <- array(NA,dim=c(7,164),dimnames=list(c('Time','Logins','Views','Blogs','Reviews','LFM','Compendia_time '),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' > 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 Time Logins Views Blogs Reviews LFM Compendia_time\r 1 252101 62 438 92 34 104 165119 2 134577 59 330 58 30 111 107269 3 198520 62 609 62 38 93 93497 4 189326 94 1015 108 34 119 100269 5 137449 43 294 55 25 57 91627 6 65295 27 164 8 31 80 47552 7 439387 103 1912 134 29 107 233933 8 33186 19 111 1 18 22 6853 9 178368 51 698 64 30 103 104380 10 186657 38 556 77 29 72 98431 11 261949 96 711 86 38 123 156949 12 191051 95 495 93 49 164 81817 13 138866 57 544 44 33 100 59238 14 296878 66 959 106 46 143 101138 15 192648 72 540 63 38 79 107158 16 333462 162 1486 160 52 183 155499 17 243571 58 635 104 32 123 156274 18 263451 130 940 86 35 81 121777 19 155679 48 452 93 25 74 105037 20 227053 70 617 119 42 158 118661 21 240028 63 695 107 40 133 131187 22 388549 90 1046 86 35 128 145026 23 156540 34 405 50 25 84 107016 24 148421 43 477 92 46 184 87242 25 177732 97 1012 123 36 127 91699 26 191441 105 842 81 35 128 110087 27 249893 122 994 93 38 118 145447 28 236812 76 530 113 35 125 143307 29 142329 45 515 52 28 89 61678 30 259667 53 766 113 37 122 210080 31 231625 65 734 112 40 151 165005 32 176062 67 551 44 42 122 97806 33 286683 79 718 123 44 162 184471 34 87485 33 280 38 33 121 27786 35 322865 83 1055 111 35 132 184458 36 247082 51 950 77 37 110 98765 37 344092 104 1035 92 39 135 178441 38 191653 74 552 74 32 80 100619 39 114673 31 275 33 17 46 58391 40 284224 161 986 105 34 127 151672 41 284195 72 1336 108 33 103 124437 42 155363 59 565 66 35 95 79929 43 177306 67 571 69 32 100 123064 44 144571 49 404 62 35 102 50466 45 140319 73 985 50 45 45 100991 46 405267 135 1851 91 38 122 79367 47 78800 42 330 20 26 66 56968 48 201970 69 611 101 45 159 106257 49 302674 99 1249 129 44 153 178412 50 164733 50 812 93 40 131 98520 51 194221 68 501 89 33 113 153670 52 24188 24 218 8 4 7 15049 53 342263 279 785 79 41 147 174478 54 65029 17 255 21 18 61 25109 55 101097 64 454 30 14 41 45824 56 246088 46 944 86 33 108 116772 57 273108 75 600 116 49 184 189150 58 282220 160 977 106 32 115 194404 59 273495 119 863 127 37 132 185881 60 214872 74 690 75 32 113 67508 61 335121 123 1176 138 41 141 188597 62 267171 106 1013 114 25 65 203618 63 187938 88 890 55 40 87 87232 64 229512 78 777 67 35 121 110875 65 209798 61 521 45 33 112 144756 66 201345 60 409 88 28 81 129825 67 163833 113 493 67 31 116 92189 68 204250 129 757 75 40 132 121158 69 197813 67 736 114 32 104 96219 70 132955 60 511 123 25 80 84128 71 216092 59 789 86 42 145 97960 72 73566 32 385 22 23 67 23824 73 213198 67 644 67 42 159 103515 74 181713 49 664 77 38 90 91313 75 148698 49 505 105 34 120 85407 76 300103 70 878 119 38 126 95871 77 251437 78 769 88 32 118 143846 78 197295 101 499 78 37 112 155387 79 158163 55 546 112 34 123 74429 80 155529 57 551 66 33 98 74004 81 132672 41 565 58 25 78 71987 82 377205 100 1086 132 40 119 150629 83 145905 66 649 30 26 99 68580 84 223701 86 540 100 40 81 119855 85 80953 25 437 49 8 27 55792 86 130805 47 732 26 27 77 25157 87 135082 48 308 67 32 118 90895 88 300170 154 1236 57 33 122 117510 89 271806 95 783 95 50 103 144774 90 150949 96 933 139 37 129 77529 91 225805 79 710 73 33 69 103123 92 197389 67 563 134 34 121 104669 93 156583 56 508 37 28 81 82414 94 222599 66 936 98 32 119 82390 95 261601 70 838 58 32 116 128446 96 178489 35 523 78 32 123 111542 97 200657 43 500 88 31 111 136048 98 259084 67 691 142 35 100 197257 99 313075 130 1060 127 58 221 162079 100 346933 100 1232 139 27 95 206286 101 246440 104 735 108 45 153 109858 102 252444 58 757 128 37 118 182125 103 159965 159 574 62 32 50 74168 104 43287 14 214 13 19 64 19630 105 172239 68 661 89 22 34 88634 106 181897 119 630 83 35 76 128321 107 227681 43 1015 116 36 112 118936 108 260464 81 893 157 36 115 127044 109 106288 54 293 28 23 69 178377 110 109632 76 446 83 36 108 69581 111 268905 58 538 72 36 130 168019 112 266805 78 627 134 42 110 113598 113 23623 11 156 12 1 0 5841 114 152474 65 577 106 32 83 93116 115 61857 25 192 23 11 30 24610 116 144889 43 437 83 40 106 60611 117 346600 99 1054 126 34 91 226620 118 21054 16 146 4 0 0 6622 119 224051 45 751 71 27 69 121996 120 31414 19 200 18 8 9 13155 121 261043 105 1050 98 35 123 154158 122 197819 57 590 66 41 143 78489 123 154984 73 430 44 40 125 22007 124 112933 45 467 29 28 81 72530 125 38214 34 276 16 8 21 13983 126 158671 33 528 56 35 124 73397 127 302148 70 898 112 47 168 143878 128 177918 55 411 46 46 149 119956 129 350552 70 1362 129 42 147 181558 130 275578 91 743 139 48 145 208236 131 366217 105 1068 136 49 172 237085 132 172464 31 431 66 35 126 110297 133 94381 35 380 42 32 89 61394 134 243875 278 788 70 36 137 81420 135 382487 153 1367 97 42 149 191154 136 114525 40 449 49 35 121 11798 137 335681 119 1461 113 37 133 135724 138 147989 72 651 55 34 93 68614 139 216638 44 494 100 36 119 139926 140 192862 72 667 80 36 102 105203 141 184818 107 510 29 32 45 80338 142 336707 105 1472 95 33 104 121376 143 215836 76 675 114 35 111 124922 144 173260 63 716 41 21 78 10901 145 271773 89 814 128 40 120 135471 146 130908 52 556 142 49 176 66395 147 204009 75 887 88 33 109 134041 148 245514 92 663 147 39 132 153554 149 1 0 0 0 0 0 0 150 14688 10 85 4 0 0 7953 151 98 1 0 0 0 0 0 152 455 2 0 0 0 0 0 153 0 0 0 0 0 0 0 154 0 0 0 0 0 0 0 155 195765 75 607 56 33 78 98922 156 326038 121 934 121 42 104 165395 157 0 0 0 0 0 0 0 158 203 4 0 0 0 0 0 159 7199 5 74 7 0 0 4245 160 46660 20 259 12 5 13 21509 161 17547 5 69 0 1 4 7670 162 107465 38 267 37 38 65 15167 163 969 2 0 0 0 0 0 164 173102 58 517 47 28 55 63891 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Logins Views Blogs -6086.5340 181.8718 128.2631 34.3390 Reviews LFM `Compendia_time\r` 609.8220 138.5176 0.6512 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -94368 -15493 2728 13380 107635 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.087e+03 5.975e+03 -1.019 0.3100 Logins 1.819e+02 7.307e+01 2.489 0.0138 * Views 1.283e+02 1.026e+01 12.502 <2e-16 *** Blogs 3.434e+01 1.056e+02 0.325 0.7454 Reviews 6.098e+02 4.299e+02 1.418 0.1580 LFM 1.385e+02 1.177e+02 1.177 0.2409 `Compendia_time\r` 6.512e-01 6.611e-02 9.850 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27980 on 157 degrees of freedom Multiple R-squared: 0.92, Adjusted R-squared: 0.9169 F-statistic: 300.8 on 6 and 157 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.08509053 1.701811e-01 9.149095e-01 [2,] 0.03839485 7.678969e-02 9.616052e-01 [3,] 0.11046219 2.209244e-01 8.895378e-01 [4,] 0.07701002 1.540200e-01 9.229900e-01 [5,] 0.13014508 2.602902e-01 8.698549e-01 [6,] 0.13236958 2.647392e-01 8.676304e-01 [7,] 0.08855954 1.771191e-01 9.114405e-01 [8,] 0.05357967 1.071593e-01 9.464203e-01 [9,] 0.10759405 2.151881e-01 8.924060e-01 [10,] 0.07494466 1.498893e-01 9.250553e-01 [11,] 0.04910402 9.820804e-02 9.508960e-01 [12,] 0.03260260 6.520520e-02 9.673974e-01 [13,] 0.92445429 1.510914e-01 7.554571e-02 [14,] 0.89700401 2.059920e-01 1.029960e-01 [15,] 0.90320014 1.935997e-01 9.679986e-02 [16,] 0.91960760 1.607848e-01 8.039240e-02 [17,] 0.91350200 1.729960e-01 8.649800e-02 [18,] 0.91387118 1.722576e-01 8.612882e-02 [19,] 0.90356670 1.928666e-01 9.643330e-02 [20,] 0.88612256 2.277549e-01 1.138774e-01 [21,] 0.96435668 7.128664e-02 3.564332e-02 [22,] 0.96556343 6.887315e-02 3.443657e-02 [23,] 0.95922187 8.155627e-02 4.077813e-02 [24,] 0.94553805 1.089239e-01 5.446195e-02 [25,] 0.92962546 1.407491e-01 7.037454e-02 [26,] 0.91284380 1.743124e-01 8.715620e-02 [27,] 0.89272352 2.145530e-01 1.072765e-01 [28,] 0.89835778 2.032844e-01 1.016422e-01 [29,] 0.87686132 2.462774e-01 1.231387e-01 [30,] 0.87333252 2.533350e-01 1.266675e-01 [31,] 0.85017790 2.996442e-01 1.498221e-01 [32,] 0.82049151 3.590170e-01 1.795085e-01 [33,] 0.79034742 4.193052e-01 2.096526e-01 [34,] 0.77898917 4.420217e-01 2.210108e-01 [35,] 0.76489804 4.702039e-01 2.351020e-01 [36,] 0.97503386 4.993229e-02 2.496614e-02 [37,] 0.99327890 1.344219e-02 6.721097e-03 [38,] 0.99367570 1.264860e-02 6.324299e-03 [39,] 0.99107964 1.784072e-02 8.920361e-03 [40,] 0.99278326 1.443348e-02 7.216741e-03 [41,] 0.99639536 7.209285e-03 3.604643e-03 [42,] 0.99544232 9.115364e-03 4.557682e-03 [43,] 0.99477484 1.045032e-02 5.225158e-03 [44,] 0.99536940 9.261209e-03 4.630604e-03 [45,] 0.99348687 1.302627e-02 6.513133e-03 [46,] 0.99128114 1.743771e-02 8.718856e-03 [47,] 0.98837590 2.324820e-02 1.162410e-02 [48,] 0.98468785 3.062430e-02 1.531215e-02 [49,] 0.98663446 2.673108e-02 1.336554e-02 [50,] 0.98347540 3.304920e-02 1.652460e-02 [51,] 0.98692507 2.614987e-02 1.307493e-02 [52,] 0.98241622 3.516756e-02 1.758378e-02 [53,] 0.98437629 3.124742e-02 1.562371e-02 [54,] 0.98642143 2.715714e-02 1.357857e-02 [55,] 0.98201422 3.597156e-02 1.798578e-02 [56,] 0.97683923 4.632154e-02 2.316077e-02 [57,] 0.97922928 4.154144e-02 2.077072e-02 [58,] 0.97405123 5.189753e-02 2.594877e-02 [59,] 0.97702947 4.594105e-02 2.297053e-02 [60,] 0.97036723 5.926555e-02 2.963277e-02 [61,] 0.96542886 6.914228e-02 3.457114e-02 [62,] 0.95569576 8.860847e-02 4.430424e-02 [63,] 0.94881633 1.023673e-01 5.118367e-02 [64,] 0.93667707 1.266459e-01 6.332293e-02 [65,] 0.92507861 1.498428e-01 7.492139e-02 [66,] 0.91091764 1.781647e-01 8.908236e-02 [67,] 0.98120183 3.759635e-02 1.879817e-02 [68,] 0.97663185 4.673629e-02 2.336815e-02 [69,] 0.97266043 5.467914e-02 2.733957e-02 [70,] 0.96459364 7.081273e-02 3.540636e-02 [71,] 0.95495127 9.009747e-02 4.504873e-02 [72,] 0.94799708 1.040058e-01 5.200292e-02 [73,] 0.99456130 1.087740e-02 5.438702e-03 [74,] 0.99359710 1.280580e-02 6.402901e-03 [75,] 0.99357501 1.284999e-02 6.424995e-03 [76,] 0.99245706 1.508588e-02 7.542939e-03 [77,] 0.99082326 1.835347e-02 9.176735e-03 [78,] 0.98754514 2.490972e-02 1.245486e-02 [79,] 0.98330894 3.338211e-02 1.669106e-02 [80,] 0.97946232 4.107536e-02 2.053768e-02 [81,] 0.99805262 3.894758e-03 1.947379e-03 [82,] 0.99789503 4.209940e-03 2.104970e-03 [83,] 0.99710399 5.792017e-03 2.896008e-03 [84,] 0.99587055 8.258903e-03 4.129452e-03 [85,] 0.99425655 1.148690e-02 5.743450e-03 [86,] 0.99414079 1.171841e-02 5.859207e-03 [87,] 0.99183209 1.633581e-02 8.167907e-03 [88,] 0.98955088 2.089823e-02 1.044912e-02 [89,] 0.98572744 2.854513e-02 1.427256e-02 [90,] 0.98247722 3.504557e-02 1.752278e-02 [91,] 0.97711355 4.577291e-02 2.288645e-02 [92,] 0.97214075 5.571851e-02 2.785925e-02 [93,] 0.96434280 7.131440e-02 3.565720e-02 [94,] 0.96007880 7.984241e-02 3.992120e-02 [95,] 0.95193347 9.613307e-02 4.806653e-02 [96,] 0.93989361 1.202128e-01 6.010639e-02 [97,] 0.95354517 9.290966e-02 4.645483e-02 [98,] 0.95658216 8.683568e-02 4.341784e-02 [99,] 0.94510564 1.097887e-01 5.489436e-02 [100,] 0.99250767 1.498466e-02 7.492332e-03 [101,] 0.99636076 7.278482e-03 3.639241e-03 [102,] 0.99870606 2.587887e-03 1.293944e-03 [103,] 0.99976274 4.745130e-04 2.372565e-04 [104,] 0.99961394 7.721184e-04 3.860592e-04 [105,] 0.99966507 6.698607e-04 3.349303e-04 [106,] 0.99948385 1.032302e-03 5.161512e-04 [107,] 0.99916996 1.660086e-03 8.300429e-04 [108,] 0.99877049 2.459011e-03 1.229505e-03 [109,] 0.99807029 3.859411e-03 1.929705e-03 [110,] 0.99729384 5.412320e-03 2.706160e-03 [111,] 0.99642813 7.143749e-03 3.571874e-03 [112,] 0.99718910 5.621796e-03 2.810898e-03 [113,] 0.99678801 6.423985e-03 3.211993e-03 [114,] 0.99788243 4.235148e-03 2.117574e-03 [115,] 0.99838823 3.223542e-03 1.611771e-03 [116,] 0.99829102 3.417963e-03 1.708981e-03 [117,] 0.99731315 5.373695e-03 2.686847e-03 [118,] 0.99893711 2.125773e-03 1.062887e-03 [119,] 0.99826964 3.460725e-03 1.730363e-03 [120,] 0.99710097 5.798062e-03 2.899031e-03 [121,] 0.99670601 6.587971e-03 3.293985e-03 [122,] 0.99507535 9.849298e-03 4.924649e-03 [123,] 0.99574779 8.504426e-03 4.252213e-03 [124,] 0.99600133 7.997330e-03 3.998665e-03 [125,] 0.99446195 1.107610e-02 5.538052e-03 [126,] 0.99213174 1.573653e-02 7.868263e-03 [127,] 0.99389040 1.221920e-02 6.109602e-03 [128,] 0.98981127 2.037746e-02 1.018873e-02 [129,] 0.99102237 1.795526e-02 8.977631e-03 [130,] 0.99990354 1.929182e-04 9.645910e-05 [131,] 0.99979429 4.114203e-04 2.057102e-04 [132,] 0.99999929 1.410922e-06 7.054609e-07 [133,] 0.99999759 4.824276e-06 2.412138e-06 [134,] 0.99999308 1.384642e-05 6.923211e-06 [135,] 0.99999844 3.128020e-06 1.564010e-06 [136,] 0.99999987 2.565418e-07 1.282709e-07 [137,] 0.99999990 1.956043e-07 9.780217e-08 [138,] 0.99999991 1.799219e-07 8.996093e-08 [139,] 0.99999994 1.157562e-07 5.787811e-08 [140,] 0.99999949 1.019756e-06 5.098780e-07 [141,] 0.99999783 4.339039e-06 2.169519e-06 [142,] 0.99998090 3.820233e-05 1.910117e-05 [143,] 0.99984313 3.137329e-04 1.568665e-04 [144,] 0.99882328 2.353440e-03 1.176720e-03 [145,] 0.99203065 1.593869e-02 7.969345e-03 > postscript(file="/var/www/rcomp/tmp/1fzxm1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/2vqgi1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3tc6a1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4ki7h1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/57zcq1324646303.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 44907.3456 -17909.3591 16148.3606 -58092.0724 13308.2494 -15790.7432 7 8 9 10 11 12 -7943.7840 3058.5501 -17080.7837 20117.3781 14011.1081 7298.3369 13 14 15 16 17 18 -9252.0377 50595.5714 10316.6259 -44328.7558 15772.6269 10508.5131 19 20 21 22 23 24 -2028.9904 12413.1671 13594.4325 107635.3590 6209.2521 -28004.9129 25 26 27 28 29 30 -67108.9609 -43110.9770 -31129.6760 25236.1552 2822.2116 -22282.7353 31 32 33 34 35 36 -24861.9547 -8423.9651 12685.0296 -4627.8586 14979.3268 17282.6281 37 38 39 40 41 42 36668.1673 14819.6243 23952.8076 -6138.7463 -13306.5179 -10568.8542 43 44 45 46 47 48 -17906.1719 19462.3434 -94368.1201 54504.5694 -27860.9353 -4990.7468 49 50 51 52 53 54 -38082.8655 -52312.4023 -15222.6625 -15535.3221 35222.6481 -1181.9161 55 56 57 58 59 60 -7775.3278 8648.6324 6069.4651 -31786.1816 -19007.2674 37294.8647 61 62 63 64 65 66 -4087.4540 -36711.8367 -31272.6262 9144.8862 6516.4303 28200.4573 67 68 69 70 71 72 -11172.6517 -34371.1456 -3180.3769 -22748.2553 -2194.0404 -15124.9585 73 74 75 76 77 78 7150.9022 -4026.0829 -15478.9735 73699.2492 12149.0894 -20935.0629 79 80 81 82 83 84 -5871.0155 -3580.9599 -16086.5801 82311.3830 -18513.0304 27787.8795 85 86 87 88 89 90 -20191.3043 -9951.2129 -4417.5060 4211.6398 17886.8640 -75786.0415 91 92 93 94 95 96 27114.2901 8821.2596 4093.3507 3612.0110 26253.6331 -738.4416 97 98 99 100 101 102 8894.9070 -4170.6348 -16330.0925 8080.7160 15454.8638 -11017.3710 103 104 105 106 107 108 -13356.7138 -14302.2361 2275.7811 -32749.1932 -23142.3418 11274.2288 109 110 111 112 113 114 -75732.3206 -40384.0311 43589.7115 58858.3587 2874.3322 -22557.5339 115 116 117 118 119 120 11090.7567 5708.1420 14250.5929 1054.5488 17722.6063 -6917.5616 121 122 123 124 125 126 -28778.0331 19674.2683 35091.2419 -25586.0725 -14726.3651 2793.5848 127 128 129 130 131 132 30850.9393 -7100.7440 577.7499 -19918.7538 3455.2008 4742.0496 133 134 135 136 137 138 -27902.5048 1974.6814 11348.9446 8276.6255 -518.0180 -22704.8731 139 140 141 142 143 144 18368.9321 -7035.7125 26970.3146 18061.1472 -460.7307 43934.9224 145 146 147 148 149 150 23637.3111 -46150.1989 -42846.4660 2719.9011 6087.5340 2737.0797 151 152 153 154 155 156 6002.6622 6177.7904 6086.5340 6086.5340 13085.6860 38441.2601 157 158 159 160 161 162 6086.5340 5562.0467 -120.0244 -3379.6752 7715.4028 29069.9417 163 164 6691.7904 34414.5323 > postscript(file="/var/www/rcomp/tmp/6vrso1324646303.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 44907.3456 NA 1 -17909.3591 44907.3456 2 16148.3606 -17909.3591 3 -58092.0724 16148.3606 4 13308.2494 -58092.0724 5 -15790.7432 13308.2494 6 -7943.7840 -15790.7432 7 3058.5501 -7943.7840 8 -17080.7837 3058.5501 9 20117.3781 -17080.7837 10 14011.1081 20117.3781 11 7298.3369 14011.1081 12 -9252.0377 7298.3369 13 50595.5714 -9252.0377 14 10316.6259 50595.5714 15 -44328.7558 10316.6259 16 15772.6269 -44328.7558 17 10508.5131 15772.6269 18 -2028.9904 10508.5131 19 12413.1671 -2028.9904 20 13594.4325 12413.1671 21 107635.3590 13594.4325 22 6209.2521 107635.3590 23 -28004.9129 6209.2521 24 -67108.9609 -28004.9129 25 -43110.9770 -67108.9609 26 -31129.6760 -43110.9770 27 25236.1552 -31129.6760 28 2822.2116 25236.1552 29 -22282.7353 2822.2116 30 -24861.9547 -22282.7353 31 -8423.9651 -24861.9547 32 12685.0296 -8423.9651 33 -4627.8586 12685.0296 34 14979.3268 -4627.8586 35 17282.6281 14979.3268 36 36668.1673 17282.6281 37 14819.6243 36668.1673 38 23952.8076 14819.6243 39 -6138.7463 23952.8076 40 -13306.5179 -6138.7463 41 -10568.8542 -13306.5179 42 -17906.1719 -10568.8542 43 19462.3434 -17906.1719 44 -94368.1201 19462.3434 45 54504.5694 -94368.1201 46 -27860.9353 54504.5694 47 -4990.7468 -27860.9353 48 -38082.8655 -4990.7468 49 -52312.4023 -38082.8655 50 -15222.6625 -52312.4023 51 -15535.3221 -15222.6625 52 35222.6481 -15535.3221 53 -1181.9161 35222.6481 54 -7775.3278 -1181.9161 55 8648.6324 -7775.3278 56 6069.4651 8648.6324 57 -31786.1816 6069.4651 58 -19007.2674 -31786.1816 59 37294.8647 -19007.2674 60 -4087.4540 37294.8647 61 -36711.8367 -4087.4540 62 -31272.6262 -36711.8367 63 9144.8862 -31272.6262 64 6516.4303 9144.8862 65 28200.4573 6516.4303 66 -11172.6517 28200.4573 67 -34371.1456 -11172.6517 68 -3180.3769 -34371.1456 69 -22748.2553 -3180.3769 70 -2194.0404 -22748.2553 71 -15124.9585 -2194.0404 72 7150.9022 -15124.9585 73 -4026.0829 7150.9022 74 -15478.9735 -4026.0829 75 73699.2492 -15478.9735 76 12149.0894 73699.2492 77 -20935.0629 12149.0894 78 -5871.0155 -20935.0629 79 -3580.9599 -5871.0155 80 -16086.5801 -3580.9599 81 82311.3830 -16086.5801 82 -18513.0304 82311.3830 83 27787.8795 -18513.0304 84 -20191.3043 27787.8795 85 -9951.2129 -20191.3043 86 -4417.5060 -9951.2129 87 4211.6398 -4417.5060 88 17886.8640 4211.6398 89 -75786.0415 17886.8640 90 27114.2901 -75786.0415 91 8821.2596 27114.2901 92 4093.3507 8821.2596 93 3612.0110 4093.3507 94 26253.6331 3612.0110 95 -738.4416 26253.6331 96 8894.9070 -738.4416 97 -4170.6348 8894.9070 98 -16330.0925 -4170.6348 99 8080.7160 -16330.0925 100 15454.8638 8080.7160 101 -11017.3710 15454.8638 102 -13356.7138 -11017.3710 103 -14302.2361 -13356.7138 104 2275.7811 -14302.2361 105 -32749.1932 2275.7811 106 -23142.3418 -32749.1932 107 11274.2288 -23142.3418 108 -75732.3206 11274.2288 109 -40384.0311 -75732.3206 110 43589.7115 -40384.0311 111 58858.3587 43589.7115 112 2874.3322 58858.3587 113 -22557.5339 2874.3322 114 11090.7567 -22557.5339 115 5708.1420 11090.7567 116 14250.5929 5708.1420 117 1054.5488 14250.5929 118 17722.6063 1054.5488 119 -6917.5616 17722.6063 120 -28778.0331 -6917.5616 121 19674.2683 -28778.0331 122 35091.2419 19674.2683 123 -25586.0725 35091.2419 124 -14726.3651 -25586.0725 125 2793.5848 -14726.3651 126 30850.9393 2793.5848 127 -7100.7440 30850.9393 128 577.7499 -7100.7440 129 -19918.7538 577.7499 130 3455.2008 -19918.7538 131 4742.0496 3455.2008 132 -27902.5048 4742.0496 133 1974.6814 -27902.5048 134 11348.9446 1974.6814 135 8276.6255 11348.9446 136 -518.0180 8276.6255 137 -22704.8731 -518.0180 138 18368.9321 -22704.8731 139 -7035.7125 18368.9321 140 26970.3146 -7035.7125 141 18061.1472 26970.3146 142 -460.7307 18061.1472 143 43934.9224 -460.7307 144 23637.3111 43934.9224 145 -46150.1989 23637.3111 146 -42846.4660 -46150.1989 147 2719.9011 -42846.4660 148 6087.5340 2719.9011 149 2737.0797 6087.5340 150 6002.6622 2737.0797 151 6177.7904 6002.6622 152 6086.5340 6177.7904 153 6086.5340 6086.5340 154 13085.6860 6086.5340 155 38441.2601 13085.6860 156 6086.5340 38441.2601 157 5562.0467 6086.5340 158 -120.0244 5562.0467 159 -3379.6752 -120.0244 160 7715.4028 -3379.6752 161 29069.9417 7715.4028 162 6691.7904 29069.9417 163 34414.5323 6691.7904 164 NA 34414.5323 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -17909.3591 44907.3456 [2,] 16148.3606 -17909.3591 [3,] -58092.0724 16148.3606 [4,] 13308.2494 -58092.0724 [5,] -15790.7432 13308.2494 [6,] -7943.7840 -15790.7432 [7,] 3058.5501 -7943.7840 [8,] -17080.7837 3058.5501 [9,] 20117.3781 -17080.7837 [10,] 14011.1081 20117.3781 [11,] 7298.3369 14011.1081 [12,] -9252.0377 7298.3369 [13,] 50595.5714 -9252.0377 [14,] 10316.6259 50595.5714 [15,] -44328.7558 10316.6259 [16,] 15772.6269 -44328.7558 [17,] 10508.5131 15772.6269 [18,] -2028.9904 10508.5131 [19,] 12413.1671 -2028.9904 [20,] 13594.4325 12413.1671 [21,] 107635.3590 13594.4325 [22,] 6209.2521 107635.3590 [23,] -28004.9129 6209.2521 [24,] -67108.9609 -28004.9129 [25,] -43110.9770 -67108.9609 [26,] -31129.6760 -43110.9770 [27,] 25236.1552 -31129.6760 [28,] 2822.2116 25236.1552 [29,] -22282.7353 2822.2116 [30,] -24861.9547 -22282.7353 [31,] -8423.9651 -24861.9547 [32,] 12685.0296 -8423.9651 [33,] -4627.8586 12685.0296 [34,] 14979.3268 -4627.8586 [35,] 17282.6281 14979.3268 [36,] 36668.1673 17282.6281 [37,] 14819.6243 36668.1673 [38,] 23952.8076 14819.6243 [39,] -6138.7463 23952.8076 [40,] -13306.5179 -6138.7463 [41,] -10568.8542 -13306.5179 [42,] -17906.1719 -10568.8542 [43,] 19462.3434 -17906.1719 [44,] -94368.1201 19462.3434 [45,] 54504.5694 -94368.1201 [46,] -27860.9353 54504.5694 [47,] -4990.7468 -27860.9353 [48,] -38082.8655 -4990.7468 [49,] -52312.4023 -38082.8655 [50,] -15222.6625 -52312.4023 [51,] -15535.3221 -15222.6625 [52,] 35222.6481 -15535.3221 [53,] -1181.9161 35222.6481 [54,] -7775.3278 -1181.9161 [55,] 8648.6324 -7775.3278 [56,] 6069.4651 8648.6324 [57,] -31786.1816 6069.4651 [58,] -19007.2674 -31786.1816 [59,] 37294.8647 -19007.2674 [60,] -4087.4540 37294.8647 [61,] -36711.8367 -4087.4540 [62,] -31272.6262 -36711.8367 [63,] 9144.8862 -31272.6262 [64,] 6516.4303 9144.8862 [65,] 28200.4573 6516.4303 [66,] -11172.6517 28200.4573 [67,] -34371.1456 -11172.6517 [68,] -3180.3769 -34371.1456 [69,] -22748.2553 -3180.3769 [70,] -2194.0404 -22748.2553 [71,] -15124.9585 -2194.0404 [72,] 7150.9022 -15124.9585 [73,] -4026.0829 7150.9022 [74,] -15478.9735 -4026.0829 [75,] 73699.2492 -15478.9735 [76,] 12149.0894 73699.2492 [77,] -20935.0629 12149.0894 [78,] -5871.0155 -20935.0629 [79,] -3580.9599 -5871.0155 [80,] -16086.5801 -3580.9599 [81,] 82311.3830 -16086.5801 [82,] -18513.0304 82311.3830 [83,] 27787.8795 -18513.0304 [84,] -20191.3043 27787.8795 [85,] -9951.2129 -20191.3043 [86,] -4417.5060 -9951.2129 [87,] 4211.6398 -4417.5060 [88,] 17886.8640 4211.6398 [89,] -75786.0415 17886.8640 [90,] 27114.2901 -75786.0415 [91,] 8821.2596 27114.2901 [92,] 4093.3507 8821.2596 [93,] 3612.0110 4093.3507 [94,] 26253.6331 3612.0110 [95,] -738.4416 26253.6331 [96,] 8894.9070 -738.4416 [97,] -4170.6348 8894.9070 [98,] -16330.0925 -4170.6348 [99,] 8080.7160 -16330.0925 [100,] 15454.8638 8080.7160 [101,] -11017.3710 15454.8638 [102,] -13356.7138 -11017.3710 [103,] -14302.2361 -13356.7138 [104,] 2275.7811 -14302.2361 [105,] -32749.1932 2275.7811 [106,] -23142.3418 -32749.1932 [107,] 11274.2288 -23142.3418 [108,] -75732.3206 11274.2288 [109,] -40384.0311 -75732.3206 [110,] 43589.7115 -40384.0311 [111,] 58858.3587 43589.7115 [112,] 2874.3322 58858.3587 [113,] -22557.5339 2874.3322 [114,] 11090.7567 -22557.5339 [115,] 5708.1420 11090.7567 [116,] 14250.5929 5708.1420 [117,] 1054.5488 14250.5929 [118,] 17722.6063 1054.5488 [119,] -6917.5616 17722.6063 [120,] -28778.0331 -6917.5616 [121,] 19674.2683 -28778.0331 [122,] 35091.2419 19674.2683 [123,] -25586.0725 35091.2419 [124,] -14726.3651 -25586.0725 [125,] 2793.5848 -14726.3651 [126,] 30850.9393 2793.5848 [127,] -7100.7440 30850.9393 [128,] 577.7499 -7100.7440 [129,] -19918.7538 577.7499 [130,] 3455.2008 -19918.7538 [131,] 4742.0496 3455.2008 [132,] -27902.5048 4742.0496 [133,] 1974.6814 -27902.5048 [134,] 11348.9446 1974.6814 [135,] 8276.6255 11348.9446 [136,] -518.0180 8276.6255 [137,] -22704.8731 -518.0180 [138,] 18368.9321 -22704.8731 [139,] -7035.7125 18368.9321 [140,] 26970.3146 -7035.7125 [141,] 18061.1472 26970.3146 [142,] -460.7307 18061.1472 [143,] 43934.9224 -460.7307 [144,] 23637.3111 43934.9224 [145,] -46150.1989 23637.3111 [146,] -42846.4660 -46150.1989 [147,] 2719.9011 -42846.4660 [148,] 6087.5340 2719.9011 [149,] 2737.0797 6087.5340 [150,] 6002.6622 2737.0797 [151,] 6177.7904 6002.6622 [152,] 6086.5340 6177.7904 [153,] 6086.5340 6086.5340 [154,] 13085.6860 6086.5340 [155,] 38441.2601 13085.6860 [156,] 6086.5340 38441.2601 [157,] 5562.0467 6086.5340 [158,] -120.0244 5562.0467 [159,] -3379.6752 -120.0244 [160,] 7715.4028 -3379.6752 [161,] 29069.9417 7715.4028 [162,] 6691.7904 29069.9417 [163,] 34414.5323 6691.7904 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -17909.3591 44907.3456 2 16148.3606 -17909.3591 3 -58092.0724 16148.3606 4 13308.2494 -58092.0724 5 -15790.7432 13308.2494 6 -7943.7840 -15790.7432 7 3058.5501 -7943.7840 8 -17080.7837 3058.5501 9 20117.3781 -17080.7837 10 14011.1081 20117.3781 11 7298.3369 14011.1081 12 -9252.0377 7298.3369 13 50595.5714 -9252.0377 14 10316.6259 50595.5714 15 -44328.7558 10316.6259 16 15772.6269 -44328.7558 17 10508.5131 15772.6269 18 -2028.9904 10508.5131 19 12413.1671 -2028.9904 20 13594.4325 12413.1671 21 107635.3590 13594.4325 22 6209.2521 107635.3590 23 -28004.9129 6209.2521 24 -67108.9609 -28004.9129 25 -43110.9770 -67108.9609 26 -31129.6760 -43110.9770 27 25236.1552 -31129.6760 28 2822.2116 25236.1552 29 -22282.7353 2822.2116 30 -24861.9547 -22282.7353 31 -8423.9651 -24861.9547 32 12685.0296 -8423.9651 33 -4627.8586 12685.0296 34 14979.3268 -4627.8586 35 17282.6281 14979.3268 36 36668.1673 17282.6281 37 14819.6243 36668.1673 38 23952.8076 14819.6243 39 -6138.7463 23952.8076 40 -13306.5179 -6138.7463 41 -10568.8542 -13306.5179 42 -17906.1719 -10568.8542 43 19462.3434 -17906.1719 44 -94368.1201 19462.3434 45 54504.5694 -94368.1201 46 -27860.9353 54504.5694 47 -4990.7468 -27860.9353 48 -38082.8655 -4990.7468 49 -52312.4023 -38082.8655 50 -15222.6625 -52312.4023 51 -15535.3221 -15222.6625 52 35222.6481 -15535.3221 53 -1181.9161 35222.6481 54 -7775.3278 -1181.9161 55 8648.6324 -7775.3278 56 6069.4651 8648.6324 57 -31786.1816 6069.4651 58 -19007.2674 -31786.1816 59 37294.8647 -19007.2674 60 -4087.4540 37294.8647 61 -36711.8367 -4087.4540 62 -31272.6262 -36711.8367 63 9144.8862 -31272.6262 64 6516.4303 9144.8862 65 28200.4573 6516.4303 66 -11172.6517 28200.4573 67 -34371.1456 -11172.6517 68 -3180.3769 -34371.1456 69 -22748.2553 -3180.3769 70 -2194.0404 -22748.2553 71 -15124.9585 -2194.0404 72 7150.9022 -15124.9585 73 -4026.0829 7150.9022 74 -15478.9735 -4026.0829 75 73699.2492 -15478.9735 76 12149.0894 73699.2492 77 -20935.0629 12149.0894 78 -5871.0155 -20935.0629 79 -3580.9599 -5871.0155 80 -16086.5801 -3580.9599 81 82311.3830 -16086.5801 82 -18513.0304 82311.3830 83 27787.8795 -18513.0304 84 -20191.3043 27787.8795 85 -9951.2129 -20191.3043 86 -4417.5060 -9951.2129 87 4211.6398 -4417.5060 88 17886.8640 4211.6398 89 -75786.0415 17886.8640 90 27114.2901 -75786.0415 91 8821.2596 27114.2901 92 4093.3507 8821.2596 93 3612.0110 4093.3507 94 26253.6331 3612.0110 95 -738.4416 26253.6331 96 8894.9070 -738.4416 97 -4170.6348 8894.9070 98 -16330.0925 -4170.6348 99 8080.7160 -16330.0925 100 15454.8638 8080.7160 101 -11017.3710 15454.8638 102 -13356.7138 -11017.3710 103 -14302.2361 -13356.7138 104 2275.7811 -14302.2361 105 -32749.1932 2275.7811 106 -23142.3418 -32749.1932 107 11274.2288 -23142.3418 108 -75732.3206 11274.2288 109 -40384.0311 -75732.3206 110 43589.7115 -40384.0311 111 58858.3587 43589.7115 112 2874.3322 58858.3587 113 -22557.5339 2874.3322 114 11090.7567 -22557.5339 115 5708.1420 11090.7567 116 14250.5929 5708.1420 117 1054.5488 14250.5929 118 17722.6063 1054.5488 119 -6917.5616 17722.6063 120 -28778.0331 -6917.5616 121 19674.2683 -28778.0331 122 35091.2419 19674.2683 123 -25586.0725 35091.2419 124 -14726.3651 -25586.0725 125 2793.5848 -14726.3651 126 30850.9393 2793.5848 127 -7100.7440 30850.9393 128 577.7499 -7100.7440 129 -19918.7538 577.7499 130 3455.2008 -19918.7538 131 4742.0496 3455.2008 132 -27902.5048 4742.0496 133 1974.6814 -27902.5048 134 11348.9446 1974.6814 135 8276.6255 11348.9446 136 -518.0180 8276.6255 137 -22704.8731 -518.0180 138 18368.9321 -22704.8731 139 -7035.7125 18368.9321 140 26970.3146 -7035.7125 141 18061.1472 26970.3146 142 -460.7307 18061.1472 143 43934.9224 -460.7307 144 23637.3111 43934.9224 145 -46150.1989 23637.3111 146 -42846.4660 -46150.1989 147 2719.9011 -42846.4660 148 6087.5340 2719.9011 149 2737.0797 6087.5340 150 6002.6622 2737.0797 151 6177.7904 6002.6622 152 6086.5340 6177.7904 153 6086.5340 6086.5340 154 13085.6860 6086.5340 155 38441.2601 13085.6860 156 6086.5340 38441.2601 157 5562.0467 6086.5340 158 -120.0244 5562.0467 159 -3379.6752 -120.0244 160 7715.4028 -3379.6752 161 29069.9417 7715.4028 162 6691.7904 29069.9417 163 34414.5323 6691.7904 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7dlmp1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/89r4p1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/9q1cm1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/rcomp/tmp/10rs5l1324646303.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/114bvo1324646303.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/12t3611324646303.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/133isy1324646303.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/149kmn1324646303.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/1569dg1324646303.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/160h6r1324646303.tab") + } > > try(system("convert tmp/1fzxm1324646303.ps tmp/1fzxm1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/2vqgi1324646303.ps tmp/2vqgi1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/3tc6a1324646303.ps tmp/3tc6a1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/4ki7h1324646303.ps tmp/4ki7h1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/57zcq1324646303.ps tmp/57zcq1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/6vrso1324646303.ps tmp/6vrso1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/7dlmp1324646303.ps tmp/7dlmp1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/89r4p1324646303.ps tmp/89r4p1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/9q1cm1324646303.ps tmp/9q1cm1324646303.png",intern=TRUE)) character(0) > try(system("convert tmp/10rs5l1324646303.ps tmp/10rs5l1324646303.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.280 0.260 6.541