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(112285 + ,1418 + ,210907 + ,30 + ,24188 + ,144 + ,145 + ,84786 + ,869 + ,120982 + ,28 + ,18273 + ,103 + ,101 + ,83123 + ,1530 + ,176508 + ,38 + ,14130 + ,98 + ,98 + ,101193 + ,2172 + ,179321 + ,30 + ,32287 + ,135 + ,132 + ,38361 + ,901 + ,123185 + ,22 + ,8654 + ,61 + ,60 + ,68504 + ,463 + ,52746 + ,26 + ,9245 + ,39 + ,38 + ,119182 + ,3201 + ,385534 + ,25 + ,33251 + ,150 + ,144 + ,22807 + ,371 + ,33170 + ,18 + ,1271 + ,5 + ,5 + ,17140 + ,1192 + ,101645 + ,11 + ,5279 + ,28 + ,28 + ,116174 + ,1583 + ,149061 + ,26 + ,27101 + ,84 + ,84 + ,57635 + ,1439 + ,165446 + ,25 + ,16373 + ,80 + ,79 + ,66198 + ,1764 + ,237213 + ,38 + ,19716 + ,130 + ,127 + ,71701 + ,1495 + ,173326 + ,44 + ,17753 + ,82 + ,78 + ,57793 + ,1373 + ,133131 + ,30 + ,9028 + ,60 + ,60 + ,80444 + ,2187 + ,258873 + ,40 + ,18653 + ,131 + ,131 + ,53855 + ,1491 + ,180083 + ,34 + ,8828 + ,84 + ,84 + ,97668 + ,4041 + ,324799 + ,47 + ,29498 + ,140 + ,133 + ,133824 + ,1706 + ,230964 + ,30 + ,27563 + ,151 + ,150 + ,101481 + ,2152 + ,236785 + ,31 + ,18293 + ,91 + ,91 + ,99645 + ,1036 + ,135473 + ,23 + ,22530 + ,138 + ,132 + ,114789 + ,1882 + ,202925 + ,36 + ,15977 + ,150 + ,136 + ,99052 + ,1929 + ,215147 + ,36 + ,35082 + ,124 + ,124 + ,67654 + ,2242 + ,344297 + ,30 + ,16116 + ,119 + ,118 + ,65553 + ,1220 + ,153935 + ,25 + ,15849 + ,73 + ,70 + ,97500 + ,1289 + ,132943 + ,39 + ,16026 + ,110 + ,107 + ,69112 + ,2515 + ,174724 + ,34 + ,26569 + ,123 + ,119 + ,82753 + ,2147 + ,174415 + ,31 + ,24785 + ,90 + ,89 + ,85323 + ,2352 + ,225548 + ,31 + ,17569 + ,116 + ,112 + ,72654 + ,1638 + ,223632 + ,33 + ,23825 + ,113 + ,108 + ,30727 + ,1222 + ,124817 + ,25 + ,7869 + ,56 + ,52 + ,77873 + ,1812 + ,221698 + ,33 + ,14975 + ,115 + ,112 + ,117478 + ,1677 + ,210767 + ,35 + ,37791 + ,119 + ,116 + ,74007 + ,1579 + ,170266 + ,42 + ,9605 + ,129 + ,123 + ,90183 + ,1731 + ,260561 + ,43 + ,27295 + ,127 + ,125 + ,61542 + ,807 + ,84853 + ,30 + ,2746 + ,27 + ,27 + ,101494 + ,2452 + ,294424 + ,33 + ,34461 + ,175 + ,162 + ,27570 + ,829 + ,101011 + ,13 + ,8098 + ,35 + ,32 + ,55813 + ,1940 + ,215641 + ,32 + ,4787 + ,64 + ,64 + ,79215 + ,2662 + ,325107 + ,36 + ,24919 + ,96 + ,92 + ,1423 + ,186 + ,7176 + ,0 + ,603 + ,0 + ,0 + ,55461 + ,1499 + ,167542 + ,28 + ,16329 + ,84 + ,83 + ,31081 + ,865 + ,106408 + ,14 + ,12558 + ,41 + ,41 + ,22996 + ,1793 + ,96560 + ,17 + ,7784 + ,47 + ,47 + ,83122 + ,2527 + ,265769 + ,32 + ,28522 + ,126 + ,120 + ,70106 + ,2747 + ,269651 + ,30 + ,22265 + ,105 + ,105 + ,60578 + ,1324 + ,149112 + ,35 + ,14459 + ,80 + ,79 + ,39992 + ,2702 + ,175824 + ,20 + ,14526 + ,70 + ,65 + ,79892 + ,1383 + ,152871 + ,28 + ,22240 + ,73 + ,70 + ,49810 + ,1179 + ,111665 + ,28 + ,11802 + ,57 + ,55 + ,71570 + ,2099 + ,116408 + ,39 + ,7623 + ,40 + ,39 + ,100708 + ,4308 + ,362301 + ,34 + ,11912 + ,68 + ,67 + ,33032 + ,918 + ,78800 + ,26 + ,7935 + ,21 + ,21 + ,82875 + ,1831 + ,183167 + ,39 + ,18220 + ,127 + ,127 + ,139077 + ,3373 + ,277965 + ,39 + ,19199 + ,154 + ,152 + ,71595 + ,1713 + ,150629 + ,33 + ,19918 + ,116 + ,113 + ,72260 + ,1438 + ,168809 + ,28 + ,21884 + ,102 + ,99 + ,5950 + ,496 + ,24188 + ,4 + ,2694 + ,7 + ,7 + ,115762 + ,2253 + ,329267 + ,39 + ,15808 + ,148 + ,141 + ,32551 + ,744 + ,65029 + ,18 + ,3597 + ,21 + ,21 + ,31701 + ,1161 + ,101097 + ,14 + ,5296 + ,35 + ,35 + ,80670 + ,2352 + ,218946 + ,29 + ,25239 + ,112 + ,109 + ,143558 + ,2144 + ,244052 + ,44 + ,29801 + ,137 + ,133 + ,117105 + ,4691 + ,341570 + ,21 + ,18450 + ,135 + ,123 + ,23789 + ,1112 + ,103597 + ,16 + ,7132 + ,26 + ,26 + ,120733 + ,2694 + ,233328 + ,28 + ,34861 + ,230 + ,230 + ,105195 + ,1973 + ,256462 + ,35 + ,35940 + ,181 + ,166 + ,73107 + ,1769 + ,206161 + ,28 + ,16688 + ,71 + ,68 + ,132068 + ,3148 + ,311473 + ,38 + ,24683 + ,147 + ,147 + ,149193 + ,2474 + ,235800 + ,23 + ,46230 + ,190 + ,179 + ,46821 + ,2084 + ,177939 + ,36 + ,10387 + ,64 + ,61 + ,87011 + ,1954 + ,207176 + ,32 + ,21436 + ,105 + ,101 + ,95260 + ,1226 + ,196553 + ,29 + ,30546 + ,107 + ,108 + ,55183 + ,1389 + ,174184 + ,25 + ,19746 + ,94 + ,90 + ,106671 + ,1496 + ,143246 + ,27 + ,15977 + ,116 + ,114 + ,73511 + ,2269 + ,187559 + ,36 + ,22583 + ,106 + ,103 + ,92945 + ,1833 + ,187681 + ,28 + ,17274 + ,143 + ,142 + ,78664 + ,1268 + ,119016 + ,23 + ,16469 + ,81 + ,79 + ,70054 + ,1943 + ,182192 + ,40 + ,14251 + ,89 + ,88 + ,22618 + ,893 + ,73566 + ,23 + ,3007 + ,26 + ,25 + ,74011 + ,1762 + ,194979 + ,40 + ,16851 + ,84 + ,83 + ,83737 + ,1403 + ,167488 + ,28 + ,21113 + ,113 + ,113 + ,69094 + ,1425 + ,143756 + ,34 + ,17401 + ,120 + ,118 + ,93133 + ,1857 + ,275541 + ,33 + ,23958 + ,110 + ,110 + ,95536 + ,1840 + ,243199 + ,28 + ,23567 + ,134 + ,129 + ,225920 + ,1502 + ,182999 + ,34 + ,13065 + ,54 + ,51 + ,62133 + ,1441 + ,135649 + ,30 + ,15358 + ,96 + ,93 + ,61370 + ,1420 + ,152299 + ,33 + ,14587 + ,78 + ,76 + ,43836 + ,1416 + ,120221 + ,22 + ,12770 + ,51 + ,49 + ,106117 + ,2970 + ,346485 + ,38 + ,24021 + ,121 + ,118 + ,38692 + ,1317 + ,145790 + ,26 + ,9648 + ,38 + ,38 + ,84651 + ,1644 + ,193339 + ,35 + ,20537 + ,145 + ,141 + ,56622 + ,870 + ,80953 + ,8 + ,7905 + ,59 + ,58 + ,15986 + ,1654 + ,122774 + ,24 + ,4527 + ,27 + ,27 + ,95364 + ,1054 + ,130585 + ,29 + ,30495 + ,91 + ,91 + ,26706 + ,937 + ,112611 + ,20 + ,7117 + ,48 + ,48 + ,89691 + ,3004 + ,286468 + ,29 + ,17719 + ,68 + ,63 + ,67267 + ,2008 + ,241066 + ,45 + ,27056 + ,58 + ,56 + ,126846 + ,2547 + ,148446 + ,37 + ,33473 + ,150 + ,144 + ,41140 + ,1885 + ,204713 + ,33 + ,9758 + ,74 + ,73 + ,102860 + ,1626 + ,182079 + ,33 + ,21115 + ,181 + ,168 + ,51715 + ,1468 + ,140344 + ,25 + ,7236 + ,65 + ,64 + ,55801 + ,2445 + ,220516 + ,32 + ,13790 + ,97 + ,97 + ,111813 + ,1964 + ,243060 + ,29 + ,32902 + ,121 + ,117 + ,120293 + ,1381 + ,162765 + ,28 + ,25131 + ,99 + ,100 + ,138599 + ,1369 + ,182613 + ,28 + ,30910 + ,152 + ,149 + ,161647 + ,1659 + ,232138 + ,31 + ,35947 + ,188 + ,187 + ,115929 + ,2888 + ,265318 + ,52 + ,29848 + ,138 + ,127 + ,24266 + ,1290 + ,85574 + ,21 + ,6943 + ,40 + ,37 + ,162901 + ,2845 + ,310839 + ,24 + ,42705 + ,254 + ,245 + ,109825 + ,1982 + ,225060 + ,41 + ,31808 + ,87 + ,87 + ,129838 + ,1904 + ,232317 + ,33 + ,26675 + ,178 + ,177 + ,37510 + ,1391 + ,144966 + ,32 + ,8435 + ,51 + ,49 + ,43750 + ,602 + ,43287 + ,19 + ,7409 + ,49 + ,49 + ,40652 + ,1743 + ,155754 + ,20 + ,14993 + ,73 + ,73 + ,87771 + ,1559 + ,164709 + ,31 + ,36867 + ,176 + ,177 + ,85872 + ,2014 + ,201940 + ,31 + ,33835 + ,94 + ,94 + ,89275 + ,2143 + ,235454 + ,32 + ,24164 + ,120 + ,117 + ,44418 + ,2146 + ,220801 + ,18 + ,12607 + ,66 + ,60 + ,192565 + ,874 + ,99466 + ,23 + ,22609 + ,56 + ,55 + ,35232 + ,1590 + ,92661 + ,17 + ,5892 + ,39 + ,39 + ,40909 + ,1590 + ,133328 + ,20 + ,17014 + ,66 + ,64 + ,13294 + ,1210 + ,61361 + ,12 + ,5394 + ,27 + ,26 + ,32387 + ,2072 + ,125930 + ,17 + ,9178 + ,65 + ,64 + ,140867 + ,1281 + ,100750 + ,30 + ,6440 + ,58 + ,58 + ,120662 + ,1401 + ,224549 + ,31 + ,21916 + ,98 + ,95 + ,21233 + ,834 + ,82316 + ,10 + ,4011 + ,25 + ,25 + ,44332 + ,1105 + ,102010 + ,13 + ,5818 + ,26 + ,26 + ,61056 + ,1272 + ,101523 + ,22 + ,18647 + ,77 + ,76 + ,101338 + ,1944 + ,243511 + ,42 + ,20556 + ,130 + ,129 + ,1168 + ,391 + ,22938 + ,1 + ,238 + ,11 + ,11 + ,13497 + ,761 + ,41566 + ,9 + ,70 + ,2 + ,2 + ,65567 + ,1605 + ,152474 + ,32 + ,22392 + ,101 + ,101 + ,25162 + ,530 + ,61857 + ,11 + ,3913 + ,31 + ,28 + ,32334 + ,1988 + ,99923 + ,25 + ,12237 + ,36 + ,36 + ,40735 + ,1386 + ,132487 + ,36 + ,8388 + ,120 + ,89 + ,91413 + ,2395 + ,317394 + ,31 + ,22120 + ,195 + ,193 + ,855 + ,387 + ,21054 + ,0 + ,338 + ,4 + ,4 + ,97068 + ,1742 + ,209641 + ,24 + ,11727 + ,89 + ,84 + ,44339 + ,620 + ,22648 + ,13 + ,3704 + ,24 + ,23 + ,14116 + ,449 + ,31414 + ,8 + ,3988 + ,39 + ,39 + ,10288 + ,800 + ,46698 + ,13 + ,3030 + ,14 + ,14 + ,65622 + ,1684 + ,131698 + ,19 + ,13520 + ,78 + ,78 + ,16563 + ,1050 + ,91735 + ,18 + ,1421 + ,15 + ,14 + ,76643 + ,2699 + ,244749 + ,33 + ,20923 + ,106 + ,101 + ,110681 + ,1606 + ,184510 + ,40 + ,20237 + ,83 + ,82 + ,29011 + ,1502 + ,79863 + ,22 + ,3219 + ,24 + ,24 + ,92696 + ,1204 + ,128423 + ,38 + ,3769 + ,37 + ,36 + ,94785 + ,1138 + ,97839 + ,24 + ,12252 + ,77 + ,75 + ,8773 + ,568 + ,38214 + ,8 + ,1888 + ,16 + ,16 + ,83209 + ,1459 + ,151101 + ,35 + ,14497 + ,56 + ,55 + ,93815 + ,2158 + ,272458 + ,43 + ,28864 + ,132 + ,131 + ,86687 + ,1111 + ,172494 + ,43 + ,21721 + ,144 + ,131 + ,34553 + ,1421 + ,108043 + ,14 + ,4821 + ,40 + ,39 + ,105547 + ,2833 + ,328107 + ,41 + ,33644 + ,153 + ,144 + ,103487 + ,1955 + ,250579 + ,38 + ,15923 + ,143 + ,139 + ,213688 + ,2922 + ,351067 + ,45 + ,42935 + ,220 + ,211 + ,71220 + ,1002 + ,158015 + ,31 + ,18864 + ,79 + ,78 + ,23517 + ,1060 + ,98866 + ,13 + ,4977 + ,50 + ,50 + ,56926 + ,956 + ,85439 + ,28 + ,7785 + ,39 + ,39 + ,91721 + ,2186 + ,229242 + ,31 + ,17939 + ,95 + ,90 + ,115168 + ,3604 + ,351619 + ,40 + ,23436 + ,169 + ,166 + ,111194 + ,1035 + ,84207 + ,30 + ,325 + ,12 + ,12 + ,51009 + ,1417 + ,120445 + ,16 + ,13539 + ,63 + ,57 + ,135777 + ,3261 + ,324598 + ,37 + ,34538 + ,134 + ,133 + ,51513 + ,1587 + ,131069 + ,30 + ,12198 + ,69 + ,69 + ,74163 + ,1424 + ,204271 + ,35 + ,26924 + ,119 + ,119 + ,51633 + ,1701 + ,165543 + ,32 + ,12716 + ,119 + ,119 + ,75345 + ,1249 + ,141722 + ,27 + ,8172 + ,75 + ,65 + ,33416 + ,946 + ,116048 + ,20 + ,10855 + ,63 + ,61 + ,83305 + ,1926 + ,250047 + ,18 + ,11932 + ,55 + ,49 + ,98952 + ,3352 + ,299775 + ,31 + ,14300 + ,103 + ,101 + ,102372 + ,1641 + ,195838 + ,31 + ,25515 + ,197 + ,196 + ,37238 + ,2035 + ,173260 + ,21 + ,2805 + ,16 + ,15 + ,103772 + ,2312 + ,254488 + ,39 + ,29402 + ,140 + ,136 + ,123969 + ,1369 + ,104389 + ,41 + ,16440 + ,89 + ,89 + ,27142 + ,1577 + ,136084 + ,13 + ,11221 + ,40 + ,40 + ,135400 + ,2201 + ,199476 + ,32 + ,28732 + ,125 + ,123 + ,21399 + ,961 + ,92499 + ,18 + ,5250 + ,21 + ,21 + ,130115 + ,1900 + ,224330 + ,39 + ,28608 + ,167 + ,163 + ,24874 + ,1254 + ,135781 + ,14 + ,8092 + ,32 + ,29 + ,34988 + ,1335 + ,74408 + ,7 + ,4473 + ,36 + ,35 + ,45549 + ,1597 + ,81240 + ,17 + ,1572 + ,13 + ,13 + ,6023 + ,207 + ,14688 + ,0 + ,2065 + ,5 + ,5 + ,64466 + ,1645 + ,181633 + ,30 + ,14817 + ,96 + ,96 + ,54990 + ,2429 + ,271856 + ,37 + ,16714 + ,151 + ,151 + ,1644 + ,151 + ,7199 + ,0 + ,556 + ,6 + ,6 + ,6179 + ,474 + ,46660 + ,5 + ,2089 + ,13 + ,13 + ,3926 + ,141 + ,17547 + ,1 + ,2658 + ,3 + ,3 + ,32755 + ,1639 + ,133368 + ,16 + ,10695 + ,57 + ,56 + ,34777 + ,872 + ,95227 + ,32 + ,1669 + ,23 + ,23 + ,73224 + ,1318 + ,152601 + ,24 + ,16267 + ,61 + ,57 + ,27114 + ,1018 + ,98146 + ,17 + ,7768 + ,21 + ,14 + ,20760 + ,1383 + ,79619 + ,11 + ,7252 + ,43 + ,43 + ,37636 + ,1314 + ,59194 + ,24 + ,6387 + ,20 + ,20 + ,65461 + ,1335 + ,139942 + ,22 + ,18715 + ,82 + ,72 + ,30080 + ,1403 + ,118612 + ,12 + ,7936 + ,90 + ,87 + ,24094 + ,910 + ,72880 + ,19 + ,8643 + ,25 + ,21 + ,69008 + ,616 + ,65475 + ,13 + ,7294 + ,60 + ,56 + ,54968 + ,1407 + ,99643 + ,17 + ,4570 + ,61 + ,59 + ,46090 + ,771 + ,71965 + ,15 + ,7185 + ,85 + ,82 + ,27507 + ,766 + ,77272 + ,16 + ,10058 + ,43 + ,43 + ,10672 + ,473 + ,49289 + ,24 + ,2342 + ,25 + ,25 + ,34029 + ,1376 + ,135131 + ,15 + ,8509 + ,41 + ,38 + ,46300 + ,1232 + ,108446 + ,17 + ,13275 + ,26 + ,25 + ,24760 + ,1521 + ,89746 + ,18 + ,6816 + ,38 + ,38 + ,18779 + ,572 + ,44296 + ,20 + ,1930 + ,12 + ,12 + ,21280 + ,1059 + ,77648 + ,16 + ,8086 + ,29 + ,29 + ,40662 + ,1544 + ,181528 + ,16 + ,10737 + ,49 + ,47 + ,28987 + ,1230 + ,134019 + ,18 + ,8033 + ,46 + ,45 + ,22827 + ,1206 + ,124064 + ,22 + ,7058 + ,41 + ,40 + ,18513 + ,1205 + ,92630 + ,8 + ,6782 + ,31 + ,30 + ,30594 + ,1255 + ,121848 + ,17 + ,5401 + ,41 + ,41 + ,24006 + ,613 + ,52915 + ,18 + ,6521 + ,26 + ,25 + ,27913 + ,721 + ,81872 + ,16 + ,10856 + ,23 + ,23 + ,42744 + ,1109 + ,58981 + ,23 + ,2154 + ,14 + ,14 + ,12934 + ,740 + ,53515 + ,22 + ,6117 + ,16 + ,16 + ,22574 + ,1126 + ,60812 + ,13 + ,5238 + ,25 + ,26 + ,41385 + ,728 + ,56375 + ,13 + ,4820 + ,21 + ,21 + ,18653 + ,689 + ,65490 + ,16 + ,5615 + ,32 + ,27 + ,18472 + ,592 + ,80949 + ,16 + ,4272 + ,9 + ,9 + ,30976 + ,995 + ,76302 + ,20 + ,8702 + ,35 + ,33 + ,63339 + ,1613 + ,104011 + ,22 + ,15340 + ,42 + ,42 + ,25568 + ,2048 + ,98104 + ,17 + ,8030 + ,68 + ,68 + ,33747 + ,705 + ,67989 + ,18 + ,9526 + ,32 + ,32 + ,4154 + ,301 + ,30989 + ,17 + ,1278 + ,6 + ,6 + ,19474 + ,1803 + ,135458 + ,12 + ,4236 + ,68 + ,67 + ,35130 + ,799 + ,73504 + ,7 + ,3023 + ,33 + ,33 + ,39067 + ,861 + ,63123 + ,17 + ,7196 + ,84 + ,77 + ,13310 + ,1186 + ,61254 + ,14 + ,3394 + ,46 + ,46 + ,65892 + ,1451 + ,74914 + ,23 + ,6371 + ,30 + ,30 + ,4143 + ,628 + ,31774 + ,17 + ,1574 + ,0 + ,0 + ,28579 + ,1161 + ,81437 + ,14 + ,9620 + ,36 + ,36 + ,51776 + ,1463 + ,87186 + ,15 + ,6978 + ,47 + ,46 + ,21152 + ,742 + ,50090 + ,17 + ,4911 + ,20 + ,18 + ,38084 + ,979 + ,65745 + ,21 + ,8645 + ,50 + ,48 + ,27717 + ,675 + ,56653 + ,18 + ,8987 + ,30 + ,29 + ,32928 + ,1241 + ,158399 + ,18 + ,5544 + ,30 + ,28 + ,11342 + ,676 + ,46455 + ,17 + ,3083 + ,34 + ,34 + ,19499 + ,1049 + ,73624 + ,17 + ,6909 + ,33 + ,33 + ,16380 + ,620 + ,38395 + ,16 + ,3189 + ,34 + ,34 + ,36874 + ,1081 + ,91899 + ,15 + ,6745 + ,37 + ,33 + ,48259 + ,1688 + ,139526 + ,21 + ,16724 + ,83 + ,80 + ,16734 + ,736 + ,52164 + ,16 + ,4850 + ,32 + ,32 + ,28207 + ,617 + ,51567 + ,14 + ,7025 + ,30 + ,30 + ,30143 + ,812 + ,70551 + ,15 + ,6047 + ,43 + ,41 + ,41369 + ,1051 + ,84856 + ,17 + ,7377 + ,41 + ,41 + ,45833 + ,1656 + ,102538 + ,15 + ,9078 + ,51 + ,51 + ,29156 + ,705 + ,86678 + ,15 + ,4605 + ,19 + ,18 + ,35944 + ,945 + ,85709 + ,10 + ,3238 + ,37 + ,34 + ,36278 + ,554 + ,34662 + ,6 + ,8100 + ,33 + ,31 + ,45588 + ,1597 + ,150580 + ,22 + ,9653 + ,41 + ,39 + ,45097 + ,982 + ,99611 + ,21 + ,8914 + ,54 + ,54 + ,3895 + ,222 + ,19349 + ,1 + ,786 + ,14 + ,14 + ,28394 + ,1212 + ,99373 + ,18 + ,6700 + ,25 + ,24 + ,18632 + ,1143 + ,86230 + ,17 + ,5788 + ,25 + ,24 + ,2325 + ,435 + ,30837 + ,4 + ,593 + ,8 + ,8 + ,25139 + ,532 + ,31706 + ,10 + ,4506 + ,26 + ,26 + ,27975 + ,882 + ,89806 + ,16 + ,6382 + ,20 + ,19 + ,14483 + ,608 + ,62088 + ,16 + ,5621 + ,11 + ,11 + ,13127 + ,459 + ,40151 + ,9 + ,3997 + ,14 + ,14 + ,5839 + ,578 + ,27634 + ,16 + ,520 + ,3 + ,1 + ,24069 + ,826 + ,76990 + ,17 + ,8891 + ,40 + ,39 + ,3738 + ,509 + ,37460 + ,7 + ,999 + ,5 + ,5 + ,18625 + ,717 + ,54157 + ,15 + ,7067 + ,38 + ,37 + ,36341 + ,637 + ,49862 + ,14 + ,4639 + ,32 + ,32 + ,24548 + ,857 + ,84337 + ,14 + ,5654 + ,41 + ,38 + ,21792 + ,830 + ,64175 + ,18 + ,6928 + ,46 + ,47 + ,26263 + ,652 + ,59382 + ,12 + ,1514 + ,47 + ,47 + ,23686 + ,707 + ,119308 + ,16 + ,9238 + ,37 + ,37 + ,49303 + ,954 + ,76702 + ,21 + ,8204 + ,51 + ,51 + ,25659 + ,1461 + ,103425 + ,19 + ,5926 + ,49 + ,45 + ,28904 + ,672 + ,70344 + ,16 + ,5785 + ,21 + ,21 + ,2781 + ,778 + ,43410 + ,1 + ,4 + ,1 + ,1 + ,29236 + ,1141 + ,104838 + ,16 + ,5930 + ,44 + ,42 + ,19546 + ,680 + ,62215 + ,10 + ,3710 + ,26 + ,26 + ,22818 + ,1090 + ,69304 + ,19 + ,705 + ,21 + ,21 + ,32689 + ,616 + ,53117 + ,12 + ,443 + ,4 + ,4 + ,5752 + ,285 + ,19764 + ,2 + ,2416 + ,10 + ,10 + ,22197 + ,1145 + ,86680 + ,14 + ,7747 + ,43 + ,43 + ,20055 + ,733 + ,84105 + ,17 + ,5432 + ,34 + ,34 + ,25272 + ,888 + ,77945 + ,19 + ,4913 + ,32 + ,31 + ,82206 + ,849 + ,89113 + ,14 + ,2650 + ,20 + ,19 + ,32073 + ,1182 + ,91005 + ,11 + ,2370 + ,34 + ,34 + ,5444 + ,528 + ,40248 + ,4 + ,775 + ,6 + ,6 + ,20154 + ,642 + ,64187 + ,16 + ,5576 + ,12 + ,11 + ,36944 + ,947 + ,50857 + ,20 + ,1352 + ,24 + ,24 + ,8019 + ,819 + ,56613 + ,12 + ,3080 + ,16 + ,16 + ,30884 + ,757 + ,62792 + ,15 + ,10205 + ,72 + ,72 + ,19540 + ,894 + ,72535 + ,16 + ,6095 + ,27 + ,21) + ,dim=c(7 + ,289) + ,dimnames=list(c('totsize' + ,'pageviews' + ,'time_in_rfc' + ,'compendiums_reviewed' + ,'totrevisions' + ,'tothyperlinks' + ,'totblogs') + ,1:289)) > y <- array(NA,dim=c(7,289),dimnames=list(c('totsize','pageviews','time_in_rfc','compendiums_reviewed','totrevisions','tothyperlinks','totblogs'),1:289)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'no' > par3 = '3' > par2 = 'none' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > library(party) Loading required package: survival Loading required package: splines Loading required package: grid Loading required package: modeltools Loading required package: stats4 Loading required package: coin Loading required package: mvtnorm Loading required package: zoo Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > par1 <- as.numeric(par1) > par3 <- as.numeric(par3) > x <- data.frame(t(y)) > is.data.frame(x) [1] TRUE > x <- x[!is.na(x[,par1]),] > k <- length(x[1,]) > n <- length(x[,1]) > colnames(x)[par1] [1] "totsize" > x[,par1] [1] 112285 84786 83123 101193 38361 68504 119182 22807 17140 116174 [11] 57635 66198 71701 57793 80444 53855 97668 133824 101481 99645 [21] 114789 99052 67654 65553 97500 69112 82753 85323 72654 30727 [31] 77873 117478 74007 90183 61542 101494 27570 55813 79215 1423 [41] 55461 31081 22996 83122 70106 60578 39992 79892 49810 71570 [51] 100708 33032 82875 139077 71595 72260 5950 115762 32551 31701 [61] 80670 143558 117105 23789 120733 105195 73107 132068 149193 46821 [71] 87011 95260 55183 106671 73511 92945 78664 70054 22618 74011 [81] 83737 69094 93133 95536 225920 62133 61370 43836 106117 38692 [91] 84651 56622 15986 95364 26706 89691 67267 126846 41140 102860 [101] 51715 55801 111813 120293 138599 161647 115929 24266 162901 109825 [111] 129838 37510 43750 40652 87771 85872 89275 44418 192565 35232 [121] 40909 13294 32387 140867 120662 21233 44332 61056 101338 1168 [131] 13497 65567 25162 32334 40735 91413 855 97068 44339 14116 [141] 10288 65622 16563 76643 110681 29011 92696 94785 8773 83209 [151] 93815 86687 34553 105547 103487 213688 71220 23517 56926 91721 [161] 115168 111194 51009 135777 51513 74163 51633 75345 33416 83305 [171] 98952 102372 37238 103772 123969 27142 135400 21399 130115 24874 [181] 34988 45549 6023 64466 54990 1644 6179 3926 32755 34777 [191] 73224 27114 20760 37636 65461 30080 24094 69008 54968 46090 [201] 27507 10672 34029 46300 24760 18779 21280 40662 28987 22827 [211] 18513 30594 24006 27913 42744 12934 22574 41385 18653 18472 [221] 30976 63339 25568 33747 4154 19474 35130 39067 13310 65892 [231] 4143 28579 51776 21152 38084 27717 32928 11342 19499 16380 [241] 36874 48259 16734 28207 30143 41369 45833 29156 35944 36278 [251] 45588 45097 3895 28394 18632 2325 25139 27975 14483 13127 [261] 5839 24069 3738 18625 36341 24548 21792 26263 23686 49303 [271] 25659 28904 2781 29236 19546 22818 32689 5752 22197 20055 [281] 25272 82206 32073 5444 20154 36944 8019 30884 19540 > if (par2 == 'kmeans') { + cl <- kmeans(x[,par1], par3) + print(cl) + clm <- matrix(cbind(cl$centers,1:par3),ncol=2) + clm <- clm[sort.list(clm[,1]),] + for (i in 1:par3) { + cl$cluster[cl$cluster==clm[i,2]] <- paste('C',i,sep='') + } + cl$cluster <- as.factor(cl$cluster) + print(cl$cluster) + x[,par1] <- cl$cluster + } > if (par2 == 'quantiles') { + x[,par1] <- cut2(x[,par1],g=par3) + } > if (par2 == 'hclust') { + hc <- hclust(dist(x[,par1])^2, 'cen') + print(hc) + memb <- cutree(hc, k = par3) + dum <- c(mean(x[memb==1,par1])) + for (i in 2:par3) { + dum <- c(dum, mean(x[memb==i,par1])) + } + hcm <- matrix(cbind(dum,1:par3),ncol=2) + hcm <- hcm[sort.list(hcm[,1]),] + for (i in 1:par3) { + memb[memb==hcm[i,2]] <- paste('C',i,sep='') + } + memb <- as.factor(memb) + print(memb) + x[,par1] <- memb + } > if (par2=='equal') { + ed <- cut(as.numeric(x[,par1]),par3,labels=paste('C',1:par3,sep='')) + x[,par1] <- as.factor(ed) + } > table(x[,par1]) 855 1168 1423 1644 2325 2781 3738 3895 3926 4143 4154 1 1 1 1 1 1 1 1 1 1 1 5444 5752 5839 5950 6023 6179 8019 8773 10288 10672 11342 1 1 1 1 1 1 1 1 1 1 1 12934 13127 13294 13310 13497 14116 14483 15986 16380 16563 16734 1 1 1 1 1 1 1 1 1 1 1 17140 18472 18513 18625 18632 18653 18779 19474 19499 19540 19546 1 1 1 1 1 1 1 1 1 1 1 20055 20154 20760 21152 21233 21280 21399 21792 22197 22574 22618 1 1 1 1 1 1 1 1 1 1 1 22807 22818 22827 22996 23517 23686 23789 24006 24069 24094 24266 1 1 1 1 1 1 1 1 1 1 1 24548 24760 24874 25139 25162 25272 25568 25659 26263 26706 27114 1 1 1 1 1 1 1 1 1 1 1 27142 27507 27570 27717 27913 27975 28207 28394 28579 28904 28987 1 1 1 1 1 1 1 1 1 1 1 29011 29156 29236 30080 30143 30594 30727 30884 30976 31081 31701 1 1 1 1 1 1 1 1 1 1 1 32073 32334 32387 32551 32689 32755 32928 33032 33416 33747 34029 1 1 1 1 1 1 1 1 1 1 1 34553 34777 34988 35130 35232 35944 36278 36341 36874 36944 37238 1 1 1 1 1 1 1 1 1 1 1 37510 37636 38084 38361 38692 39067 39992 40652 40662 40735 40909 1 1 1 1 1 1 1 1 1 1 1 41140 41369 41385 42744 43750 43836 44332 44339 44418 45097 45549 1 1 1 1 1 1 1 1 1 1 1 45588 45833 46090 46300 46821 48259 49303 49810 51009 51513 51633 1 1 1 1 1 1 1 1 1 1 1 51715 51776 53855 54968 54990 55183 55461 55801 55813 56622 56926 1 1 1 1 1 1 1 1 1 1 1 57635 57793 60578 61056 61370 61542 62133 63339 64466 65461 65553 1 1 1 1 1 1 1 1 1 1 1 65567 65622 65892 66198 67267 67654 68504 69008 69094 69112 70054 1 1 1 1 1 1 1 1 1 1 1 70106 71220 71570 71595 71701 72260 72654 73107 73224 73511 74007 1 1 1 1 1 1 1 1 1 1 1 74011 74163 75345 76643 77873 78664 79215 79892 80444 80670 82206 1 1 1 1 1 1 1 1 1 1 1 82753 82875 83122 83123 83209 83305 83737 84651 84786 85323 85872 1 1 1 1 1 1 1 1 1 1 1 86687 87011 87771 89275 89691 90183 91413 91721 92696 92945 93133 1 1 1 1 1 1 1 1 1 1 1 93815 94785 95260 95364 95536 97068 97500 97668 98952 99052 99645 1 1 1 1 1 1 1 1 1 1 1 100708 101193 101338 101481 101494 102372 102860 103487 103772 105195 105547 1 1 1 1 1 1 1 1 1 1 1 106117 106671 109825 110681 111194 111813 112285 114789 115168 115762 115929 1 1 1 1 1 1 1 1 1 1 1 116174 117105 117478 119182 120293 120662 120733 123969 126846 129838 130115 1 1 1 1 1 1 1 1 1 1 1 132068 133824 135400 135777 138599 139077 140867 143558 149193 161647 162901 1 1 1 1 1 1 1 1 1 1 1 192565 213688 225920 1 1 1 > colnames(x) [1] "totsize" "pageviews" "time_in_rfc" [4] "compendiums_reviewed" "totrevisions" "tothyperlinks" [7] "totblogs" > colnames(x)[par1] [1] "totsize" > x[,par1] [1] 112285 84786 83123 101193 38361 68504 119182 22807 17140 116174 [11] 57635 66198 71701 57793 80444 53855 97668 133824 101481 99645 [21] 114789 99052 67654 65553 97500 69112 82753 85323 72654 30727 [31] 77873 117478 74007 90183 61542 101494 27570 55813 79215 1423 [41] 55461 31081 22996 83122 70106 60578 39992 79892 49810 71570 [51] 100708 33032 82875 139077 71595 72260 5950 115762 32551 31701 [61] 80670 143558 117105 23789 120733 105195 73107 132068 149193 46821 [71] 87011 95260 55183 106671 73511 92945 78664 70054 22618 74011 [81] 83737 69094 93133 95536 225920 62133 61370 43836 106117 38692 [91] 84651 56622 15986 95364 26706 89691 67267 126846 41140 102860 [101] 51715 55801 111813 120293 138599 161647 115929 24266 162901 109825 [111] 129838 37510 43750 40652 87771 85872 89275 44418 192565 35232 [121] 40909 13294 32387 140867 120662 21233 44332 61056 101338 1168 [131] 13497 65567 25162 32334 40735 91413 855 97068 44339 14116 [141] 10288 65622 16563 76643 110681 29011 92696 94785 8773 83209 [151] 93815 86687 34553 105547 103487 213688 71220 23517 56926 91721 [161] 115168 111194 51009 135777 51513 74163 51633 75345 33416 83305 [171] 98952 102372 37238 103772 123969 27142 135400 21399 130115 24874 [181] 34988 45549 6023 64466 54990 1644 6179 3926 32755 34777 [191] 73224 27114 20760 37636 65461 30080 24094 69008 54968 46090 [201] 27507 10672 34029 46300 24760 18779 21280 40662 28987 22827 [211] 18513 30594 24006 27913 42744 12934 22574 41385 18653 18472 [221] 30976 63339 25568 33747 4154 19474 35130 39067 13310 65892 [231] 4143 28579 51776 21152 38084 27717 32928 11342 19499 16380 [241] 36874 48259 16734 28207 30143 41369 45833 29156 35944 36278 [251] 45588 45097 3895 28394 18632 2325 25139 27975 14483 13127 [261] 5839 24069 3738 18625 36341 24548 21792 26263 23686 49303 [271] 25659 28904 2781 29236 19546 22818 32689 5752 22197 20055 [281] 25272 82206 32073 5444 20154 36944 8019 30884 19540 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > if (par2 != 'none') { + m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x) + if (par4=='yes') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + a<-table.element(a,'Prediction (training)',par3+1,TRUE) + a<-table.element(a,'Prediction (testing)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Actual',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + a<-table.row.end(a) + for (i in 1:10) { + ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1)) + m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,]) + if (i==1) { + m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,]) + m.ct.i.actu <- x[ind==1,par1] + m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,]) + m.ct.x.actu <- x[ind==2,par1] + } else { + m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,])) + m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1]) + m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,])) + m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1]) + } + } + print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,])) + numer <- numer + m.ct.i.tab[i,i] + } + print(m.ct.i.cp <- numer / sum(m.ct.i.tab)) + print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,])) + numer <- numer + m.ct.x.tab[i,i] + } + print(m.ct.x.cp <- numer / sum(m.ct.x.tab)) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj]) + a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4)) + for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj]) + a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4)) + a<-table.row.end(a) + } + a<-table.row.start(a) + a<-table.element(a,'Overall',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.i.cp,4)) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.x.cp,4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/177451324293511.tab") + } + } > m Conditional inference tree with 12 terminal nodes Response: totsize Inputs: pageviews, time_in_rfc, compendiums_reviewed, totrevisions, tothyperlinks, totblogs Number of observations: 289 1) totrevisions <= 12770; criterion = 1, statistic = 187.948 2) compendiums_reviewed <= 22; criterion = 1, statistic = 67.591 3) tothyperlinks <= 16; criterion = 1, statistic = 44.779 4) pageviews <= 568; criterion = 1, statistic = 17.134 5)* weights = 17 4) pageviews > 568 6)* weights = 15 3) tothyperlinks > 16 7) time_in_rfc <= 135458; criterion = 0.995, statistic = 11.284 8) tothyperlinks <= 50; criterion = 0.953, statistic = 7.036 9)* weights = 81 8) tothyperlinks > 50 10)* weights = 17 7) time_in_rfc > 135458 11)* weights = 7 2) compendiums_reviewed > 22 12)* weights = 34 1) totrevisions > 12770 13) totrevisions <= 22583; criterion = 1, statistic = 33.402 14) compendiums_reviewed <= 30; criterion = 0.994, statistic = 10.691 15) tothyperlinks <= 102; criterion = 0.998, statistic = 12.664 16) compendiums_reviewed <= 21; criterion = 0.971, statistic = 7.891 17)* weights = 7 16) compendiums_reviewed > 21 18)* weights = 15 15) tothyperlinks > 102 19)* weights = 8 14) compendiums_reviewed > 30 20)* weights = 38 13) totrevisions > 22583 21) tothyperlinks <= 176; criterion = 0.988, statistic = 9.51 22)* weights = 42 21) tothyperlinks > 176 23)* weights = 8 > postscript(file="/var/wessaorg/rcomp/tmp/23dr21324293511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/334t01324293511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response') > dev.off() null device 1 > if (par2 == 'none') { + forec <- predict(m) + result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec)) + colnames(result) <- c('Actuals','Forecasts','Residuals') + print(result) + } Actuals Forecasts Residuals 1 112285 106116.833 6.168167e+03 2 84786 90331.125 -5.545125e+03 3 83123 90345.816 -7.222816e+03 4 101193 106116.833 -4.923833e+03 5 38361 40749.941 -2.388941e+03 6 68504 57313.529 1.119047e+04 7 119182 106116.833 1.306517e+04 8 22807 5716.647 1.709035e+04 9 17140 27901.642 -1.076164e+04 10 116174 106116.833 1.005717e+04 11 57635 67808.333 -1.017333e+04 12 66198 90345.816 -2.414782e+04 13 71701 90345.816 -1.864482e+04 14 57793 57313.529 4.794706e+02 15 80444 90345.816 -9.901816e+03 16 53855 57313.529 -3.458529e+03 17 97668 106116.833 -8.448833e+03 18 133824 106116.833 2.770717e+04 19 101481 90345.816 1.113518e+04 20 99645 90331.125 9.313875e+03 21 114789 90345.816 2.444318e+04 22 99052 106116.833 -7.064833e+03 23 67654 90331.125 -2.267712e+04 24 65553 67808.333 -2.255333e+03 25 97500 90345.816 7.154184e+03 26 69112 106116.833 -3.700483e+04 27 82753 106116.833 -2.336383e+04 28 85323 90345.816 -5.022816e+03 29 72654 106116.833 -3.346283e+04 30 30727 57313.529 -2.658653e+04 31 77873 90345.816 -1.247282e+04 32 117478 106116.833 1.136117e+04 33 74007 57313.529 1.669347e+04 34 90183 106116.833 -1.593383e+04 35 61542 57313.529 4.228471e+03 36 101494 106116.833 -4.622833e+03 37 27570 27901.642 -3.316420e+02 38 55813 57313.529 -1.500529e+03 39 79215 106116.833 -2.690183e+04 40 1423 5716.647 -4.293647e+03 41 55461 67808.333 -1.234733e+04 42 31081 27901.642 3.179358e+03 43 22996 27901.642 -4.905642e+03 44 83122 106116.833 -2.299483e+04 45 70106 90331.125 -2.022512e+04 46 60578 90345.816 -2.976782e+04 47 39992 47534.714 -7.542714e+03 48 79892 67808.333 1.208367e+04 49 49810 57313.529 -7.503529e+03 50 71570 57313.529 1.425647e+04 51 100708 57313.529 4.339447e+04 52 33032 57313.529 -2.428153e+04 53 82875 90345.816 -7.470816e+03 54 139077 90345.816 4.873118e+04 55 71595 90345.816 -1.875082e+04 56 72260 67808.333 4.451667e+03 57 5950 5716.647 2.333529e+02 58 115762 90345.816 2.541618e+04 59 32551 27901.642 4.649358e+03 60 31701 27901.642 3.799358e+03 61 80670 106116.833 -2.544683e+04 62 143558 106116.833 3.744117e+04 63 117105 90331.125 2.677388e+04 64 23789 27901.642 -4.112642e+03 65 120733 143195.875 -2.246288e+04 66 105195 143195.875 -3.800088e+04 67 73107 67808.333 5.298667e+03 68 132068 106116.833 2.595117e+04 69 149193 143195.875 5.997125e+03 70 46821 57313.529 -1.049253e+04 71 87011 90345.816 -3.334816e+03 72 95260 106116.833 -1.085683e+04 73 55183 67808.333 -1.262533e+04 74 106671 90331.125 1.633988e+04 75 73511 90345.816 -1.683482e+04 76 92945 90331.125 2.613875e+03 77 78664 67808.333 1.085567e+04 78 70054 90345.816 -2.029182e+04 79 22618 57313.529 -3.469553e+04 80 74011 90345.816 -1.633482e+04 81 83737 90331.125 -6.594125e+03 82 69094 90345.816 -2.125182e+04 83 93133 106116.833 -1.298383e+04 84 95536 106116.833 -1.058083e+04 85 225920 90345.816 1.355742e+05 86 62133 67808.333 -5.675333e+03 87 61370 90345.816 -2.897582e+04 88 43836 40749.941 3.086059e+03 89 106117 106116.833 1.666667e-01 90 38692 57313.529 -1.862153e+04 91 84651 90345.816 -5.694816e+03 92 56622 40749.941 1.587206e+04 93 15986 57313.529 -4.132753e+04 94 95364 106116.833 -1.075283e+04 95 26706 27901.642 -1.195642e+03 96 89691 67808.333 2.188267e+04 97 67267 106116.833 -3.884983e+04 98 126846 106116.833 2.072917e+04 99 41140 57313.529 -1.617353e+04 100 102860 90345.816 1.251418e+04 101 51715 57313.529 -5.598529e+03 102 55801 90345.816 -3.454482e+04 103 111813 106116.833 5.696167e+03 104 120293 106116.833 1.417617e+04 105 138599 106116.833 3.248217e+04 106 161647 143195.875 1.845112e+04 107 115929 106116.833 9.812167e+03 108 24266 27901.642 -3.635642e+03 109 162901 143195.875 1.970512e+04 110 109825 106116.833 3.708167e+03 111 129838 143195.875 -1.335788e+04 112 37510 57313.529 -1.980353e+04 113 43750 27901.642 1.584836e+04 114 40652 47534.714 -6.882714e+03 115 87771 106116.833 -1.834583e+04 116 85872 106116.833 -2.024483e+04 117 89275 106116.833 -1.684183e+04 118 44418 42702.429 1.715571e+03 119 192565 106116.833 8.644817e+04 120 35232 27901.642 7.330358e+03 121 40909 47534.714 -6.625714e+03 122 13294 27901.642 -1.460764e+04 123 32387 40749.941 -8.362941e+03 124 140867 57313.529 8.355347e+04 125 120662 90345.816 3.031618e+04 126 21233 27901.642 -6.668642e+03 127 44332 27901.642 1.643036e+04 128 61056 67808.333 -6.752333e+03 129 101338 90345.816 1.099218e+04 130 1168 5716.647 -4.548647e+03 131 13497 17428.533 -3.931533e+03 132 65567 90345.816 -2.477882e+04 133 25162 27901.642 -2.739642e+03 134 32334 57313.529 -2.497953e+04 135 40735 57313.529 -1.657853e+04 136 91413 90345.816 1.067184e+03 137 855 5716.647 -4.861647e+03 138 97068 57313.529 3.975447e+04 139 44339 27901.642 1.643736e+04 140 14116 27901.642 -1.378564e+04 141 10288 17428.533 -7.140533e+03 142 65622 47534.714 1.808729e+04 143 16563 17428.533 -8.655333e+02 144 76643 90345.816 -1.370282e+04 145 110681 90345.816 2.033518e+04 146 29011 27901.642 1.109358e+03 147 92696 57313.529 3.538247e+04 148 94785 57313.529 3.747147e+04 149 8773 5716.647 3.056353e+03 150 83209 90345.816 -7.136816e+03 151 93815 106116.833 -1.230183e+04 152 86687 90345.816 -3.658816e+03 153 34553 27901.642 6.651358e+03 154 105547 106116.833 -5.698333e+02 155 103487 90345.816 1.314118e+04 156 213688 143195.875 7.049212e+04 157 71220 90345.816 -1.912582e+04 158 23517 27901.642 -4.384642e+03 159 56926 57313.529 -3.875294e+02 160 91721 90345.816 1.375184e+03 161 115168 106116.833 9.051167e+03 162 111194 57313.529 5.388047e+04 163 51009 47534.714 3.474286e+03 164 135777 106116.833 2.966017e+04 165 51513 57313.529 -5.800529e+03 166 74163 106116.833 -3.195383e+04 167 51633 57313.529 -5.680529e+03 168 75345 57313.529 1.803147e+04 169 33416 40749.941 -7.333941e+03 170 83305 42702.429 4.060257e+04 171 98952 90345.816 8.606184e+03 172 102372 143195.875 -4.082388e+04 173 37238 17428.533 1.980947e+04 174 103772 106116.833 -2.344833e+03 175 123969 90345.816 3.362318e+04 176 27142 42702.429 -1.556043e+04 177 135400 106116.833 2.928317e+04 178 21399 27901.642 -6.502642e+03 179 130115 106116.833 2.399817e+04 180 24874 42702.429 -1.782843e+04 181 34988 27901.642 7.086358e+03 182 45549 17428.533 2.812047e+04 183 6023 5716.647 3.063529e+02 184 64466 67808.333 -3.342333e+03 185 54990 90345.816 -3.535582e+04 186 1644 5716.647 -4.072647e+03 187 6179 5716.647 4.623529e+02 188 3926 5716.647 -1.790647e+03 189 32755 40749.941 -7.994941e+03 190 34777 57313.529 -2.253653e+04 191 73224 67808.333 5.415667e+03 192 27114 27901.642 -7.876420e+02 193 20760 27901.642 -7.141642e+03 194 37636 57313.529 -1.967753e+04 195 65461 67808.333 -2.347333e+03 196 30080 40749.941 -1.066994e+04 197 24094 27901.642 -3.807642e+03 198 69008 40749.941 2.825806e+04 199 54968 40749.941 1.421806e+04 200 46090 40749.941 5.340059e+03 201 27507 27901.642 -3.946420e+02 202 10672 57313.529 -4.664153e+04 203 34029 27901.642 6.127358e+03 204 46300 47534.714 -1.234714e+03 205 24760 27901.642 -3.141642e+03 206 18779 17428.533 1.350467e+03 207 21280 27901.642 -6.621642e+03 208 40662 42702.429 -2.040429e+03 209 28987 27901.642 1.085358e+03 210 22827 27901.642 -5.074642e+03 211 18513 27901.642 -9.388642e+03 212 30594 27901.642 2.692358e+03 213 24006 27901.642 -3.895642e+03 214 27913 27901.642 1.135802e+01 215 42744 57313.529 -1.456953e+04 216 12934 17428.533 -4.494533e+03 217 22574 27901.642 -5.327642e+03 218 41385 27901.642 1.348336e+04 219 18653 27901.642 -9.248642e+03 220 18472 17428.533 1.043467e+03 221 30976 27901.642 3.074358e+03 222 63339 67808.333 -4.469333e+03 223 25568 40749.941 -1.518194e+04 224 33747 27901.642 5.845358e+03 225 4154 5716.647 -1.562647e+03 226 19474 40749.941 -2.127594e+04 227 35130 27901.642 7.228358e+03 228 39067 40749.941 -1.682941e+03 229 13310 27901.642 -1.459164e+04 230 65892 57313.529 8.578471e+03 231 4143 17428.533 -1.328553e+04 232 28579 27901.642 6.773580e+02 233 51776 27901.642 2.387436e+04 234 21152 27901.642 -6.749642e+03 235 38084 27901.642 1.018236e+04 236 27717 27901.642 -1.846420e+02 237 32928 42702.429 -9.774429e+03 238 11342 27901.642 -1.655964e+04 239 19499 27901.642 -8.402642e+03 240 16380 27901.642 -1.152164e+04 241 36874 27901.642 8.972358e+03 242 48259 47534.714 7.242857e+02 243 16734 27901.642 -1.116764e+04 244 28207 27901.642 3.053580e+02 245 30143 27901.642 2.241358e+03 246 41369 27901.642 1.346736e+04 247 45833 40749.941 5.083059e+03 248 29156 27901.642 1.254358e+03 249 35944 27901.642 8.042358e+03 250 36278 27901.642 8.376358e+03 251 45588 42702.429 2.885571e+03 252 45097 40749.941 4.347059e+03 253 3895 5716.647 -1.821647e+03 254 28394 27901.642 4.923580e+02 255 18632 27901.642 -9.269642e+03 256 2325 5716.647 -3.391647e+03 257 25139 27901.642 -2.762642e+03 258 27975 27901.642 7.335802e+01 259 14483 17428.533 -2.945533e+03 260 13127 5716.647 7.410353e+03 261 5839 17428.533 -1.158953e+04 262 24069 27901.642 -3.832642e+03 263 3738 5716.647 -1.978647e+03 264 18625 27901.642 -9.276642e+03 265 36341 27901.642 8.439358e+03 266 24548 27901.642 -3.353642e+03 267 21792 27901.642 -6.109642e+03 268 26263 27901.642 -1.638642e+03 269 23686 27901.642 -4.215642e+03 270 49303 40749.941 8.553059e+03 271 25659 27901.642 -2.242642e+03 272 28904 27901.642 1.002358e+03 273 2781 17428.533 -1.464753e+04 274 29236 27901.642 1.334358e+03 275 19546 27901.642 -8.355642e+03 276 22818 27901.642 -5.083642e+03 277 32689 17428.533 1.526047e+04 278 5752 5716.647 3.535294e+01 279 22197 27901.642 -5.704642e+03 280 20055 27901.642 -7.846642e+03 281 25272 27901.642 -2.629642e+03 282 82206 27901.642 5.430436e+04 283 32073 27901.642 4.171358e+03 284 5444 5716.647 -2.726471e+02 285 20154 17428.533 2.725467e+03 286 36944 27901.642 9.042358e+03 287 8019 17428.533 -9.409533e+03 288 30884 40749.941 -9.865941e+03 289 19540 27901.642 -8.361642e+03 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/wessaorg/rcomp/tmp/4dmwg1324293511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if(par2=='none') { + op <- par(mfrow=c(2,2)) + plot(density(result$Actuals),main='Kernel Density Plot of Actuals') + plot(density(result$Residuals),main='Kernel Density Plot of Residuals') + plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals') + plot(density(result$Forecasts),main='Kernel Density Plot of Predictions') + par(op) + } > if(par2!='none') { + plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted') + } > dev.off() null device 1 > if (par2 == 'none') { + detcoef <- cor(result$Forecasts,result$Actuals) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goodness of Fit',2,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Correlation',1,TRUE) + a<-table.element(a,round(detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'R-squared',1,TRUE) + a<-table.element(a,round(detcoef*detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'RMSE',1,TRUE) + a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/52kq11324293511.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'#',header=TRUE) + a<-table.element(a,'Actuals',header=TRUE) + a<-table.element(a,'Forecasts',header=TRUE) + a<-table.element(a,'Residuals',header=TRUE) + a<-table.row.end(a) + for (i in 1:length(result$Actuals)) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,result$Actuals[i]) + a<-table.element(a,result$Forecasts[i]) + a<-table.element(a,result$Residuals[i]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/62o7r1324293511.tab") + } > if (par2 != 'none') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + for (i in 1:par3) { + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + } + a<-table.row.end(a) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (j in 1:par3) { + a<-table.element(a,myt[i,j]) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/75vp71324293511.tab") + } > > try(system("convert tmp/23dr21324293511.ps tmp/23dr21324293511.png",intern=TRUE)) character(0) > try(system("convert tmp/334t01324293511.ps tmp/334t01324293511.png",intern=TRUE)) character(0) > try(system("convert tmp/4dmwg1324293511.ps tmp/4dmwg1324293511.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.113 0.263 6.373