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(1683 + ,150596 + ,84 + ,535 + ,109 + ,0 + ,37 + ,18 + ,1323 + ,154801 + ,50 + ,396 + ,73 + ,1 + ,42 + ,20 + ,192 + ,7215 + ,18 + ,72 + ,1 + ,0 + ,0 + ,0 + ,2172 + ,122139 + ,91 + ,617 + ,154 + ,0 + ,49 + ,26 + ,3335 + ,221399 + ,129 + ,1118 + ,124 + ,0 + ,76 + ,30 + ,6310 + ,441870 + ,237 + ,1755 + ,276 + ,1 + ,118 + ,34 + ,1478 + ,134379 + ,52 + ,498 + ,89 + ,1 + ,42 + ,23 + ,1324 + ,140428 + ,53 + ,355 + ,54 + ,0 + ,57 + ,30 + ,1488 + ,103255 + ,40 + ,413 + ,87 + ,0 + ,45 + ,30 + ,2756 + ,271630 + ,91 + ,891 + ,129 + ,1 + ,67 + ,26 + ,1931 + ,121593 + ,71 + ,629 + ,158 + ,2 + ,50 + ,24 + ,1966 + ,172071 + ,63 + ,611 + ,113 + ,0 + ,71 + ,30 + ,1575 + ,83707 + ,94 + ,564 + ,75 + ,0 + ,41 + ,19 + ,2855 + ,197412 + ,98 + ,964 + ,255 + ,4 + ,66 + ,25 + ,1263 + ,134398 + ,48 + ,362 + ,50 + ,4 + ,42 + ,17 + ,1479 + ,139224 + ,73 + ,442 + ,81 + ,3 + ,54 + ,19 + ,1636 + ,134153 + ,52 + ,391 + ,92 + ,0 + ,75 + ,33 + ,1076 + ,64149 + ,52 + ,305 + ,72 + ,5 + ,0 + ,15 + ,2376 + ,122294 + ,82 + ,721 + ,142 + ,0 + ,54 + ,34 + ,678 + ,24889 + ,22 + ,206 + ,47 + ,0 + ,13 + ,15 + ,902 + ,52197 + ,52 + ,310 + ,40 + ,0 + ,16 + ,15 + ,2308 + ,188915 + ,89 + ,686 + ,94 + ,0 + ,77 + ,27 + ,1590 + ,163147 + ,66 + ,572 + ,127 + ,0 + ,34 + ,25 + ,1863 + ,98575 + ,48 + ,558 + ,164 + ,1 + ,38 + ,34 + ,1799 + ,143546 + ,80 + ,569 + ,41 + ,1 + ,50 + ,21 + ,1385 + ,139780 + ,25 + ,513 + ,160 + ,0 + ,39 + ,21 + ,1870 + ,163784 + ,146 + ,602 + ,90 + ,0 + ,54 + ,25 + ,1161 + ,152479 + ,75 + ,276 + ,55 + ,0 + ,67 + ,28 + ,2417 + ,304108 + ,109 + ,791 + ,78 + ,0 + ,55 + ,26 + ,1952 + ,184024 + ,40 + ,815 + ,90 + ,0 + ,52 + ,20 + ,1514 + ,151621 + ,41 + ,427 + ,76 + ,0 + ,50 + ,28 + ,1487 + ,164516 + ,41 + ,496 + ,111 + ,2 + ,54 + ,20 + ,2051 + ,120179 + ,94 + ,653 + ,87 + ,4 + ,53 + ,17 + ,2843 + ,214701 + ,116 + ,857 + ,302 + ,0 + ,76 + ,25 + ,2216 + ,196865 + ,48 + ,736 + ,84 + ,1 + ,52 + ,24 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1830 + ,181527 + ,57 + ,862 + ,58 + ,0 + ,46 + ,27 + ,1563 + ,93107 + ,49 + ,483 + ,137 + ,3 + ,44 + ,14 + ,2046 + ,129352 + ,45 + ,495 + ,267 + ,9 + ,35 + ,32 + ,2005 + ,229143 + ,58 + ,749 + ,56 + ,0 + ,82 + ,31 + ,1934 + ,177063 + ,67 + ,627 + ,94 + ,2 + ,70 + ,21 + ,1572 + ,126602 + ,53 + ,597 + ,62 + ,0 + ,31 + ,34 + ,950 + ,93742 + ,29 + ,348 + ,35 + ,2 + ,25 + ,23 + ,1877 + ,152153 + ,72 + ,711 + ,59 + ,1 + ,48 + ,24 + ,1036 + ,95704 + ,42 + ,322 + ,46 + ,2 + ,44 + ,22 + ,1097 + ,139793 + ,84 + ,280 + ,40 + ,2 + ,40 + ,22 + ,730 + ,76348 + ,30 + ,205 + ,49 + ,1 + ,23 + ,35 + ,1918 + ,188980 + ,86 + ,648 + ,114 + ,0 + ,63 + ,21 + ,1826 + ,172100 + ,79 + ,580 + ,113 + ,1 + ,43 + ,31 + ,2444 + ,146552 + ,54 + ,875 + ,171 + ,7 + ,62 + ,26 + ,658 + ,48188 + ,28 + ,205 + ,37 + ,0 + ,12 + ,22 + ,1425 + ,109185 + ,60 + ,363 + ,51 + ,0 + ,63 + ,21 + ,2246 + ,263652 + ,68 + ,757 + ,89 + ,0 + ,60 + ,27 + ,1899 + ,215609 + ,75 + ,647 + ,67 + ,0 + ,53 + ,26 + ,1630 + ,174876 + ,54 + ,584 + ,49 + ,1 + ,53 + ,33 + ,1496 + ,115124 + ,49 + ,457 + ,74 + ,6 + ,35 + ,11 + ,1681 + ,179712 + ,60 + ,438 + ,58 + ,0 + ,49 + ,26 + ,816 + ,70369 + ,20 + ,235 + ,72 + ,0 + ,25 + ,26 + ,902 + ,109215 + ,58 + ,312 + ,30 + ,0 + ,47 + ,21 + ,2606 + ,166096 + ,85 + ,877 + ,59 + ,10 + ,30 + ,38 + ,1557 + ,130414 + ,51 + ,454 + ,65 + ,6 + ,50 + ,29 + ,1780 + ,102057 + ,71 + ,668 + ,81 + ,0 + ,36 + ,19 + ,1265 + ,115310 + ,56 + ,346 + ,84 + ,11 + ,43 + ,19 + ,1117 + ,101181 + ,32 + ,377 + ,46 + ,3 + ,44 + ,24 + ,1069 + ,135228 + ,31 + ,365 + ,56 + ,0 + ,14 + ,26 + ,1229 + ,94982 + ,37 + ,391 + ,36 + ,0 + ,38 + ,29 + ,2155 + ,166919 + ,67 + ,476 + ,84 + ,8 + ,58 + ,34 + ,2500 + ,118169 + ,64 + ,747 + ,152 + ,2 + ,68 + ,25 + ,1003 + ,102361 + ,36 + ,246 + ,48 + ,0 + ,48 + ,24 + ,340 + ,31970 + ,15 + ,101 + ,40 + ,0 + ,5 + ,21 + ,2586 + ,200413 + ,107 + ,901 + ,135 + ,3 + ,53 + ,19 + ,1119 + ,103381 + ,58 + ,334 + ,80 + ,1 + ,36 + ,12 + ,1251 + ,94940 + ,61 + ,404 + ,60 + ,2 + ,62 + ,28 + ,1516 + ,101560 + ,65 + ,442 + ,89 + ,1 + ,46 + ,21 + ,2473 + ,144176 + ,60 + ,627 + ,89 + ,0 + ,67 + ,34 + ,1288 + ,71921 + ,37 + ,345 + ,79 + ,2 + ,2 + ,32 + ,1911 + ,126905 + ,54 + ,538 + ,111 + ,1 + ,64 + ,27 + ,2279 + ,131184 + ,87 + ,741 + ,67 + ,0 + ,59 + ,26 + ,816 + ,60138 + ,23 + ,253 + ,76 + ,0 + ,16 + ,21 + ,1234 + ,84971 + ,71 + ,395 + ,105 + ,0 + ,34 + ,31 + ,907 + ,80420 + ,64 + ,211 + ,49 + ,0 + ,54 + ,26 + ,1827 + ,233569 + ,57 + ,670 + ,57 + ,0 + ,39 + ,26 + ,841 + ,56252 + ,25 + ,244 + ,49 + ,0 + ,26 + ,23 + ,1309 + ,97181 + ,32 + ,438 + ,132 + ,0 + ,37 + ,25 + ,764 + ,50800 + ,41 + ,255 + ,49 + ,0 + ,17 + ,22 + ,1439 + ,125941 + ,45 + ,434 + ,71 + ,0 + ,32 + ,26 + ,2500 + ,211032 + ,210 + ,613 + ,100 + ,0 + ,55 + ,33 + ,974 + ,71960 + ,92 + ,233 + ,71 + ,0 + ,39 + ,22 + ,1152 + ,90379 + ,53 + ,360 + ,49 + ,6 + ,39 + ,24 + ,1261 + ,125650 + ,47 + ,486 + ,72 + ,0 + ,28 + ,21 + ,1508 + ,115572 + ,36 + ,535 + ,59 + ,5 + ,45 + ,28 + ,2005 + ,136266 + ,67 + ,585 + ,86 + ,1 + ,66 + ,22 + ,1191 + ,146715 + ,55 + ,402 + ,65 + ,0 + ,39 + ,22 + ,1265 + ,124626 + ,57 + ,466 + ,81 + ,0 + ,27 + ,15 + ,761 + ,49176 + ,33 + ,291 + ,30 + ,0 + ,22 + ,13 + ,2156 + ,212926 + ,102 + ,691 + ,166 + ,0 + ,43 + ,36 + ,1689 + ,173884 + ,55 + ,515 + ,89 + ,0 + ,88 + ,24 + ,223 + ,19349 + ,12 + ,67 + ,15 + ,0 + ,13 + ,1 + ,2074 + ,181141 + ,95 + ,712 + ,104 + ,3 + ,23 + ,24 + ,1879 + ,145502 + ,70 + ,770 + ,61 + ,0 + ,40 + ,31 + ,566 + ,45448 + ,26 + ,247 + ,11 + ,0 + ,8 + ,4 + ,802 + ,58280 + ,20 + ,240 + ,44 + ,0 + ,41 + ,20 + ,1131 + ,115944 + ,44 + ,360 + ,84 + ,0 + ,51 + ,23 + ,981 + ,94341 + ,52 + ,249 + ,66 + ,1 + ,24 + ,23 + ,591 + ,59090 + ,37 + ,138 + ,27 + ,0 + ,23 + ,12 + ,596 + ,27676 + ,22 + ,194 + ,59 + ,0 + ,2 + ,16 + ,1261 + ,120586 + ,41 + ,285 + ,126 + ,0 + ,78 + ,28 + ,861 + ,88011 + ,31 + ,227 + ,32 + ,0 + ,12 + ,10 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1030 + ,85610 + ,31 + ,306 + ,58 + ,0 + ,46 + ,25 + ,991 + ,84193 + ,58 + ,328 + ,52 + ,0 + ,22 + ,21 + ,1178 + ,117769 + ,39 + ,397 + ,49 + ,0 + ,49 + ,21 + ,1200 + ,107653 + ,56 + ,369 + ,64 + ,0 + ,52 + ,21 + ,849 + ,71894 + ,57 + ,287 + ,71 + ,0 + ,36 + ,21 + ,78 + ,3616 + ,5 + ,14 + ,5 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,924 + ,154806 + ,38 + ,301 + ,70 + ,0 + ,35 + ,23 + ,1480 + ,136061 + ,73 + ,535 + ,72 + ,0 + ,68 + ,29 + ,1870 + ,141822 + ,89 + ,530 + ,118 + ,1 + ,26 + ,27 + ,861 + ,106515 + ,37 + ,272 + ,56 + ,0 + ,32 + ,23 + ,778 + ,43410 + ,19 + ,292 + ,63 + ,0 + ,7 + ,1 + ,1533 + ,146920 + ,64 + ,458 + ,88 + ,1 + ,67 + ,25 + ,889 + ,88874 + ,38 + ,241 + ,46 + ,0 + ,30 + ,17 + ,1705 + ,111924 + ,49 + ,497 + ,60 + ,8 + ,55 + ,29 + ,700 + ,60373 + ,39 + ,165 + ,29 + ,3 + ,3 + ,12 + ,285 + ,19764 + ,12 + ,75 + ,19 + ,1 + ,10 + ,2 + ,1490 + ,121665 + ,46 + ,461 + ,58 + ,2 + ,46 + ,18 + ,981 + ,108685 + ,26 + ,341 + ,66 + ,0 + ,23 + ,25 + ,1368 + ,124493 + ,37 + ,446 + ,97 + ,0 + ,43 + ,29 + ,256 + ,11796 + ,9 + ,79 + ,22 + ,0 + ,1 + ,2 + ,98 + ,10674 + ,9 + ,33 + ,7 + ,0 + ,0 + ,0 + ,1317 + ,131263 + ,52 + ,449 + ,37 + ,0 + ,33 + ,18 + ,41 + ,6836 + ,3 + ,11 + ,5 + ,0 + ,0 + ,1 + ,1768 + ,153278 + ,55 + ,606 + ,48 + ,5 + ,48 + ,21 + ,42 + ,5118 + ,3 + ,6 + ,1 + ,0 + ,5 + ,0 + ,528 + ,40248 + ,16 + ,183 + ,34 + ,1 + ,8 + ,4 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,938 + ,100728 + ,42 + ,310 + ,49 + ,0 + ,25 + ,25 + ,1245 + ,84267 + ,36 + ,245 + ,44 + ,0 + ,21 + ,26 + ,81 + ,7131 + ,4 + ,27 + ,0 + ,1 + ,0 + ,0 + ,257 + ,8812 + ,13 + ,97 + ,18 + ,0 + ,0 + ,4 + ,891 + ,63952 + ,22 + ,247 + ,48 + ,1 + ,15 + ,17 + ,1114 + ,120111 + ,47 + ,273 + ,54 + ,0 + ,47 + ,21 + ,1079 + ,94127 + ,18 + ,386 + ,50 + ,1 + ,17 + ,22) + ,dim=c(8 + ,144) + ,dimnames=list(c('pageviews' + ,'timeRFC' + ,'logins' + ,'CCV' + ,'CV' + ,'Cauthors' + ,'bloggedC' + ,'reviewedC') + ,1:144)) > y <- array(NA,dim=c(8,144),dimnames=list(c('pageviews','timeRFC','logins','CCV','CV','Cauthors','bloggedC','reviewedC'),1:144)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x timeRFC pageviews logins CCV CV Cauthors bloggedC reviewedC 1 150596 1683 84 535 109 0 37 18 2 154801 1323 50 396 73 1 42 20 3 7215 192 18 72 1 0 0 0 4 122139 2172 91 617 154 0 49 26 5 221399 3335 129 1118 124 0 76 30 6 441870 6310 237 1755 276 1 118 34 7 134379 1478 52 498 89 1 42 23 8 140428 1324 53 355 54 0 57 30 9 103255 1488 40 413 87 0 45 30 10 271630 2756 91 891 129 1 67 26 11 121593 1931 71 629 158 2 50 24 12 172071 1966 63 611 113 0 71 30 13 83707 1575 94 564 75 0 41 19 14 197412 2855 98 964 255 4 66 25 15 134398 1263 48 362 50 4 42 17 16 139224 1479 73 442 81 3 54 19 17 134153 1636 52 391 92 0 75 33 18 64149 1076 52 305 72 5 0 15 19 122294 2376 82 721 142 0 54 34 20 24889 678 22 206 47 0 13 15 21 52197 902 52 310 40 0 16 15 22 188915 2308 89 686 94 0 77 27 23 163147 1590 66 572 127 0 34 25 24 98575 1863 48 558 164 1 38 34 25 143546 1799 80 569 41 1 50 21 26 139780 1385 25 513 160 0 39 21 27 163784 1870 146 602 90 0 54 25 28 152479 1161 75 276 55 0 67 28 29 304108 2417 109 791 78 0 55 26 30 184024 1952 40 815 90 0 52 20 31 151621 1514 41 427 76 0 50 28 32 164516 1487 41 496 111 2 54 20 33 120179 2051 94 653 87 4 53 17 34 214701 2843 116 857 302 0 76 25 35 196865 2216 48 736 84 1 52 24 36 0 1 1 0 0 0 0 0 37 181527 1830 57 862 58 0 46 27 38 93107 1563 49 483 137 3 44 14 39 129352 2046 45 495 267 9 35 32 40 229143 2005 58 749 56 0 82 31 41 177063 1934 67 627 94 2 70 21 42 126602 1572 53 597 62 0 31 34 43 93742 950 29 348 35 2 25 23 44 152153 1877 72 711 59 1 48 24 45 95704 1036 42 322 46 2 44 22 46 139793 1097 84 280 40 2 40 22 47 76348 730 30 205 49 1 23 35 48 188980 1918 86 648 114 0 63 21 49 172100 1826 79 580 113 1 43 31 50 146552 2444 54 875 171 7 62 26 51 48188 658 28 205 37 0 12 22 52 109185 1425 60 363 51 0 63 21 53 263652 2246 68 757 89 0 60 27 54 215609 1899 75 647 67 0 53 26 55 174876 1630 54 584 49 1 53 33 56 115124 1496 49 457 74 6 35 11 57 179712 1681 60 438 58 0 49 26 58 70369 816 20 235 72 0 25 26 59 109215 902 58 312 30 0 47 21 60 166096 2606 85 877 59 10 30 38 61 130414 1557 51 454 65 6 50 29 62 102057 1780 71 668 81 0 36 19 63 115310 1265 56 346 84 11 43 19 64 101181 1117 32 377 46 3 44 24 65 135228 1069 31 365 56 0 14 26 66 94982 1229 37 391 36 0 38 29 67 166919 2155 67 476 84 8 58 34 68 118169 2500 64 747 152 2 68 25 69 102361 1003 36 246 48 0 48 24 70 31970 340 15 101 40 0 5 21 71 200413 2586 107 901 135 3 53 19 72 103381 1119 58 334 80 1 36 12 73 94940 1251 61 404 60 2 62 28 74 101560 1516 65 442 89 1 46 21 75 144176 2473 60 627 89 0 67 34 76 71921 1288 37 345 79 2 2 32 77 126905 1911 54 538 111 1 64 27 78 131184 2279 87 741 67 0 59 26 79 60138 816 23 253 76 0 16 21 80 84971 1234 71 395 105 0 34 31 81 80420 907 64 211 49 0 54 26 82 233569 1827 57 670 57 0 39 26 83 56252 841 25 244 49 0 26 23 84 97181 1309 32 438 132 0 37 25 85 50800 764 41 255 49 0 17 22 86 125941 1439 45 434 71 0 32 26 87 211032 2500 210 613 100 0 55 33 88 71960 974 92 233 71 0 39 22 89 90379 1152 53 360 49 6 39 24 90 125650 1261 47 486 72 0 28 21 91 115572 1508 36 535 59 5 45 28 92 136266 2005 67 585 86 1 66 22 93 146715 1191 55 402 65 0 39 22 94 124626 1265 57 466 81 0 27 15 95 49176 761 33 291 30 0 22 13 96 212926 2156 102 691 166 0 43 36 97 173884 1689 55 515 89 0 88 24 98 19349 223 12 67 15 0 13 1 99 181141 2074 95 712 104 3 23 24 100 145502 1879 70 770 61 0 40 31 101 45448 566 26 247 11 0 8 4 102 58280 802 20 240 44 0 41 20 103 115944 1131 44 360 84 0 51 23 104 94341 981 52 249 66 1 24 23 105 59090 591 37 138 27 0 23 12 106 27676 596 22 194 59 0 2 16 107 120586 1261 41 285 126 0 78 28 108 88011 861 31 227 32 0 12 10 109 0 0 0 0 0 0 0 0 110 85610 1030 31 306 58 0 46 25 111 84193 991 58 328 52 0 22 21 112 117769 1178 39 397 49 0 49 21 113 107653 1200 56 369 64 0 52 21 114 71894 849 57 287 71 0 36 21 115 3616 78 5 14 5 0 0 0 116 0 0 0 0 0 0 0 0 117 154806 924 38 301 70 0 35 23 118 136061 1480 73 535 72 0 68 29 119 141822 1870 89 530 118 1 26 27 120 106515 861 37 272 56 0 32 23 121 43410 778 19 292 63 0 7 1 122 146920 1533 64 458 88 1 67 25 123 88874 889 38 241 46 0 30 17 124 111924 1705 49 497 60 8 55 29 125 60373 700 39 165 29 3 3 12 126 19764 285 12 75 19 1 10 2 127 121665 1490 46 461 58 2 46 18 128 108685 981 26 341 66 0 23 25 129 124493 1368 37 446 97 0 43 29 130 11796 256 9 79 22 0 1 2 131 10674 98 9 33 7 0 0 0 132 131263 1317 52 449 37 0 33 18 133 6836 41 3 11 5 0 0 1 134 153278 1768 55 606 48 5 48 21 135 5118 42 3 6 1 0 5 0 136 40248 528 16 183 34 1 8 4 137 0 0 0 0 0 0 0 0 138 100728 938 42 310 49 0 25 25 139 84267 1245 36 245 44 0 21 26 140 7131 81 4 27 0 1 0 0 141 8812 257 13 97 18 0 0 4 142 63952 891 22 247 48 1 15 17 143 120111 1114 47 273 54 0 47 21 144 94127 1079 18 386 50 1 17 22 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) pageviews logins CCV CV Cauthors 2405.20 21.48 205.04 108.68 -134.76 -1648.99 bloggedC reviewedC 609.77 676.24 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -66843 -17467 -820 12644 100851 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2405.20 5957.34 0.404 0.687040 pageviews 21.48 15.31 1.404 0.162713 logins 205.04 128.94 1.590 0.114106 CCV 108.68 35.61 3.052 0.002731 ** CV -134.76 70.99 -1.898 0.059765 . Cauthors -1648.99 1146.27 -1.439 0.152568 bloggedC 609.77 175.03 3.484 0.000665 *** reviewedC 676.24 349.41 1.935 0.055019 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27460 on 136 degrees of freedom Multiple R-squared: 0.8372, Adjusted R-squared: 0.8288 F-statistic: 99.9 on 7 and 136 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.9514248 9.715035e-02 4.857517e-02 [2,] 0.9399056 1.201889e-01 6.009445e-02 [3,] 0.9346796 1.306408e-01 6.532039e-02 [4,] 0.9013656 1.972687e-01 9.863436e-02 [5,] 0.8723525 2.552951e-01 1.276475e-01 [6,] 0.8150040 3.699920e-01 1.849960e-01 [7,] 0.8200412 3.599177e-01 1.799588e-01 [8,] 0.7522193 4.955614e-01 2.477807e-01 [9,] 0.7846373 4.307254e-01 2.153627e-01 [10,] 0.7604133 4.791735e-01 2.395867e-01 [11,] 0.7018331 5.963338e-01 2.981669e-01 [12,] 0.6494167 7.011666e-01 3.505833e-01 [13,] 0.8958647 2.082706e-01 1.041353e-01 [14,] 0.8788213 2.423575e-01 1.211787e-01 [15,] 0.8467024 3.065952e-01 1.532976e-01 [16,] 0.8306519 3.386961e-01 1.693481e-01 [17,] 0.8569072 2.861855e-01 1.430928e-01 [18,] 0.8511048 2.977905e-01 1.488952e-01 [19,] 0.9986352 2.729678e-03 1.364839e-03 [20,] 0.9978862 4.227648e-03 2.113824e-03 [21,] 0.9974425 5.115057e-03 2.557529e-03 [22,] 0.9973711 5.257890e-03 2.628945e-03 [23,] 0.9990930 1.814073e-03 9.070364e-04 [24,] 0.9986555 2.688916e-03 1.344458e-03 [25,] 0.9981792 3.641634e-03 1.820817e-03 [26,] 0.9972619 5.476287e-03 2.738143e-03 [27,] 0.9958324 8.335277e-03 4.167639e-03 [28,] 0.9953827 9.234689e-03 4.617344e-03 [29,] 0.9952604 9.479150e-03 4.739575e-03 [30,] 0.9942313 1.153736e-02 5.768678e-03 [31,] 0.9920960 1.580798e-02 7.903989e-03 [32,] 0.9894857 2.102868e-02 1.051434e-02 [33,] 0.9851580 2.968398e-02 1.484199e-02 [34,] 0.9819576 3.608484e-02 1.804242e-02 [35,] 0.9758978 4.820431e-02 2.410216e-02 [36,] 0.9803178 3.936439e-02 1.968220e-02 [37,] 0.9735980 5.280410e-02 2.640205e-02 [38,] 0.9689757 6.204851e-02 3.102425e-02 [39,] 0.9666580 6.668396e-02 3.334198e-02 [40,] 0.9759731 4.805383e-02 2.402691e-02 [41,] 0.9692678 6.146441e-02 3.073221e-02 [42,] 0.9683387 6.332263e-02 3.166131e-02 [43,] 0.9956176 8.764847e-03 4.382423e-03 [44,] 0.9979742 4.051671e-03 2.025836e-03 [45,] 0.9974966 5.006747e-03 2.503374e-03 [46,] 0.9965464 6.907151e-03 3.453576e-03 [47,] 0.9981799 3.640156e-03 1.820078e-03 [48,] 0.9973213 5.357500e-03 2.678750e-03 [49,] 0.9961611 7.677849e-03 3.838924e-03 [50,] 0.9957575 8.485034e-03 4.242517e-03 [51,] 0.9939232 1.215370e-02 6.076848e-03 [52,] 0.9969276 6.144861e-03 3.072431e-03 [53,] 0.9964426 7.114703e-03 3.557352e-03 [54,] 0.9950521 9.895829e-03 4.947914e-03 [55,] 0.9975405 4.918986e-03 2.459493e-03 [56,] 0.9971548 5.690386e-03 2.845193e-03 [57,] 0.9974070 5.185911e-03 2.592955e-03 [58,] 0.9996944 6.112170e-04 3.056085e-04 [59,] 0.9995744 8.512945e-04 4.256473e-04 [60,] 0.9993414 1.317245e-03 6.586227e-04 [61,] 0.9990196 1.960790e-03 9.803951e-04 [62,] 0.9985795 2.840982e-03 1.420491e-03 [63,] 0.9988719 2.256175e-03 1.128088e-03 [64,] 0.9987553 2.489396e-03 1.244698e-03 [65,] 0.9992612 1.477590e-03 7.387952e-04 [66,] 0.9990626 1.874831e-03 9.374156e-04 [67,] 0.9991744 1.651256e-03 8.256281e-04 [68,] 0.9999661 6.784085e-05 3.392042e-05 [69,] 0.9999452 1.095183e-04 5.475915e-05 [70,] 0.9999540 9.198320e-05 4.599160e-05 [71,] 0.9999337 1.325722e-04 6.628609e-05 [72,] 0.9999991 1.734833e-06 8.674164e-07 [73,] 0.9999990 1.947409e-06 9.737043e-07 [74,] 0.9999991 1.747614e-06 8.738071e-07 [75,] 0.9999992 1.605238e-06 8.026190e-07 [76,] 0.9999985 3.085155e-06 1.542577e-06 [77,] 0.9999971 5.800474e-06 2.900237e-06 [78,] 0.9999984 3.195659e-06 1.597830e-06 [79,] 0.9999971 5.865721e-06 2.932861e-06 [80,] 0.9999950 9.956192e-06 4.978096e-06 [81,] 0.9999912 1.763248e-05 8.816240e-06 [82,] 0.9999954 9.287775e-06 4.643887e-06 [83,] 0.9999977 4.521094e-06 2.260547e-06 [84,] 0.9999962 7.537531e-06 3.768766e-06 [85,] 0.9999963 7.499748e-06 3.749874e-06 [86,] 0.9999962 7.628583e-06 3.814292e-06 [87,] 0.9999938 1.236275e-05 6.181374e-06 [88,] 0.9999878 2.446268e-05 1.223134e-05 [89,] 0.9999872 2.563158e-05 1.281579e-05 [90,] 0.9999917 1.665756e-05 8.328780e-06 [91,] 0.9999842 3.151751e-05 1.575876e-05 [92,] 0.9999881 2.383284e-05 1.191642e-05 [93,] 0.9999765 4.692612e-05 2.346306e-05 [94,] 0.9999591 8.175632e-05 4.087816e-05 [95,] 0.9999200 1.600993e-04 8.004964e-05 [96,] 0.9999321 1.357225e-04 6.786125e-05 [97,] 0.9998671 2.657916e-04 1.328958e-04 [98,] 0.9998748 2.504786e-04 1.252393e-04 [99,] 0.9997569 4.862769e-04 2.431384e-04 [100,] 0.9997702 4.595903e-04 2.297952e-04 [101,] 0.9996455 7.089719e-04 3.544859e-04 [102,] 0.9993214 1.357202e-03 6.786010e-04 [103,] 0.9989123 2.175341e-03 1.087670e-03 [104,] 0.9993560 1.288024e-03 6.440119e-04 [105,] 0.9987644 2.471144e-03 1.235572e-03 [106,] 0.9977005 4.599043e-03 2.299522e-03 [107,] 0.9999890 2.194086e-05 1.097043e-05 [108,] 0.9999999 1.029258e-07 5.146291e-08 [109,] 0.9999999 2.523331e-07 1.261666e-07 [110,] 0.9999997 6.826780e-07 3.413390e-07 [111,] 0.9999989 2.128855e-06 1.064428e-06 [112,] 0.9999970 5.937814e-06 2.968907e-06 [113,] 0.9999894 2.129251e-05 1.064625e-05 [114,] 0.9999969 6.124252e-06 3.062126e-06 [115,] 0.9999960 8.004197e-06 4.002099e-06 [116,] 0.9999822 3.551792e-05 1.775896e-05 [117,] 0.9999534 9.311917e-05 4.655958e-05 [118,] 0.9999728 5.446236e-05 2.723118e-05 [119,] 0.9999547 9.065089e-05 4.532544e-05 [120,] 0.9997682 4.636273e-04 2.318137e-04 [121,] 0.9990508 1.898464e-03 9.492322e-04 [122,] 0.9972503 5.499434e-03 2.749717e-03 [123,] 0.9873971 2.520577e-02 1.260288e-02 > postscript(file="/var/www/rcomp/tmp/1gko71324297793.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/2ajwr1324297793.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/37yge1324297793.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/44sik1324297793.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/5xczg1324297793.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 = 144 Frequency = 1 1 2 3 4 5 6 16620.0196 43033.8161 -10696.2597 -39352.5931 -50531.8386 8467.2578 7 8 9 10 11 12 7913.4494 12361.9638 -20208.1727 55116.6224 -27344.7954 -246.8550 13 14 15 16 17 18 -60848.2298 -7384.5380 31901.3323 12125.1074 -12207.0316 2621.0353 19 20 21 22 23 24 -63113.9268 -30718.5656 -28449.8732 -8422.9240 30359.7120 -36754.9735 25 26 27 28 29 30 -13267.6701 30319.0677 -11863.8554 27379.5492 100850.6226 9799.5385 31 32 33 34 35 36 22693.8896 39655.1525 -42026.9030 11741.0004 22050.1778 -2631.7229 37 38 39 40 41 42 -4057.7641 -18306.1184 27806.9727 26948.8991 10306.8922 -18866.5312 43 44 45 46 47 48 4376.1891 -18512.7540 -4776.0490 35586.0681 387.7972 20055.1266 49 50 51 52 53 54 20924.6480 -35330.3817 -13582.9496 -21332.3791 73927.4863 45839.1158 55 56 57 58 59 60 16527.7409 11949.6560 41642.4089 -2331.8043 2812.7115 -24588.9187 61 62 63 64 65 66 3313.5410 -49632.2282 27031.5930 -4669.9537 45258.6959 -21839.0383 67 68 69 70 71 72 18898.9150 -66842.9843 5260.1856 -3651.6152 561.2596 11106.3880 73 74 75 76 77 78 -36113.4304 -23387.6822 -43657.9319 -12152.4187 -26775.3864 -63085.0143 79 80 81 82 83 84 -5726.1190 -28978.3704 -21431.8557 73725.9996 -20669.8302 -9189.8531 85 86 87 88 89 90 -22779.6315 8698.6625 2859.5217 -24647.2013 -10281.9703 12125.0297 91 92 93 94 95 96 -14936.1357 -28414.9208 33856.0653 17018.4347 -26134.7058 39993.4248 97 98 99 100 101 102 10048.1865 -4171.1270 26024.8627 -32444.0207 -7393.6548 -24135.6496 103 104 105 106 107 108 5761.2953 13491.4824 2902.2627 -17217.3670 2192.0354 26313.7577 109 110 111 112 113 114 -2405.2002 -15675.8375 -7651.3311 1435.7791 -9403.2256 -18214.8394 115 116 117 118 119 120 -2337.8790 -2405.2002 64582.6010 -22625.9753 6830.0134 20944.5875 121 122 123 124 125 126 -7795.5847 4428.3715 9795.5701 -23044.0327 15910.8372 -2616.4737 127 128 129 130 131 132 -1393.2966 20775.8157 3879.7440 -5537.8766 1674.8092 13794.3070 133 134 135 136 137 138 1736.9038 6993.7861 -2370.8026 1977.4417 -2405.2002 10320.7145 139 140 141 142 143 144 -3351.9201 879.9885 -12601.5942 -1475.8577 18882.6528 6042.0536 > postscript(file="/var/www/rcomp/tmp/6d2ab1324297793.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 = 144 Frequency = 1 lag(myerror, k = 1) myerror 0 16620.0196 NA 1 43033.8161 16620.0196 2 -10696.2597 43033.8161 3 -39352.5931 -10696.2597 4 -50531.8386 -39352.5931 5 8467.2578 -50531.8386 6 7913.4494 8467.2578 7 12361.9638 7913.4494 8 -20208.1727 12361.9638 9 55116.6224 -20208.1727 10 -27344.7954 55116.6224 11 -246.8550 -27344.7954 12 -60848.2298 -246.8550 13 -7384.5380 -60848.2298 14 31901.3323 -7384.5380 15 12125.1074 31901.3323 16 -12207.0316 12125.1074 17 2621.0353 -12207.0316 18 -63113.9268 2621.0353 19 -30718.5656 -63113.9268 20 -28449.8732 -30718.5656 21 -8422.9240 -28449.8732 22 30359.7120 -8422.9240 23 -36754.9735 30359.7120 24 -13267.6701 -36754.9735 25 30319.0677 -13267.6701 26 -11863.8554 30319.0677 27 27379.5492 -11863.8554 28 100850.6226 27379.5492 29 9799.5385 100850.6226 30 22693.8896 9799.5385 31 39655.1525 22693.8896 32 -42026.9030 39655.1525 33 11741.0004 -42026.9030 34 22050.1778 11741.0004 35 -2631.7229 22050.1778 36 -4057.7641 -2631.7229 37 -18306.1184 -4057.7641 38 27806.9727 -18306.1184 39 26948.8991 27806.9727 40 10306.8922 26948.8991 41 -18866.5312 10306.8922 42 4376.1891 -18866.5312 43 -18512.7540 4376.1891 44 -4776.0490 -18512.7540 45 35586.0681 -4776.0490 46 387.7972 35586.0681 47 20055.1266 387.7972 48 20924.6480 20055.1266 49 -35330.3817 20924.6480 50 -13582.9496 -35330.3817 51 -21332.3791 -13582.9496 52 73927.4863 -21332.3791 53 45839.1158 73927.4863 54 16527.7409 45839.1158 55 11949.6560 16527.7409 56 41642.4089 11949.6560 57 -2331.8043 41642.4089 58 2812.7115 -2331.8043 59 -24588.9187 2812.7115 60 3313.5410 -24588.9187 61 -49632.2282 3313.5410 62 27031.5930 -49632.2282 63 -4669.9537 27031.5930 64 45258.6959 -4669.9537 65 -21839.0383 45258.6959 66 18898.9150 -21839.0383 67 -66842.9843 18898.9150 68 5260.1856 -66842.9843 69 -3651.6152 5260.1856 70 561.2596 -3651.6152 71 11106.3880 561.2596 72 -36113.4304 11106.3880 73 -23387.6822 -36113.4304 74 -43657.9319 -23387.6822 75 -12152.4187 -43657.9319 76 -26775.3864 -12152.4187 77 -63085.0143 -26775.3864 78 -5726.1190 -63085.0143 79 -28978.3704 -5726.1190 80 -21431.8557 -28978.3704 81 73725.9996 -21431.8557 82 -20669.8302 73725.9996 83 -9189.8531 -20669.8302 84 -22779.6315 -9189.8531 85 8698.6625 -22779.6315 86 2859.5217 8698.6625 87 -24647.2013 2859.5217 88 -10281.9703 -24647.2013 89 12125.0297 -10281.9703 90 -14936.1357 12125.0297 91 -28414.9208 -14936.1357 92 33856.0653 -28414.9208 93 17018.4347 33856.0653 94 -26134.7058 17018.4347 95 39993.4248 -26134.7058 96 10048.1865 39993.4248 97 -4171.1270 10048.1865 98 26024.8627 -4171.1270 99 -32444.0207 26024.8627 100 -7393.6548 -32444.0207 101 -24135.6496 -7393.6548 102 5761.2953 -24135.6496 103 13491.4824 5761.2953 104 2902.2627 13491.4824 105 -17217.3670 2902.2627 106 2192.0354 -17217.3670 107 26313.7577 2192.0354 108 -2405.2002 26313.7577 109 -15675.8375 -2405.2002 110 -7651.3311 -15675.8375 111 1435.7791 -7651.3311 112 -9403.2256 1435.7791 113 -18214.8394 -9403.2256 114 -2337.8790 -18214.8394 115 -2405.2002 -2337.8790 116 64582.6010 -2405.2002 117 -22625.9753 64582.6010 118 6830.0134 -22625.9753 119 20944.5875 6830.0134 120 -7795.5847 20944.5875 121 4428.3715 -7795.5847 122 9795.5701 4428.3715 123 -23044.0327 9795.5701 124 15910.8372 -23044.0327 125 -2616.4737 15910.8372 126 -1393.2966 -2616.4737 127 20775.8157 -1393.2966 128 3879.7440 20775.8157 129 -5537.8766 3879.7440 130 1674.8092 -5537.8766 131 13794.3070 1674.8092 132 1736.9038 13794.3070 133 6993.7861 1736.9038 134 -2370.8026 6993.7861 135 1977.4417 -2370.8026 136 -2405.2002 1977.4417 137 10320.7145 -2405.2002 138 -3351.9201 10320.7145 139 879.9885 -3351.9201 140 -12601.5942 879.9885 141 -1475.8577 -12601.5942 142 18882.6528 -1475.8577 143 6042.0536 18882.6528 144 NA 6042.0536 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 43033.8161 16620.0196 [2,] -10696.2597 43033.8161 [3,] -39352.5931 -10696.2597 [4,] -50531.8386 -39352.5931 [5,] 8467.2578 -50531.8386 [6,] 7913.4494 8467.2578 [7,] 12361.9638 7913.4494 [8,] -20208.1727 12361.9638 [9,] 55116.6224 -20208.1727 [10,] -27344.7954 55116.6224 [11,] -246.8550 -27344.7954 [12,] -60848.2298 -246.8550 [13,] -7384.5380 -60848.2298 [14,] 31901.3323 -7384.5380 [15,] 12125.1074 31901.3323 [16,] -12207.0316 12125.1074 [17,] 2621.0353 -12207.0316 [18,] -63113.9268 2621.0353 [19,] -30718.5656 -63113.9268 [20,] -28449.8732 -30718.5656 [21,] -8422.9240 -28449.8732 [22,] 30359.7120 -8422.9240 [23,] -36754.9735 30359.7120 [24,] -13267.6701 -36754.9735 [25,] 30319.0677 -13267.6701 [26,] -11863.8554 30319.0677 [27,] 27379.5492 -11863.8554 [28,] 100850.6226 27379.5492 [29,] 9799.5385 100850.6226 [30,] 22693.8896 9799.5385 [31,] 39655.1525 22693.8896 [32,] -42026.9030 39655.1525 [33,] 11741.0004 -42026.9030 [34,] 22050.1778 11741.0004 [35,] -2631.7229 22050.1778 [36,] -4057.7641 -2631.7229 [37,] -18306.1184 -4057.7641 [38,] 27806.9727 -18306.1184 [39,] 26948.8991 27806.9727 [40,] 10306.8922 26948.8991 [41,] -18866.5312 10306.8922 [42,] 4376.1891 -18866.5312 [43,] -18512.7540 4376.1891 [44,] -4776.0490 -18512.7540 [45,] 35586.0681 -4776.0490 [46,] 387.7972 35586.0681 [47,] 20055.1266 387.7972 [48,] 20924.6480 20055.1266 [49,] -35330.3817 20924.6480 [50,] -13582.9496 -35330.3817 [51,] -21332.3791 -13582.9496 [52,] 73927.4863 -21332.3791 [53,] 45839.1158 73927.4863 [54,] 16527.7409 45839.1158 [55,] 11949.6560 16527.7409 [56,] 41642.4089 11949.6560 [57,] -2331.8043 41642.4089 [58,] 2812.7115 -2331.8043 [59,] -24588.9187 2812.7115 [60,] 3313.5410 -24588.9187 [61,] -49632.2282 3313.5410 [62,] 27031.5930 -49632.2282 [63,] -4669.9537 27031.5930 [64,] 45258.6959 -4669.9537 [65,] -21839.0383 45258.6959 [66,] 18898.9150 -21839.0383 [67,] -66842.9843 18898.9150 [68,] 5260.1856 -66842.9843 [69,] -3651.6152 5260.1856 [70,] 561.2596 -3651.6152 [71,] 11106.3880 561.2596 [72,] -36113.4304 11106.3880 [73,] -23387.6822 -36113.4304 [74,] -43657.9319 -23387.6822 [75,] -12152.4187 -43657.9319 [76,] -26775.3864 -12152.4187 [77,] -63085.0143 -26775.3864 [78,] -5726.1190 -63085.0143 [79,] -28978.3704 -5726.1190 [80,] -21431.8557 -28978.3704 [81,] 73725.9996 -21431.8557 [82,] -20669.8302 73725.9996 [83,] -9189.8531 -20669.8302 [84,] -22779.6315 -9189.8531 [85,] 8698.6625 -22779.6315 [86,] 2859.5217 8698.6625 [87,] -24647.2013 2859.5217 [88,] -10281.9703 -24647.2013 [89,] 12125.0297 -10281.9703 [90,] -14936.1357 12125.0297 [91,] -28414.9208 -14936.1357 [92,] 33856.0653 -28414.9208 [93,] 17018.4347 33856.0653 [94,] -26134.7058 17018.4347 [95,] 39993.4248 -26134.7058 [96,] 10048.1865 39993.4248 [97,] -4171.1270 10048.1865 [98,] 26024.8627 -4171.1270 [99,] -32444.0207 26024.8627 [100,] -7393.6548 -32444.0207 [101,] -24135.6496 -7393.6548 [102,] 5761.2953 -24135.6496 [103,] 13491.4824 5761.2953 [104,] 2902.2627 13491.4824 [105,] -17217.3670 2902.2627 [106,] 2192.0354 -17217.3670 [107,] 26313.7577 2192.0354 [108,] -2405.2002 26313.7577 [109,] -15675.8375 -2405.2002 [110,] -7651.3311 -15675.8375 [111,] 1435.7791 -7651.3311 [112,] -9403.2256 1435.7791 [113,] -18214.8394 -9403.2256 [114,] -2337.8790 -18214.8394 [115,] -2405.2002 -2337.8790 [116,] 64582.6010 -2405.2002 [117,] -22625.9753 64582.6010 [118,] 6830.0134 -22625.9753 [119,] 20944.5875 6830.0134 [120,] -7795.5847 20944.5875 [121,] 4428.3715 -7795.5847 [122,] 9795.5701 4428.3715 [123,] -23044.0327 9795.5701 [124,] 15910.8372 -23044.0327 [125,] -2616.4737 15910.8372 [126,] -1393.2966 -2616.4737 [127,] 20775.8157 -1393.2966 [128,] 3879.7440 20775.8157 [129,] -5537.8766 3879.7440 [130,] 1674.8092 -5537.8766 [131,] 13794.3070 1674.8092 [132,] 1736.9038 13794.3070 [133,] 6993.7861 1736.9038 [134,] -2370.8026 6993.7861 [135,] 1977.4417 -2370.8026 [136,] -2405.2002 1977.4417 [137,] 10320.7145 -2405.2002 [138,] -3351.9201 10320.7145 [139,] 879.9885 -3351.9201 [140,] -12601.5942 879.9885 [141,] -1475.8577 -12601.5942 [142,] 18882.6528 -1475.8577 [143,] 6042.0536 18882.6528 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 43033.8161 16620.0196 2 -10696.2597 43033.8161 3 -39352.5931 -10696.2597 4 -50531.8386 -39352.5931 5 8467.2578 -50531.8386 6 7913.4494 8467.2578 7 12361.9638 7913.4494 8 -20208.1727 12361.9638 9 55116.6224 -20208.1727 10 -27344.7954 55116.6224 11 -246.8550 -27344.7954 12 -60848.2298 -246.8550 13 -7384.5380 -60848.2298 14 31901.3323 -7384.5380 15 12125.1074 31901.3323 16 -12207.0316 12125.1074 17 2621.0353 -12207.0316 18 -63113.9268 2621.0353 19 -30718.5656 -63113.9268 20 -28449.8732 -30718.5656 21 -8422.9240 -28449.8732 22 30359.7120 -8422.9240 23 -36754.9735 30359.7120 24 -13267.6701 -36754.9735 25 30319.0677 -13267.6701 26 -11863.8554 30319.0677 27 27379.5492 -11863.8554 28 100850.6226 27379.5492 29 9799.5385 100850.6226 30 22693.8896 9799.5385 31 39655.1525 22693.8896 32 -42026.9030 39655.1525 33 11741.0004 -42026.9030 34 22050.1778 11741.0004 35 -2631.7229 22050.1778 36 -4057.7641 -2631.7229 37 -18306.1184 -4057.7641 38 27806.9727 -18306.1184 39 26948.8991 27806.9727 40 10306.8922 26948.8991 41 -18866.5312 10306.8922 42 4376.1891 -18866.5312 43 -18512.7540 4376.1891 44 -4776.0490 -18512.7540 45 35586.0681 -4776.0490 46 387.7972 35586.0681 47 20055.1266 387.7972 48 20924.6480 20055.1266 49 -35330.3817 20924.6480 50 -13582.9496 -35330.3817 51 -21332.3791 -13582.9496 52 73927.4863 -21332.3791 53 45839.1158 73927.4863 54 16527.7409 45839.1158 55 11949.6560 16527.7409 56 41642.4089 11949.6560 57 -2331.8043 41642.4089 58 2812.7115 -2331.8043 59 -24588.9187 2812.7115 60 3313.5410 -24588.9187 61 -49632.2282 3313.5410 62 27031.5930 -49632.2282 63 -4669.9537 27031.5930 64 45258.6959 -4669.9537 65 -21839.0383 45258.6959 66 18898.9150 -21839.0383 67 -66842.9843 18898.9150 68 5260.1856 -66842.9843 69 -3651.6152 5260.1856 70 561.2596 -3651.6152 71 11106.3880 561.2596 72 -36113.4304 11106.3880 73 -23387.6822 -36113.4304 74 -43657.9319 -23387.6822 75 -12152.4187 -43657.9319 76 -26775.3864 -12152.4187 77 -63085.0143 -26775.3864 78 -5726.1190 -63085.0143 79 -28978.3704 -5726.1190 80 -21431.8557 -28978.3704 81 73725.9996 -21431.8557 82 -20669.8302 73725.9996 83 -9189.8531 -20669.8302 84 -22779.6315 -9189.8531 85 8698.6625 -22779.6315 86 2859.5217 8698.6625 87 -24647.2013 2859.5217 88 -10281.9703 -24647.2013 89 12125.0297 -10281.9703 90 -14936.1357 12125.0297 91 -28414.9208 -14936.1357 92 33856.0653 -28414.9208 93 17018.4347 33856.0653 94 -26134.7058 17018.4347 95 39993.4248 -26134.7058 96 10048.1865 39993.4248 97 -4171.1270 10048.1865 98 26024.8627 -4171.1270 99 -32444.0207 26024.8627 100 -7393.6548 -32444.0207 101 -24135.6496 -7393.6548 102 5761.2953 -24135.6496 103 13491.4824 5761.2953 104 2902.2627 13491.4824 105 -17217.3670 2902.2627 106 2192.0354 -17217.3670 107 26313.7577 2192.0354 108 -2405.2002 26313.7577 109 -15675.8375 -2405.2002 110 -7651.3311 -15675.8375 111 1435.7791 -7651.3311 112 -9403.2256 1435.7791 113 -18214.8394 -9403.2256 114 -2337.8790 -18214.8394 115 -2405.2002 -2337.8790 116 64582.6010 -2405.2002 117 -22625.9753 64582.6010 118 6830.0134 -22625.9753 119 20944.5875 6830.0134 120 -7795.5847 20944.5875 121 4428.3715 -7795.5847 122 9795.5701 4428.3715 123 -23044.0327 9795.5701 124 15910.8372 -23044.0327 125 -2616.4737 15910.8372 126 -1393.2966 -2616.4737 127 20775.8157 -1393.2966 128 3879.7440 20775.8157 129 -5537.8766 3879.7440 130 1674.8092 -5537.8766 131 13794.3070 1674.8092 132 1736.9038 13794.3070 133 6993.7861 1736.9038 134 -2370.8026 6993.7861 135 1977.4417 -2370.8026 136 -2405.2002 1977.4417 137 10320.7145 -2405.2002 138 -3351.9201 10320.7145 139 879.9885 -3351.9201 140 -12601.5942 879.9885 141 -1475.8577 -12601.5942 142 18882.6528 -1475.8577 143 6042.0536 18882.6528 > 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/7a48p1324297793.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/828ii1324297793.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/9s6q21324297793.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/10qmux1324297793.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/11labp1324297793.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/123ua01324297793.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/1369hj1324297793.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/14brvm1324297793.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/15v3by1324297793.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/16cug41324297793.tab") + } > > try(system("convert tmp/1gko71324297793.ps tmp/1gko71324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/2ajwr1324297793.ps tmp/2ajwr1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/37yge1324297793.ps tmp/37yge1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/44sik1324297793.ps tmp/44sik1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/5xczg1324297793.ps tmp/5xczg1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/6d2ab1324297793.ps tmp/6d2ab1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/7a48p1324297793.ps tmp/7a48p1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/828ii1324297793.ps tmp/828ii1324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/9s6q21324297793.ps tmp/9s6q21324297793.png",intern=TRUE)) character(0) > try(system("convert tmp/10qmux1324297793.ps tmp/10qmux1324297793.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.310 0.360 5.674