R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(279055 + ,73 + ,504 + ,96 + ,42 + ,130 + ,186099 + ,209884 + ,73 + ,502 + ,75 + ,38 + ,143 + ,113854 + ,233939 + ,83 + ,710 + ,70 + ,46 + ,118 + ,99776 + ,222117 + ,106 + ,1154 + ,134 + ,42 + ,146 + ,106194 + ,179751 + ,54 + ,402 + ,72 + ,30 + ,73 + ,100792 + ,70849 + ,28 + ,179 + ,8 + ,35 + ,89 + ,47552 + ,568125 + ,131 + ,2452 + ,169 + ,40 + ,146 + ,250931 + ,33186 + ,19 + ,111 + ,1 + ,18 + ,22 + ,6853 + ,227332 + ,62 + ,763 + ,88 + ,38 + ,132 + ,115466 + ,258874 + ,48 + ,650 + ,98 + ,37 + ,92 + ,110896 + ,351915 + ,118 + ,933 + ,106 + ,46 + ,147 + ,169351 + ,260484 + ,129 + ,728 + ,122 + ,60 + ,203 + ,94853 + ,204003 + ,83 + ,764 + ,57 + ,37 + ,113 + ,72591 + ,368577 + ,85 + ,1186 + ,139 + ,55 + ,171 + ,101345 + ,269455 + ,88 + ,724 + ,87 + ,44 + ,87 + ,113713 + ,395936 + ,187 + ,1758 + ,176 + ,63 + ,208 + ,165354 + ,335567 + ,76 + ,845 + ,114 + ,40 + ,153 + ,164263 + ,423110 + ,171 + ,1382 + ,121 + ,43 + ,97 + ,135213 + ,182016 + ,58 + ,514 + ,103 + ,32 + ,95 + ,111669 + ,267365 + ,88 + ,692 + ,135 + ,52 + ,197 + ,134163 + ,279428 + ,73 + ,847 + ,123 + ,49 + ,160 + ,140303 + ,508849 + ,111 + ,1397 + ,99 + ,41 + ,148 + ,150773 + ,206722 + ,47 + ,533 + ,74 + ,25 + ,84 + ,111848 + ,200004 + ,58 + ,636 + ,103 + ,57 + ,227 + ,102509 + ,257139 + ,132 + ,1370 + ,158 + ,45 + ,154 + ,96785 + ,270815 + ,137 + ,1090 + ,116 + ,42 + ,151 + ,116136 + ,296850 + ,133 + ,1149 + ,102 + ,45 + ,142 + ,158376 + ,307100 + ,90 + ,715 + ,132 + ,43 + ,148 + ,153990 + ,184160 + ,58 + ,639 + ,62 + ,36 + ,110 + ,64057 + ,393860 + ,79 + ,1213 + ,150 + ,45 + ,149 + ,230054 + ,327660 + ,89 + ,1111 + ,143 + ,50 + ,179 + ,184531 + ,252512 + ,82 + ,728 + ,50 + ,50 + ,149 + ,114198 + ,373013 + ,102 + ,885 + ,141 + ,51 + ,187 + ,198299 + ,115602 + ,46 + ,410 + ,48 + ,42 + ,153 + ,33750 + ,430118 + ,103 + ,1293 + ,141 + ,44 + ,163 + ,189723 + ,273950 + ,56 + ,1186 + ,83 + ,42 + ,127 + ,100826 + ,428077 + ,128 + ,1348 + ,112 + ,44 + ,151 + ,188355 + ,251349 + ,91 + ,689 + ,79 + ,40 + ,100 + ,104470 + ,115658 + ,34 + ,284 + ,33 + ,17 + ,46 + ,58391 + ,388812 + ,208 + ,1304 + ,149 + ,43 + ,156 + ,164808 + ,343783 + ,85 + ,1556 + ,126 + ,41 + ,128 + ,134097 + ,207021 + ,76 + ,770 + ,85 + ,41 + ,111 + ,80238 + ,214344 + ,81 + ,676 + ,84 + ,40 + ,119 + ,133252 + ,182398 + ,66 + ,487 + ,68 + ,49 + ,148 + ,54518 + ,157164 + ,84 + ,1051 + ,50 + ,52 + ,65 + ,121850 + ,459455 + ,157 + ,2089 + ,101 + ,42 + ,134 + ,79367 + ,78800 + ,42 + ,330 + ,20 + ,26 + ,66 + ,56968 + ,217932 + ,84 + ,694 + ,101 + ,59 + ,201 + ,106314 + ,368086 + ,122 + ,1410 + ,150 + ,50 + ,177 + ,191889 + ,215843 + ,67 + ,1090 + ,118 + ,50 + ,156 + ,104864 + ,244765 + ,80 + ,690 + ,99 + ,47 + ,158 + ,160792 + ,24188 + ,24 + ,218 + ,8 + ,4 + ,7 + ,15049 + ,399093 + ,333 + ,862 + ,88 + ,51 + ,175 + ,191179 + ,65029 + ,17 + ,255 + ,21 + ,18 + ,61 + ,25109 + ,101097 + ,64 + ,454 + ,30 + ,14 + ,41 + ,45824 + ,300488 + ,64 + ,1208 + ,97 + ,41 + ,133 + ,129711 + ,369627 + ,90 + ,785 + ,163 + ,61 + ,228 + ,210012 + ,367127 + ,204 + ,1208 + ,132 + ,40 + ,140 + ,194679 + ,374193 + ,152 + ,1096 + ,161 + ,44 + ,155 + ,197680 + ,270099 + ,88 + ,887 + ,89 + ,40 + ,141 + ,81180 + ,391871 + ,151 + ,1335 + ,160 + ,51 + ,181 + ,197765 + ,315924 + ,121 + ,1190 + ,139 + ,29 + ,75 + ,214738 + ,291391 + ,124 + ,1257 + ,104 + ,43 + ,97 + ,96252 + ,295075 + ,93 + ,1030 + ,103 + ,42 + ,142 + ,124527 + ,276201 + ,78 + ,658 + ,66 + ,41 + ,136 + ,153242 + ,267432 + ,71 + ,542 + ,163 + ,30 + ,87 + ,145707 + ,215924 + ,140 + ,651 + ,93 + ,39 + ,140 + ,113963 + ,256641 + ,157 + ,888 + ,85 + ,51 + ,169 + ,134904 + ,260919 + ,87 + ,913 + ,150 + ,40 + ,129 + ,114268 + ,182961 + ,73 + ,637 + ,143 + ,29 + ,92 + ,94333 + ,256967 + ,74 + ,900 + ,107 + ,47 + ,160 + ,102204 + ,73566 + ,32 + ,385 + ,22 + ,23 + ,67 + ,23824 + ,272362 + ,93 + ,784 + ,85 + ,48 + ,179 + ,111563 + ,220707 + ,61 + ,891 + ,91 + ,38 + ,90 + ,91313 + ,228835 + ,68 + ,779 + ,131 + ,42 + ,144 + ,89770 + ,371391 + ,91 + ,1001 + ,140 + ,46 + ,144 + ,100125 + ,398210 + ,104 + ,1265 + ,156 + ,40 + ,144 + ,165278 + ,220401 + ,110 + ,586 + ,81 + ,45 + ,134 + ,181712 + ,229333 + ,70 + ,765 + ,137 + ,42 + ,146 + ,80906 + ,217623 + ,71 + ,737 + ,102 + ,41 + ,121 + ,75881 + ,200046 + ,53 + ,766 + ,72 + ,37 + ,112 + ,83963 + ,483074 + ,131 + ,1272 + ,161 + ,47 + ,145 + ,175721 + ,145943 + ,71 + ,653 + ,30 + ,26 + ,99 + ,68580 + ,295224 + ,108 + ,703 + ,120 + ,48 + ,96 + ,136323 + ,80953 + ,25 + ,437 + ,49 + ,8 + ,27 + ,55792 + ,180759 + ,61 + ,936 + ,71 + ,27 + ,77 + ,25157 + ,179344 + ,61 + ,459 + ,76 + ,38 + ,137 + ,100922 + ,415550 + ,221 + ,1586 + ,85 + ,41 + ,151 + ,118845 + ,369093 + ,128 + ,1053 + ,146 + ,61 + ,126 + ,170492 + ,180679 + ,106 + ,1051 + ,165 + ,45 + ,159 + ,81716 + ,299505 + ,104 + ,846 + ,89 + ,41 + ,101 + ,115750 + ,292260 + ,84 + ,732 + ,168 + ,42 + ,144 + ,105590 + ,199481 + ,67 + ,632 + ,48 + ,35 + ,102 + ,92795 + ,282361 + ,78 + ,1128 + ,149 + ,36 + ,135 + ,82390 + ,329281 + ,89 + ,971 + ,75 + ,40 + ,147 + ,135599 + ,234577 + ,48 + ,711 + ,107 + ,40 + ,155 + ,127667 + ,297995 + ,67 + ,738 + ,116 + ,38 + ,138 + ,163073 + ,305984 + ,88 + ,820 + ,165 + ,43 + ,113 + ,211381 + ,416463 + ,163 + ,1369 + ,155 + ,65 + ,248 + ,189944 + ,414359 + ,118 + ,1501 + ,165 + ,33 + ,116 + ,226168 + ,297080 + ,142 + ,893 + ,121 + ,51 + ,176 + ,117495 + ,318283 + ,70 + ,902 + ,156 + ,45 + ,140 + ,195894 + ,222281 + ,197 + ,782 + ,86 + ,36 + ,59 + ,80684 + ,43287 + ,14 + ,214 + ,13 + ,19 + ,64 + ,19630 + ,223456 + ,86 + ,795 + ,113 + ,25 + ,40 + ,88634 + ,258249 + ,158 + ,874 + ,112 + ,44 + ,98 + ,139292 + ,299566 + ,60 + ,1275 + ,133 + ,45 + ,139 + ,128602 + ,321797 + ,95 + ,1079 + ,169 + ,44 + ,135 + ,135848 + ,174736 + ,89 + ,443 + ,30 + ,35 + ,97 + ,178377 + ,169579 + ,102 + ,977 + ,121 + ,46 + ,142 + ,106330 + ,354041 + ,77 + ,677 + ,82 + ,44 + ,155 + ,178303 + ,303273 + ,90 + ,696 + ,148 + ,45 + ,115 + ,116938 + ,23668 + ,13 + ,156 + ,12 + ,1 + ,0 + ,5841 + ,196743 + ,79 + ,785 + ,146 + ,40 + ,103 + ,106020 + ,61857 + ,25 + ,192 + ,23 + ,11 + ,30 + ,24610 + ,207339 + ,53 + ,606 + ,84 + ,51 + ,130 + ,74151 + ,431443 + ,123 + ,1234 + ,163 + ,38 + ,102 + ,232241 + ,21054 + ,16 + ,146 + ,4 + ,0 + ,0 + ,6622 + ,252805 + ,52 + ,866 + ,81 + ,30 + ,77 + ,127097 + ,31961 + ,22 + ,200 + ,18 + ,8 + ,9 + ,13155 + ,360401 + ,124 + ,1350 + ,118 + ,43 + ,150 + ,160501 + ,251240 + ,76 + ,735 + ,76 + ,48 + ,163 + ,91502 + ,187003 + ,96 + ,522 + ,55 + ,49 + ,148 + ,24469 + ,180842 + ,58 + ,724 + ,62 + ,32 + ,94 + ,88229 + ,38214 + ,34 + ,276 + ,16 + ,8 + ,21 + ,13983 + ,278173 + ,55 + ,859 + ,98 + ,43 + ,151 + ,80716 + ,358276 + ,84 + ,1031 + ,137 + ,52 + ,187 + ,157384 + ,211775 + ,66 + ,511 + ,50 + ,53 + ,171 + ,122975 + ,445926 + ,89 + ,1708 + ,152 + ,49 + ,170 + ,191469 + ,348017 + ,99 + ,884 + ,163 + ,48 + ,145 + ,231257 + ,441946 + ,133 + ,1201 + ,142 + ,56 + ,198 + ,258287 + ,210700 + ,42 + ,559 + ,77 + ,45 + ,152 + ,122531 + ,126320 + ,46 + ,478 + ,59 + ,40 + ,112 + ,61394 + ,316128 + ,361 + ,1005 + ,94 + ,48 + ,173 + ,86480 + ,466139 + ,198 + ,1574 + ,128 + ,50 + ,177 + ,195791 + ,162279 + ,62 + ,575 + ,63 + ,43 + ,153 + ,18284 + ,412099 + ,139 + ,1812 + ,127 + ,46 + ,161 + ,147581 + ,173802 + ,83 + ,755 + ,59 + ,40 + ,115 + ,72558 + ,292443 + ,54 + ,668 + ,118 + ,45 + ,147 + ,147341 + ,283913 + ,100 + ,905 + ,110 + ,46 + ,124 + ,114651 + ,243609 + ,124 + ,682 + ,45 + ,37 + ,57 + ,100187 + ,387072 + ,125 + ,1613 + ,96 + ,45 + ,144 + ,130332 + ,246963 + ,92 + ,811 + ,128 + ,39 + ,126 + ,134218 + ,173260 + ,63 + ,716 + ,41 + ,21 + ,78 + ,10901 + ,346748 + ,108 + ,1034 + ,146 + ,50 + ,153 + ,145758 + ,176654 + ,58 + ,732 + ,147 + ,55 + ,196 + ,75767 + ,264767 + ,92 + ,1060 + ,121 + ,40 + ,130 + ,134969 + ,314070 + ,112 + ,852 + ,185 + ,48 + ,159 + ,169216 + ,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 + ,284420 + ,92 + ,809 + ,85 + ,46 + ,94 + ,105406 + ,410509 + ,164 + ,1134 + ,157 + ,52 + ,129 + ,174586 + ,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 + ,121550 + ,46 + ,309 + ,37 + ,48 + ,89 + ,15673 + ,969 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,242258 + ,74 + ,690 + ,62 + ,34 + ,71 + ,75882) + ,dim=c(7 + ,164) + ,dimnames=list(c('Time' + ,'Logins' + ,'CompendiumViews' + ,'BloggedComputations' + ,'ReviewedCompendiums' + ,'LongFeedbackmessages' + ,'WritingTime') + ,1:164)) > y <- array(NA,dim=c(7,164),dimnames=list(c('Time','Logins','CompendiumViews','BloggedComputations','ReviewedCompendiums','LongFeedbackmessages','WritingTime'),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 CompendiumViews BloggedComputations ReviewedCompendiums 1 279055 73 504 96 42 2 209884 73 502 75 38 3 233939 83 710 70 46 4 222117 106 1154 134 42 5 179751 54 402 72 30 6 70849 28 179 8 35 7 568125 131 2452 169 40 8 33186 19 111 1 18 9 227332 62 763 88 38 10 258874 48 650 98 37 11 351915 118 933 106 46 12 260484 129 728 122 60 13 204003 83 764 57 37 14 368577 85 1186 139 55 15 269455 88 724 87 44 16 395936 187 1758 176 63 17 335567 76 845 114 40 18 423110 171 1382 121 43 19 182016 58 514 103 32 20 267365 88 692 135 52 21 279428 73 847 123 49 22 508849 111 1397 99 41 23 206722 47 533 74 25 24 200004 58 636 103 57 25 257139 132 1370 158 45 26 270815 137 1090 116 42 27 296850 133 1149 102 45 28 307100 90 715 132 43 29 184160 58 639 62 36 30 393860 79 1213 150 45 31 327660 89 1111 143 50 32 252512 82 728 50 50 33 373013 102 885 141 51 34 115602 46 410 48 42 35 430118 103 1293 141 44 36 273950 56 1186 83 42 37 428077 128 1348 112 44 38 251349 91 689 79 40 39 115658 34 284 33 17 40 388812 208 1304 149 43 41 343783 85 1556 126 41 42 207021 76 770 85 41 43 214344 81 676 84 40 44 182398 66 487 68 49 45 157164 84 1051 50 52 46 459455 157 2089 101 42 47 78800 42 330 20 26 48 217932 84 694 101 59 49 368086 122 1410 150 50 50 215843 67 1090 118 50 51 244765 80 690 99 47 52 24188 24 218 8 4 53 399093 333 862 88 51 54 65029 17 255 21 18 55 101097 64 454 30 14 56 300488 64 1208 97 41 57 369627 90 785 163 61 58 367127 204 1208 132 40 59 374193 152 1096 161 44 60 270099 88 887 89 40 61 391871 151 1335 160 51 62 315924 121 1190 139 29 63 291391 124 1257 104 43 64 295075 93 1030 103 42 65 276201 78 658 66 41 66 267432 71 542 163 30 67 215924 140 651 93 39 68 256641 157 888 85 51 69 260919 87 913 150 40 70 182961 73 637 143 29 71 256967 74 900 107 47 72 73566 32 385 22 23 73 272362 93 784 85 48 74 220707 61 891 91 38 75 228835 68 779 131 42 76 371391 91 1001 140 46 77 398210 104 1265 156 40 78 220401 110 586 81 45 79 229333 70 765 137 42 80 217623 71 737 102 41 81 200046 53 766 72 37 82 483074 131 1272 161 47 83 145943 71 653 30 26 84 295224 108 703 120 48 85 80953 25 437 49 8 86 180759 61 936 71 27 87 179344 61 459 76 38 88 415550 221 1586 85 41 89 369093 128 1053 146 61 90 180679 106 1051 165 45 91 299505 104 846 89 41 92 292260 84 732 168 42 93 199481 67 632 48 35 94 282361 78 1128 149 36 95 329281 89 971 75 40 96 234577 48 711 107 40 97 297995 67 738 116 38 98 305984 88 820 165 43 99 416463 163 1369 155 65 100 414359 118 1501 165 33 101 297080 142 893 121 51 102 318283 70 902 156 45 103 222281 197 782 86 36 104 43287 14 214 13 19 105 223456 86 795 113 25 106 258249 158 874 112 44 107 299566 60 1275 133 45 108 321797 95 1079 169 44 109 174736 89 443 30 35 110 169579 102 977 121 46 111 354041 77 677 82 44 112 303273 90 696 148 45 113 23668 13 156 12 1 114 196743 79 785 146 40 115 61857 25 192 23 11 116 207339 53 606 84 51 117 431443 123 1234 163 38 118 21054 16 146 4 0 119 252805 52 866 81 30 120 31961 22 200 18 8 121 360401 124 1350 118 43 122 251240 76 735 76 48 123 187003 96 522 55 49 124 180842 58 724 62 32 125 38214 34 276 16 8 126 278173 55 859 98 43 127 358276 84 1031 137 52 128 211775 66 511 50 53 129 445926 89 1708 152 49 130 348017 99 884 163 48 131 441946 133 1201 142 56 132 210700 42 559 77 45 133 126320 46 478 59 40 134 316128 361 1005 94 48 135 466139 198 1574 128 50 136 162279 62 575 63 43 137 412099 139 1812 127 46 138 173802 83 755 59 40 139 292443 54 668 118 45 140 283913 100 905 110 46 141 243609 124 682 45 37 142 387072 125 1613 96 45 143 246963 92 811 128 39 144 173260 63 716 41 21 145 346748 108 1034 146 50 146 176654 58 732 147 55 147 264767 92 1060 121 40 148 314070 112 852 185 48 149 1 0 0 0 0 150 14688 10 85 4 0 151 98 1 0 0 0 152 455 2 0 0 0 153 0 0 0 0 0 154 0 0 0 0 0 155 284420 92 809 85 46 156 410509 164 1134 157 52 157 0 0 0 0 0 158 203 4 0 0 0 159 7199 5 74 7 0 160 46660 20 259 12 5 161 17547 5 69 0 1 162 121550 46 309 37 48 163 969 2 0 0 0 164 242258 74 690 62 34 LongFeedbackmessages WritingTime 1 130 186099 2 143 113854 3 118 99776 4 146 106194 5 73 100792 6 89 47552 7 146 250931 8 22 6853 9 132 115466 10 92 110896 11 147 169351 12 203 94853 13 113 72591 14 171 101345 15 87 113713 16 208 165354 17 153 164263 18 97 135213 19 95 111669 20 197 134163 21 160 140303 22 148 150773 23 84 111848 24 227 102509 25 154 96785 26 151 116136 27 142 158376 28 148 153990 29 110 64057 30 149 230054 31 179 184531 32 149 114198 33 187 198299 34 153 33750 35 163 189723 36 127 100826 37 151 188355 38 100 104470 39 46 58391 40 156 164808 41 128 134097 42 111 80238 43 119 133252 44 148 54518 45 65 121850 46 134 79367 47 66 56968 48 201 106314 49 177 191889 50 156 104864 51 158 160792 52 7 15049 53 175 191179 54 61 25109 55 41 45824 56 133 129711 57 228 210012 58 140 194679 59 155 197680 60 141 81180 61 181 197765 62 75 214738 63 97 96252 64 142 124527 65 136 153242 66 87 145707 67 140 113963 68 169 134904 69 129 114268 70 92 94333 71 160 102204 72 67 23824 73 179 111563 74 90 91313 75 144 89770 76 144 100125 77 144 165278 78 134 181712 79 146 80906 80 121 75881 81 112 83963 82 145 175721 83 99 68580 84 96 136323 85 27 55792 86 77 25157 87 137 100922 88 151 118845 89 126 170492 90 159 81716 91 101 115750 92 144 105590 93 102 92795 94 135 82390 95 147 135599 96 155 127667 97 138 163073 98 113 211381 99 248 189944 100 116 226168 101 176 117495 102 140 195894 103 59 80684 104 64 19630 105 40 88634 106 98 139292 107 139 128602 108 135 135848 109 97 178377 110 142 106330 111 155 178303 112 115 116938 113 0 5841 114 103 106020 115 30 24610 116 130 74151 117 102 232241 118 0 6622 119 77 127097 120 9 13155 121 150 160501 122 163 91502 123 148 24469 124 94 88229 125 21 13983 126 151 80716 127 187 157384 128 171 122975 129 170 191469 130 145 231257 131 198 258287 132 152 122531 133 112 61394 134 173 86480 135 177 195791 136 153 18284 137 161 147581 138 115 72558 139 147 147341 140 124 114651 141 57 100187 142 144 130332 143 126 134218 144 78 10901 145 153 145758 146 196 75767 147 130 134969 148 159 169216 149 0 0 150 0 7953 151 0 0 152 0 0 153 0 0 154 0 0 155 94 105406 156 129 174586 157 0 0 158 0 0 159 0 4245 160 13 21509 161 4 7670 162 89 15673 163 0 0 164 71 75882 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Logins CompendiumViews -5401.8951 224.1105 127.9143 BloggedComputations ReviewedCompendiums LongFeedbackmessages 123.3972 544.5622 102.5921 WritingTime 0.7589 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -124331 -18242 95 19117 146522 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -5.402e+03 7.653e+03 -0.706 0.48132 Logins 2.241e+02 7.598e+01 2.950 0.00367 ** CompendiumViews 1.279e+02 1.138e+01 11.241 < 2e-16 *** BloggedComputations 1.234e+02 1.124e+02 1.098 0.27390 ReviewedCompendiums 5.446e+02 4.930e+02 1.105 0.27105 LongFeedbackmessages 1.026e+02 1.344e+02 0.763 0.44639 WritingTime 7.590e-01 8.078e-02 9.395 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 36490 on 157 degrees of freedom Multiple R-squared: 0.9172, Adjusted R-squared: 0.9141 F-statistic: 289.9 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.4727614 9.455227e-01 5.272386e-01 [2,] 0.4471902 8.943804e-01 5.528098e-01 [3,] 0.4075930 8.151861e-01 5.924070e-01 [4,] 0.3091146 6.182292e-01 6.908854e-01 [5,] 0.4500365 9.000729e-01 5.499635e-01 [6,] 0.3547238 7.094476e-01 6.452762e-01 [7,] 0.3999249 7.998498e-01 6.000751e-01 [8,] 0.3782580 7.565160e-01 6.217420e-01 [9,] 0.6967317 6.065366e-01 3.032683e-01 [10,] 0.6677016 6.645968e-01 3.322984e-01 [11,] 0.5896472 8.207056e-01 4.103528e-01 [12,] 0.5269684 9.460632e-01 4.730316e-01 [13,] 0.9916967 1.660651e-02 8.303256e-03 [14,] 0.9875076 2.498475e-02 1.249238e-02 [15,] 0.9838874 3.222525e-02 1.611262e-02 [16,] 0.9867885 2.642307e-02 1.321154e-02 [17,] 0.9826330 3.473404e-02 1.736702e-02 [18,] 0.9900421 1.991575e-02 9.957877e-03 [19,] 0.9883266 2.334683e-02 1.167342e-02 [20,] 0.9829997 3.400053e-02 1.700026e-02 [21,] 0.9807342 3.853157e-02 1.926579e-02 [22,] 0.9788898 4.222039e-02 2.111020e-02 [23,] 0.9722166 5.556687e-02 2.778344e-02 [24,] 0.9663837 6.723257e-02 3.361629e-02 [25,] 0.9545254 9.094928e-02 4.547464e-02 [26,] 0.9578396 8.432080e-02 4.216040e-02 [27,] 0.9452799 1.094403e-01 5.472014e-02 [28,] 0.9365516 1.268967e-01 6.344837e-02 [29,] 0.9224366 1.551268e-01 7.756340e-02 [30,] 0.9023784 1.952432e-01 9.762158e-02 [31,] 0.8772818 2.454363e-01 1.227182e-01 [32,] 0.8546788 2.906424e-01 1.453212e-01 [33,] 0.8231460 3.537080e-01 1.768540e-01 [34,] 0.8355551 3.288898e-01 1.644449e-01 [35,] 0.8138037 3.723925e-01 1.861963e-01 [36,] 0.9869469 2.610621e-02 1.305311e-02 [37,] 0.9910973 1.780541e-02 8.902707e-03 [38,] 0.9920028 1.599443e-02 7.997216e-03 [39,] 0.9903043 1.939135e-02 9.695676e-03 [40,] 0.9913170 1.736593e-02 8.682965e-03 [41,] 0.9951507 9.698532e-03 4.849266e-03 [42,] 0.9947639 1.047216e-02 5.236080e-03 [43,] 0.9946503 1.069938e-02 5.349688e-03 [44,] 0.9936336 1.273280e-02 6.366399e-03 [45,] 0.9913175 1.736506e-02 8.682529e-03 [46,] 0.9894449 2.111028e-02 1.055514e-02 [47,] 0.9859466 2.810679e-02 1.405339e-02 [48,] 0.9826494 3.470125e-02 1.735062e-02 [49,] 0.9814374 3.712525e-02 1.856262e-02 [50,] 0.9753970 4.920598e-02 2.460299e-02 [51,] 0.9741024 5.179525e-02 2.589762e-02 [52,] 0.9689985 6.200306e-02 3.100153e-02 [53,] 0.9794988 4.100237e-02 2.050119e-02 [54,] 0.9746695 5.066102e-02 2.533051e-02 [55,] 0.9668909 6.621829e-02 3.310914e-02 [56,] 0.9592851 8.142977e-02 4.071488e-02 [57,] 0.9622461 7.550777e-02 3.775388e-02 [58,] 0.9571415 8.571695e-02 4.285847e-02 [59,] 0.9613832 7.723365e-02 3.861682e-02 [60,] 0.9511550 9.769000e-02 4.884500e-02 [61,] 0.9421577 1.156847e-01 5.784234e-02 [62,] 0.9277034 1.445932e-01 7.229658e-02 [63,] 0.9158725 1.682550e-01 8.412751e-02 [64,] 0.9002421 1.995159e-01 9.975794e-02 [65,] 0.8833401 2.333198e-01 1.166599e-01 [66,] 0.8595792 2.808415e-01 1.404208e-01 [67,] 0.9620324 7.593523e-02 3.796761e-02 [68,] 0.9623327 7.533465e-02 3.766732e-02 [69,] 0.9752874 4.942526e-02 2.471263e-02 [70,] 0.9680717 6.385667e-02 3.192833e-02 [71,] 0.9593902 8.121954e-02 4.060977e-02 [72,] 0.9494006 1.011989e-01 5.059943e-02 [73,] 0.9935811 1.283780e-02 6.418901e-03 [74,] 0.9929981 1.400373e-02 7.001865e-03 [75,] 0.9924523 1.509531e-02 7.547653e-03 [76,] 0.9916779 1.664429e-02 8.322146e-03 [77,] 0.9886328 2.273430e-02 1.136715e-02 [78,] 0.9848698 3.026039e-02 1.513020e-02 [79,] 0.9835135 3.297297e-02 1.648648e-02 [80,] 0.9790652 4.186962e-02 2.093481e-02 [81,] 0.9968347 6.330616e-03 3.165308e-03 [82,] 0.9971347 5.730514e-03 2.865257e-03 [83,] 0.9979631 4.073832e-03 2.036916e-03 [84,] 0.9970624 5.875174e-03 2.937587e-03 [85,] 0.9960440 7.911914e-03 3.955957e-03 [86,] 0.9964878 7.024349e-03 3.512175e-03 [87,] 0.9950708 9.858484e-03 4.929242e-03 [88,] 0.9941082 1.178352e-02 5.891758e-03 [89,] 0.9931745 1.365097e-02 6.825483e-03 [90,] 0.9907678 1.846436e-02 9.232178e-03 [91,] 0.9881047 2.379057e-02 1.189529e-02 [92,] 0.9839738 3.205246e-02 1.602623e-02 [93,] 0.9791288 4.174231e-02 2.087115e-02 [94,] 0.9739894 5.202130e-02 2.601065e-02 [95,] 0.9676905 6.461893e-02 3.230946e-02 [96,] 0.9580979 8.380424e-02 4.190212e-02 [97,] 0.9627700 7.446000e-02 3.723000e-02 [98,] 0.9580996 8.380086e-02 4.190043e-02 [99,] 0.9458615 1.082770e-01 5.413848e-02 [100,] 0.9844981 3.100372e-02 1.550186e-02 [101,] 0.9997099 5.801985e-04 2.900993e-04 [102,] 0.9999477 1.045761e-04 5.228804e-05 [103,] 0.9999832 3.368075e-05 1.684037e-05 [104,] 0.9999693 6.131464e-05 3.065732e-05 [105,] 0.9999901 1.973501e-05 9.867503e-06 [106,] 0.9999817 3.661343e-05 1.830672e-05 [107,] 0.9999676 6.473546e-05 3.236773e-05 [108,] 0.9999550 9.004272e-05 4.502136e-05 [109,] 0.9999186 1.628428e-04 8.142142e-05 [110,] 0.9998564 2.871683e-04 1.435841e-04 [111,] 0.9997936 4.128607e-04 2.064304e-04 [112,] 0.9996666 6.668687e-04 3.334344e-04 [113,] 0.9995599 8.801181e-04 4.400591e-04 [114,] 0.9995485 9.029315e-04 4.514658e-04 [115,] 0.9995206 9.588004e-04 4.794002e-04 [116,] 0.9994251 1.149888e-03 5.749442e-04 [117,] 0.9998310 3.380554e-04 1.690277e-04 [118,] 0.9999134 1.732021e-04 8.660104e-05 [119,] 0.9998353 3.294524e-04 1.647262e-04 [120,] 0.9996975 6.049542e-04 3.024771e-04 [121,] 0.9996011 7.978184e-04 3.989092e-04 [122,] 0.9992747 1.450617e-03 7.253084e-04 [123,] 0.9986930 2.613981e-03 1.306991e-03 [124,] 0.9989541 2.091778e-03 1.045889e-03 [125,] 0.9985046 2.990782e-03 1.495391e-03 [126,] 0.9974386 5.122712e-03 2.561356e-03 [127,] 0.9984143 3.171300e-03 1.585650e-03 [128,] 0.9975567 4.886502e-03 2.443251e-03 [129,] 0.9982292 3.541664e-03 1.770832e-03 [130,] 0.9999957 8.592944e-06 4.296472e-06 [131,] 0.9999877 2.454474e-05 1.227237e-05 [132,] 0.9999774 4.527886e-05 2.263943e-05 [133,] 0.9999368 1.264646e-04 6.323231e-05 [134,] 0.9998606 2.787802e-04 1.393901e-04 [135,] 0.9999009 1.982420e-04 9.912098e-05 [136,] 0.9999907 1.868046e-05 9.340228e-06 [137,] 0.9999956 8.798686e-06 4.399343e-06 [138,] 0.9999911 1.781359e-05 8.906796e-06 [139,] 0.9999619 7.616714e-05 3.808357e-05 [140,] 0.9998423 3.153416e-04 1.576708e-04 [141,] 0.9996451 7.098159e-04 3.549080e-04 [142,] 0.9985265 2.946982e-03 1.473491e-03 [143,] 0.9942217 1.155664e-02 5.778318e-03 [144,] 0.9805907 3.881863e-02 1.940931e-02 [145,] 0.9410019 1.179962e-01 5.899811e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1lhbb1324632680.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/2zjme1324632680.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/34kkj1324632680.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/4a6mg1324632680.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/595ns1324632680.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 14333.5276 3684.5602 8402.0583 -78831.1351 12422.6315 -18187.9904 7 8 9 10 11 12 -17536.5604 2747.6792 -11486.9413 44529.6007 29787.9079 3310.9696 13 14 15 16 17 18 -791.0872 61660.9746 32600.9539 -68303.9988 39635.1880 62492.8743 19 20 21 22 23 24 -15961.7744 -2481.0050 -4632.6571 146522.1963 17162.1842 -33783.5636 25 26 27 28 29 30 -75540.5029 -34731.3311 -46387.6616 29114.3179 7670.1948 -6503.4099 31 32 33 34 35 36 -32284.3867 11060.4783 27496.0929 -11855.8878 44970.8341 -7569.3208 37 38 39 40 41 42 36139.6508 27146.3234 14747.7403 -2089.0663 -21678.9475 -8203.6729 43 44 45 46 47 48 -30365.0088 19079.7156 -124330.9379 53140.8837 -34055.9572 -30164.2049 49 50 51 52 53 54 -43743.3647 -70576.9703 -32076.1572 -18979.0843 17923.4772 -3705.1843 55 56 57 58 59 60 -16227.4524 -9359.1297 18334.6372 -27895.5182 -4422.6249 33477.3032 61 62 63 64 65 66 -23512.4844 -61623.7656 -11036.4548 3223.5370 19227.8992 31632.0929 67 68 69 70 71 72 -26890.7384 -44715.2177 -10212.6049 -23949.1688 -2118.5278 -17645.2156 73 74 75 76 77 78 16974.3512 -11991.2775 -2588.6988 95268.0321 37249.3892 -59965.1213 79 80 81 82 83 84 5033.6425 7923.1222 -8659.7414 102709.7816 -28160.9253 32240.4099 85 86 87 88 89 90 -30662.6921 2305.4718 -8358.9061 30046.7603 17559.2362 -95309.0886 91 92 93 94 95 96 41864.2597 46690.2289 3151.7678 11624.6961 41501.1196 -9506.0833 97 98 99 100 101 102 21051.3781 -29022.7229 -13903.7119 -20565.4384 6497.9775 -14173.3949 103 104 105 106 107 108 -14000.2999 -15237.2417 8962.1402 -37106.5443 -24349.3732 6122.2521 109 110 111 112 113 114 -64566.1669 -108098.7906 70284.3097 56160.3513 -256.5298 -46801.8861 115 116 117 118 119 120 6512.7482 15595.0688 23902.3080 -1324.7178 5087.4911 -10635.3599 121 122 123 124 125 126 -9849.1832 23907.3682 36894.2386 -21046.1292 -18405.8965 49110.5203 127 128 129 130 131 132 29119.0378 -8885.3584 4708.4825 -18485.3026 -441.8498 -7410.5963 133 134 135 136 137 138 -26878.4310 -9048.6163 16052.6047 19471.8739 -14676.4078 -31901.4782 139 140 141 142 143 144 34324.5530 12782.0704 26397.3118 8094.1535 -23815.8630 40185.6855 145 146 147 148 149 150 24118.8736 -50277.5049 -38523.6530 -8317.5178 5402.8951 446.5574 151 152 153 154 155 156 5275.7846 5408.6741 5401.8951 5401.8951 40540.9128 40674.9729 157 158 159 160 161 162 5401.8951 4708.4531 -2070.8391 -7411.6480 6226.1798 25386.8840 163 164 5922.6741 51774.4355 > postscript(file="/var/wessaorg/rcomp/tmp/61wnw1324632680.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 14333.5276 NA 1 3684.5602 14333.5276 2 8402.0583 3684.5602 3 -78831.1351 8402.0583 4 12422.6315 -78831.1351 5 -18187.9904 12422.6315 6 -17536.5604 -18187.9904 7 2747.6792 -17536.5604 8 -11486.9413 2747.6792 9 44529.6007 -11486.9413 10 29787.9079 44529.6007 11 3310.9696 29787.9079 12 -791.0872 3310.9696 13 61660.9746 -791.0872 14 32600.9539 61660.9746 15 -68303.9988 32600.9539 16 39635.1880 -68303.9988 17 62492.8743 39635.1880 18 -15961.7744 62492.8743 19 -2481.0050 -15961.7744 20 -4632.6571 -2481.0050 21 146522.1963 -4632.6571 22 17162.1842 146522.1963 23 -33783.5636 17162.1842 24 -75540.5029 -33783.5636 25 -34731.3311 -75540.5029 26 -46387.6616 -34731.3311 27 29114.3179 -46387.6616 28 7670.1948 29114.3179 29 -6503.4099 7670.1948 30 -32284.3867 -6503.4099 31 11060.4783 -32284.3867 32 27496.0929 11060.4783 33 -11855.8878 27496.0929 34 44970.8341 -11855.8878 35 -7569.3208 44970.8341 36 36139.6508 -7569.3208 37 27146.3234 36139.6508 38 14747.7403 27146.3234 39 -2089.0663 14747.7403 40 -21678.9475 -2089.0663 41 -8203.6729 -21678.9475 42 -30365.0088 -8203.6729 43 19079.7156 -30365.0088 44 -124330.9379 19079.7156 45 53140.8837 -124330.9379 46 -34055.9572 53140.8837 47 -30164.2049 -34055.9572 48 -43743.3647 -30164.2049 49 -70576.9703 -43743.3647 50 -32076.1572 -70576.9703 51 -18979.0843 -32076.1572 52 17923.4772 -18979.0843 53 -3705.1843 17923.4772 54 -16227.4524 -3705.1843 55 -9359.1297 -16227.4524 56 18334.6372 -9359.1297 57 -27895.5182 18334.6372 58 -4422.6249 -27895.5182 59 33477.3032 -4422.6249 60 -23512.4844 33477.3032 61 -61623.7656 -23512.4844 62 -11036.4548 -61623.7656 63 3223.5370 -11036.4548 64 19227.8992 3223.5370 65 31632.0929 19227.8992 66 -26890.7384 31632.0929 67 -44715.2177 -26890.7384 68 -10212.6049 -44715.2177 69 -23949.1688 -10212.6049 70 -2118.5278 -23949.1688 71 -17645.2156 -2118.5278 72 16974.3512 -17645.2156 73 -11991.2775 16974.3512 74 -2588.6988 -11991.2775 75 95268.0321 -2588.6988 76 37249.3892 95268.0321 77 -59965.1213 37249.3892 78 5033.6425 -59965.1213 79 7923.1222 5033.6425 80 -8659.7414 7923.1222 81 102709.7816 -8659.7414 82 -28160.9253 102709.7816 83 32240.4099 -28160.9253 84 -30662.6921 32240.4099 85 2305.4718 -30662.6921 86 -8358.9061 2305.4718 87 30046.7603 -8358.9061 88 17559.2362 30046.7603 89 -95309.0886 17559.2362 90 41864.2597 -95309.0886 91 46690.2289 41864.2597 92 3151.7678 46690.2289 93 11624.6961 3151.7678 94 41501.1196 11624.6961 95 -9506.0833 41501.1196 96 21051.3781 -9506.0833 97 -29022.7229 21051.3781 98 -13903.7119 -29022.7229 99 -20565.4384 -13903.7119 100 6497.9775 -20565.4384 101 -14173.3949 6497.9775 102 -14000.2999 -14173.3949 103 -15237.2417 -14000.2999 104 8962.1402 -15237.2417 105 -37106.5443 8962.1402 106 -24349.3732 -37106.5443 107 6122.2521 -24349.3732 108 -64566.1669 6122.2521 109 -108098.7906 -64566.1669 110 70284.3097 -108098.7906 111 56160.3513 70284.3097 112 -256.5298 56160.3513 113 -46801.8861 -256.5298 114 6512.7482 -46801.8861 115 15595.0688 6512.7482 116 23902.3080 15595.0688 117 -1324.7178 23902.3080 118 5087.4911 -1324.7178 119 -10635.3599 5087.4911 120 -9849.1832 -10635.3599 121 23907.3682 -9849.1832 122 36894.2386 23907.3682 123 -21046.1292 36894.2386 124 -18405.8965 -21046.1292 125 49110.5203 -18405.8965 126 29119.0378 49110.5203 127 -8885.3584 29119.0378 128 4708.4825 -8885.3584 129 -18485.3026 4708.4825 130 -441.8498 -18485.3026 131 -7410.5963 -441.8498 132 -26878.4310 -7410.5963 133 -9048.6163 -26878.4310 134 16052.6047 -9048.6163 135 19471.8739 16052.6047 136 -14676.4078 19471.8739 137 -31901.4782 -14676.4078 138 34324.5530 -31901.4782 139 12782.0704 34324.5530 140 26397.3118 12782.0704 141 8094.1535 26397.3118 142 -23815.8630 8094.1535 143 40185.6855 -23815.8630 144 24118.8736 40185.6855 145 -50277.5049 24118.8736 146 -38523.6530 -50277.5049 147 -8317.5178 -38523.6530 148 5402.8951 -8317.5178 149 446.5574 5402.8951 150 5275.7846 446.5574 151 5408.6741 5275.7846 152 5401.8951 5408.6741 153 5401.8951 5401.8951 154 40540.9128 5401.8951 155 40674.9729 40540.9128 156 5401.8951 40674.9729 157 4708.4531 5401.8951 158 -2070.8391 4708.4531 159 -7411.6480 -2070.8391 160 6226.1798 -7411.6480 161 25386.8840 6226.1798 162 5922.6741 25386.8840 163 51774.4355 5922.6741 164 NA 51774.4355 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3684.5602 14333.5276 [2,] 8402.0583 3684.5602 [3,] -78831.1351 8402.0583 [4,] 12422.6315 -78831.1351 [5,] -18187.9904 12422.6315 [6,] -17536.5604 -18187.9904 [7,] 2747.6792 -17536.5604 [8,] -11486.9413 2747.6792 [9,] 44529.6007 -11486.9413 [10,] 29787.9079 44529.6007 [11,] 3310.9696 29787.9079 [12,] -791.0872 3310.9696 [13,] 61660.9746 -791.0872 [14,] 32600.9539 61660.9746 [15,] -68303.9988 32600.9539 [16,] 39635.1880 -68303.9988 [17,] 62492.8743 39635.1880 [18,] -15961.7744 62492.8743 [19,] -2481.0050 -15961.7744 [20,] -4632.6571 -2481.0050 [21,] 146522.1963 -4632.6571 [22,] 17162.1842 146522.1963 [23,] -33783.5636 17162.1842 [24,] -75540.5029 -33783.5636 [25,] -34731.3311 -75540.5029 [26,] -46387.6616 -34731.3311 [27,] 29114.3179 -46387.6616 [28,] 7670.1948 29114.3179 [29,] -6503.4099 7670.1948 [30,] -32284.3867 -6503.4099 [31,] 11060.4783 -32284.3867 [32,] 27496.0929 11060.4783 [33,] -11855.8878 27496.0929 [34,] 44970.8341 -11855.8878 [35,] -7569.3208 44970.8341 [36,] 36139.6508 -7569.3208 [37,] 27146.3234 36139.6508 [38,] 14747.7403 27146.3234 [39,] -2089.0663 14747.7403 [40,] -21678.9475 -2089.0663 [41,] -8203.6729 -21678.9475 [42,] -30365.0088 -8203.6729 [43,] 19079.7156 -30365.0088 [44,] -124330.9379 19079.7156 [45,] 53140.8837 -124330.9379 [46,] -34055.9572 53140.8837 [47,] -30164.2049 -34055.9572 [48,] -43743.3647 -30164.2049 [49,] -70576.9703 -43743.3647 [50,] -32076.1572 -70576.9703 [51,] -18979.0843 -32076.1572 [52,] 17923.4772 -18979.0843 [53,] -3705.1843 17923.4772 [54,] -16227.4524 -3705.1843 [55,] -9359.1297 -16227.4524 [56,] 18334.6372 -9359.1297 [57,] -27895.5182 18334.6372 [58,] -4422.6249 -27895.5182 [59,] 33477.3032 -4422.6249 [60,] -23512.4844 33477.3032 [61,] -61623.7656 -23512.4844 [62,] -11036.4548 -61623.7656 [63,] 3223.5370 -11036.4548 [64,] 19227.8992 3223.5370 [65,] 31632.0929 19227.8992 [66,] -26890.7384 31632.0929 [67,] -44715.2177 -26890.7384 [68,] -10212.6049 -44715.2177 [69,] -23949.1688 -10212.6049 [70,] -2118.5278 -23949.1688 [71,] -17645.2156 -2118.5278 [72,] 16974.3512 -17645.2156 [73,] -11991.2775 16974.3512 [74,] -2588.6988 -11991.2775 [75,] 95268.0321 -2588.6988 [76,] 37249.3892 95268.0321 [77,] -59965.1213 37249.3892 [78,] 5033.6425 -59965.1213 [79,] 7923.1222 5033.6425 [80,] -8659.7414 7923.1222 [81,] 102709.7816 -8659.7414 [82,] -28160.9253 102709.7816 [83,] 32240.4099 -28160.9253 [84,] -30662.6921 32240.4099 [85,] 2305.4718 -30662.6921 [86,] -8358.9061 2305.4718 [87,] 30046.7603 -8358.9061 [88,] 17559.2362 30046.7603 [89,] -95309.0886 17559.2362 [90,] 41864.2597 -95309.0886 [91,] 46690.2289 41864.2597 [92,] 3151.7678 46690.2289 [93,] 11624.6961 3151.7678 [94,] 41501.1196 11624.6961 [95,] -9506.0833 41501.1196 [96,] 21051.3781 -9506.0833 [97,] -29022.7229 21051.3781 [98,] -13903.7119 -29022.7229 [99,] -20565.4384 -13903.7119 [100,] 6497.9775 -20565.4384 [101,] -14173.3949 6497.9775 [102,] -14000.2999 -14173.3949 [103,] -15237.2417 -14000.2999 [104,] 8962.1402 -15237.2417 [105,] -37106.5443 8962.1402 [106,] -24349.3732 -37106.5443 [107,] 6122.2521 -24349.3732 [108,] -64566.1669 6122.2521 [109,] -108098.7906 -64566.1669 [110,] 70284.3097 -108098.7906 [111,] 56160.3513 70284.3097 [112,] -256.5298 56160.3513 [113,] -46801.8861 -256.5298 [114,] 6512.7482 -46801.8861 [115,] 15595.0688 6512.7482 [116,] 23902.3080 15595.0688 [117,] -1324.7178 23902.3080 [118,] 5087.4911 -1324.7178 [119,] -10635.3599 5087.4911 [120,] -9849.1832 -10635.3599 [121,] 23907.3682 -9849.1832 [122,] 36894.2386 23907.3682 [123,] -21046.1292 36894.2386 [124,] -18405.8965 -21046.1292 [125,] 49110.5203 -18405.8965 [126,] 29119.0378 49110.5203 [127,] -8885.3584 29119.0378 [128,] 4708.4825 -8885.3584 [129,] -18485.3026 4708.4825 [130,] -441.8498 -18485.3026 [131,] -7410.5963 -441.8498 [132,] -26878.4310 -7410.5963 [133,] -9048.6163 -26878.4310 [134,] 16052.6047 -9048.6163 [135,] 19471.8739 16052.6047 [136,] -14676.4078 19471.8739 [137,] -31901.4782 -14676.4078 [138,] 34324.5530 -31901.4782 [139,] 12782.0704 34324.5530 [140,] 26397.3118 12782.0704 [141,] 8094.1535 26397.3118 [142,] -23815.8630 8094.1535 [143,] 40185.6855 -23815.8630 [144,] 24118.8736 40185.6855 [145,] -50277.5049 24118.8736 [146,] -38523.6530 -50277.5049 [147,] -8317.5178 -38523.6530 [148,] 5402.8951 -8317.5178 [149,] 446.5574 5402.8951 [150,] 5275.7846 446.5574 [151,] 5408.6741 5275.7846 [152,] 5401.8951 5408.6741 [153,] 5401.8951 5401.8951 [154,] 40540.9128 5401.8951 [155,] 40674.9729 40540.9128 [156,] 5401.8951 40674.9729 [157,] 4708.4531 5401.8951 [158,] -2070.8391 4708.4531 [159,] -7411.6480 -2070.8391 [160,] 6226.1798 -7411.6480 [161,] 25386.8840 6226.1798 [162,] 5922.6741 25386.8840 [163,] 51774.4355 5922.6741 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3684.5602 14333.5276 2 8402.0583 3684.5602 3 -78831.1351 8402.0583 4 12422.6315 -78831.1351 5 -18187.9904 12422.6315 6 -17536.5604 -18187.9904 7 2747.6792 -17536.5604 8 -11486.9413 2747.6792 9 44529.6007 -11486.9413 10 29787.9079 44529.6007 11 3310.9696 29787.9079 12 -791.0872 3310.9696 13 61660.9746 -791.0872 14 32600.9539 61660.9746 15 -68303.9988 32600.9539 16 39635.1880 -68303.9988 17 62492.8743 39635.1880 18 -15961.7744 62492.8743 19 -2481.0050 -15961.7744 20 -4632.6571 -2481.0050 21 146522.1963 -4632.6571 22 17162.1842 146522.1963 23 -33783.5636 17162.1842 24 -75540.5029 -33783.5636 25 -34731.3311 -75540.5029 26 -46387.6616 -34731.3311 27 29114.3179 -46387.6616 28 7670.1948 29114.3179 29 -6503.4099 7670.1948 30 -32284.3867 -6503.4099 31 11060.4783 -32284.3867 32 27496.0929 11060.4783 33 -11855.8878 27496.0929 34 44970.8341 -11855.8878 35 -7569.3208 44970.8341 36 36139.6508 -7569.3208 37 27146.3234 36139.6508 38 14747.7403 27146.3234 39 -2089.0663 14747.7403 40 -21678.9475 -2089.0663 41 -8203.6729 -21678.9475 42 -30365.0088 -8203.6729 43 19079.7156 -30365.0088 44 -124330.9379 19079.7156 45 53140.8837 -124330.9379 46 -34055.9572 53140.8837 47 -30164.2049 -34055.9572 48 -43743.3647 -30164.2049 49 -70576.9703 -43743.3647 50 -32076.1572 -70576.9703 51 -18979.0843 -32076.1572 52 17923.4772 -18979.0843 53 -3705.1843 17923.4772 54 -16227.4524 -3705.1843 55 -9359.1297 -16227.4524 56 18334.6372 -9359.1297 57 -27895.5182 18334.6372 58 -4422.6249 -27895.5182 59 33477.3032 -4422.6249 60 -23512.4844 33477.3032 61 -61623.7656 -23512.4844 62 -11036.4548 -61623.7656 63 3223.5370 -11036.4548 64 19227.8992 3223.5370 65 31632.0929 19227.8992 66 -26890.7384 31632.0929 67 -44715.2177 -26890.7384 68 -10212.6049 -44715.2177 69 -23949.1688 -10212.6049 70 -2118.5278 -23949.1688 71 -17645.2156 -2118.5278 72 16974.3512 -17645.2156 73 -11991.2775 16974.3512 74 -2588.6988 -11991.2775 75 95268.0321 -2588.6988 76 37249.3892 95268.0321 77 -59965.1213 37249.3892 78 5033.6425 -59965.1213 79 7923.1222 5033.6425 80 -8659.7414 7923.1222 81 102709.7816 -8659.7414 82 -28160.9253 102709.7816 83 32240.4099 -28160.9253 84 -30662.6921 32240.4099 85 2305.4718 -30662.6921 86 -8358.9061 2305.4718 87 30046.7603 -8358.9061 88 17559.2362 30046.7603 89 -95309.0886 17559.2362 90 41864.2597 -95309.0886 91 46690.2289 41864.2597 92 3151.7678 46690.2289 93 11624.6961 3151.7678 94 41501.1196 11624.6961 95 -9506.0833 41501.1196 96 21051.3781 -9506.0833 97 -29022.7229 21051.3781 98 -13903.7119 -29022.7229 99 -20565.4384 -13903.7119 100 6497.9775 -20565.4384 101 -14173.3949 6497.9775 102 -14000.2999 -14173.3949 103 -15237.2417 -14000.2999 104 8962.1402 -15237.2417 105 -37106.5443 8962.1402 106 -24349.3732 -37106.5443 107 6122.2521 -24349.3732 108 -64566.1669 6122.2521 109 -108098.7906 -64566.1669 110 70284.3097 -108098.7906 111 56160.3513 70284.3097 112 -256.5298 56160.3513 113 -46801.8861 -256.5298 114 6512.7482 -46801.8861 115 15595.0688 6512.7482 116 23902.3080 15595.0688 117 -1324.7178 23902.3080 118 5087.4911 -1324.7178 119 -10635.3599 5087.4911 120 -9849.1832 -10635.3599 121 23907.3682 -9849.1832 122 36894.2386 23907.3682 123 -21046.1292 36894.2386 124 -18405.8965 -21046.1292 125 49110.5203 -18405.8965 126 29119.0378 49110.5203 127 -8885.3584 29119.0378 128 4708.4825 -8885.3584 129 -18485.3026 4708.4825 130 -441.8498 -18485.3026 131 -7410.5963 -441.8498 132 -26878.4310 -7410.5963 133 -9048.6163 -26878.4310 134 16052.6047 -9048.6163 135 19471.8739 16052.6047 136 -14676.4078 19471.8739 137 -31901.4782 -14676.4078 138 34324.5530 -31901.4782 139 12782.0704 34324.5530 140 26397.3118 12782.0704 141 8094.1535 26397.3118 142 -23815.8630 8094.1535 143 40185.6855 -23815.8630 144 24118.8736 40185.6855 145 -50277.5049 24118.8736 146 -38523.6530 -50277.5049 147 -8317.5178 -38523.6530 148 5402.8951 -8317.5178 149 446.5574 5402.8951 150 5275.7846 446.5574 151 5408.6741 5275.7846 152 5401.8951 5408.6741 153 5401.8951 5401.8951 154 40540.9128 5401.8951 155 40674.9729 40540.9128 156 5401.8951 40674.9729 157 4708.4531 5401.8951 158 -2070.8391 4708.4531 159 -7411.6480 -2070.8391 160 6226.1798 -7411.6480 161 25386.8840 6226.1798 162 5922.6741 25386.8840 163 51774.4355 5922.6741 > 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/718tn1324632680.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/8ui6g1324632680.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/9zhsy1324632680.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/101ed61324632680.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/11yxp91324632680.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/124bpe1324632680.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/13hd6j1324632680.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/149ufa1324632680.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/1529yx1324632680.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/16r4dq1324632680.tab") + } > > try(system("convert tmp/1lhbb1324632680.ps tmp/1lhbb1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/2zjme1324632680.ps tmp/2zjme1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/34kkj1324632680.ps tmp/34kkj1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/4a6mg1324632680.ps tmp/4a6mg1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/595ns1324632680.ps tmp/595ns1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/61wnw1324632680.ps tmp/61wnw1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/718tn1324632680.ps tmp/718tn1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/8ui6g1324632680.ps tmp/8ui6g1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/9zhsy1324632680.ps tmp/9zhsy1324632680.png",intern=TRUE)) character(0) > try(system("convert tmp/101ed61324632680.ps tmp/101ed61324632680.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.936 0.628 5.807