R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(210907 + ,1418 + ,56 + ,79 + ,30 + ,112285 + ,144 + ,120982 + ,869 + ,56 + ,58 + ,28 + ,84786 + ,103 + ,176508 + ,1530 + ,54 + ,60 + ,38 + ,83123 + ,98 + ,179321 + ,2172 + ,89 + ,108 + ,30 + ,101193 + ,135 + ,123185 + ,901 + ,40 + ,49 + ,22 + ,38361 + ,61 + ,52746 + ,463 + ,25 + ,0 + ,26 + ,68504 + ,39 + ,385534 + ,3201 + ,92 + ,121 + ,25 + ,119182 + ,150 + ,33170 + ,371 + ,18 + ,1 + ,18 + ,22807 + ,5 + ,101645 + ,1192 + ,63 + ,20 + ,11 + ,17140 + ,28 + ,149061 + ,1583 + ,44 + ,43 + ,26 + ,116174 + ,84 + ,165446 + ,1439 + ,33 + ,69 + ,25 + ,57635 + ,80 + ,237213 + ,1764 + ,84 + ,78 + ,38 + ,66198 + ,130 + ,173326 + ,1495 + ,88 + ,86 + ,44 + ,71701 + ,82 + ,133131 + ,1373 + ,55 + ,44 + ,30 + ,57793 + ,60 + ,258873 + ,2187 + ,60 + ,104 + ,40 + ,80444 + ,131 + ,180083 + ,1491 + ,66 + ,63 + ,34 + ,53855 + ,84 + ,324799 + ,4041 + ,154 + ,158 + ,47 + ,97668 + ,140 + ,230964 + ,1706 + ,53 + ,102 + ,30 + ,133824 + ,151 + ,236785 + ,2152 + ,119 + ,77 + ,31 + ,101481 + ,91 + ,135473 + ,1036 + ,41 + ,82 + ,23 + ,99645 + ,138 + ,202925 + ,1882 + ,61 + ,115 + ,36 + ,114789 + ,150 + ,215147 + ,1929 + ,58 + ,101 + ,36 + ,99052 + ,124 + ,344297 + ,2242 + ,75 + ,80 + ,30 + ,67654 + ,119 + ,153935 + ,1220 + ,33 + ,50 + ,25 + ,65553 + ,73 + ,132943 + ,1289 + ,40 + ,83 + ,39 + ,97500 + ,110 + ,174724 + ,2515 + ,92 + ,123 + ,34 + ,69112 + ,123 + ,174415 + ,2147 + ,100 + ,73 + ,31 + ,82753 + ,90 + ,225548 + ,2352 + ,112 + ,81 + ,31 + ,85323 + ,116 + ,223632 + ,1638 + ,73 + ,105 + ,33 + ,72654 + ,113 + ,124817 + ,1222 + ,40 + ,47 + ,25 + ,30727 + ,56 + ,221698 + ,1812 + ,45 + ,105 + ,33 + ,77873 + ,115 + ,210767 + ,1677 + ,60 + ,94 + ,35 + ,117478 + ,119 + ,170266 + ,1579 + ,62 + ,44 + ,42 + ,74007 + ,129 + ,260561 + ,1731 + ,75 + ,114 + ,43 + ,90183 + ,127 + ,84853 + ,807 + ,31 + ,38 + ,30 + ,61542 + ,27 + ,294424 + ,2452 + ,77 + ,107 + ,33 + ,101494 + ,175 + ,101011 + ,829 + ,34 + ,30 + ,13 + ,27570 + ,35 + ,215641 + ,1940 + ,46 + ,71 + ,32 + ,55813 + ,64 + ,325107 + ,2662 + ,99 + ,84 + ,36 + ,79215 + ,96 + ,7176 + ,186 + ,17 + ,0 + ,0 + ,1423 + ,0 + ,167542 + ,1499 + ,66 + ,59 + ,28 + ,55461 + ,84 + ,106408 + ,865 + ,30 + ,33 + ,14 + ,31081 + ,41 + ,96560 + ,1793 + ,76 + ,42 + ,17 + ,22996 + ,47 + ,265769 + ,2527 + ,146 + ,96 + ,32 + ,83122 + ,126 + ,269651 + ,2747 + ,67 + ,106 + ,30 + ,70106 + ,105 + ,149112 + ,1324 + ,56 + ,56 + ,35 + ,60578 + ,80 + ,175824 + ,2702 + ,107 + ,57 + ,20 + ,39992 + ,70 + ,152871 + ,1383 + ,58 + ,59 + ,28 + ,79892 + ,73 + ,111665 + ,1179 + ,34 + ,39 + ,28 + ,49810 + ,57 + ,116408 + ,2099 + ,61 + ,34 + ,39 + ,71570 + ,40 + ,362301 + ,4308 + ,119 + ,76 + ,34 + ,100708 + ,68 + ,78800 + ,918 + ,42 + ,20 + ,26 + ,33032 + ,21 + ,183167 + ,1831 + ,66 + ,91 + ,39 + ,82875 + ,127 + ,277965 + ,3373 + ,89 + ,115 + ,39 + ,139077 + ,154 + ,150629 + ,1713 + ,44 + ,85 + ,33 + ,71595 + ,116 + ,168809 + ,1438 + ,66 + ,76 + ,28 + ,72260 + ,102 + ,24188 + ,496 + ,24 + ,8 + ,4 + ,5950 + ,7 + ,329267 + ,2253 + ,259 + ,79 + ,39 + ,115762 + ,148 + ,65029 + ,744 + ,17 + ,21 + ,18 + ,32551 + ,21 + ,101097 + ,1161 + ,64 + ,30 + ,14 + ,31701 + ,35 + ,218946 + ,2352 + ,41 + ,76 + ,29 + ,80670 + ,112 + ,244052 + ,2144 + ,68 + ,101 + ,44 + ,143558 + ,137 + ,341570 + ,4691 + ,168 + ,94 + ,21 + ,117105 + ,135 + ,103597 + ,1112 + ,43 + ,27 + ,16 + ,23789 + ,26 + ,233328 + ,2694 + ,132 + ,92 + ,28 + ,120733 + ,230 + ,256462 + ,1973 + ,105 + ,123 + ,35 + ,105195 + ,181 + ,206161 + ,1769 + ,71 + ,75 + ,28 + ,73107 + ,71 + ,311473 + ,3148 + ,112 + ,128 + ,38 + ,132068 + ,147 + ,235800 + ,2474 + ,94 + ,105 + ,23 + ,149193 + ,190 + ,177939 + ,2084 + ,82 + ,55 + ,36 + ,46821 + ,64 + ,207176 + ,1954 + ,70 + ,56 + ,32 + ,87011 + ,105 + ,196553 + ,1226 + ,57 + ,41 + ,29 + ,95260 + ,107 + ,174184 + ,1389 + ,53 + ,72 + ,25 + ,55183 + ,94 + ,143246 + ,1496 + ,103 + ,67 + ,27 + ,106671 + ,116 + ,187559 + ,2269 + ,121 + ,75 + ,36 + ,73511 + ,106 + ,187681 + ,1833 + ,62 + ,114 + ,28 + ,92945 + ,143 + ,119016 + ,1268 + ,52 + ,118 + ,23 + ,78664 + ,81 + ,182192 + ,1943 + ,52 + ,77 + ,40 + ,70054 + ,89 + ,73566 + ,893 + ,32 + ,22 + ,23 + ,22618 + ,26 + ,194979 + ,1762 + ,62 + ,66 + ,40 + ,74011 + ,84 + ,167488 + ,1403 + ,45 + ,69 + ,28 + ,83737 + ,113 + ,143756 + ,1425 + ,46 + ,105 + ,34 + ,69094 + ,120 + ,275541 + ,1857 + ,63 + ,116 + ,33 + ,93133 + ,110 + ,243199 + ,1840 + ,75 + ,88 + ,28 + ,95536 + ,134 + ,182999 + ,1502 + ,88 + ,73 + ,34 + ,225920 + ,54 + ,135649 + ,1441 + ,46 + ,99 + ,30 + ,62133 + ,96 + ,152299 + ,1420 + ,53 + ,62 + ,33 + ,61370 + ,78 + ,120221 + ,1416 + ,37 + ,53 + ,22 + ,43836 + ,51 + ,346485 + ,2970 + ,90 + ,118 + ,38 + ,106117 + ,121 + ,145790 + ,1317 + ,63 + ,30 + ,26 + ,38692 + ,38 + ,193339 + ,1644 + ,78 + ,100 + ,35 + ,84651 + ,145 + ,80953 + ,870 + ,25 + ,49 + ,8 + ,56622 + ,59 + ,122774 + ,1654 + ,45 + ,24 + ,24 + ,15986 + ,27 + ,130585 + ,1054 + ,46 + ,67 + ,29 + ,95364 + ,91 + ,112611 + ,937 + ,41 + ,46 + ,20 + ,26706 + ,48 + ,286468 + ,3004 + ,144 + ,57 + ,29 + ,89691 + ,68 + ,241066 + ,2008 + ,82 + ,75 + ,45 + ,67267 + ,58 + ,148446 + ,2547 + ,91 + ,135 + ,37 + ,126846 + ,150 + ,204713 + ,1885 + ,71 + ,68 + ,33 + ,41140 + ,74 + ,182079 + ,1626 + ,63 + ,124 + ,33 + ,102860 + ,181 + ,140344 + ,1468 + ,53 + ,33 + ,25 + ,51715 + ,65 + ,220516 + ,2445 + ,62 + ,98 + ,32 + ,55801 + ,97 + ,243060 + ,1964 + ,63 + ,58 + ,29 + ,111813 + ,121 + ,162765 + ,1381 + ,32 + ,68 + ,28 + ,120293 + ,99 + ,182613 + ,1369 + ,39 + ,81 + ,28 + ,138599 + ,152 + ,232138 + ,1659 + ,62 + ,131 + ,31 + ,161647 + ,188 + ,265318 + ,2888 + ,117 + ,110 + ,52 + ,115929 + ,138 + ,85574 + ,1290 + ,34 + ,37 + ,21 + ,24266 + ,40 + ,310839 + ,2845 + ,92 + ,130 + ,24 + ,162901 + ,254 + ,225060 + ,1982 + ,93 + ,93 + ,41 + ,109825 + ,87 + ,232317 + ,1904 + ,54 + ,118 + ,33 + ,129838 + ,178 + ,144966 + ,1391 + ,144 + ,39 + ,32 + ,37510 + ,51 + ,43287 + ,602 + ,14 + ,13 + ,19 + ,43750 + ,49 + ,155754 + ,1743 + ,61 + ,74 + ,20 + ,40652 + ,73 + ,164709 + ,1559 + ,109 + ,81 + ,31 + ,87771 + ,176 + ,201940 + ,2014 + ,38 + ,109 + ,31 + ,85872 + ,94 + ,235454 + ,2143 + ,73 + ,151 + ,32 + ,89275 + ,120 + ,220801 + ,2146 + ,75 + ,51 + ,18 + ,44418 + ,66 + ,99466 + ,874 + ,50 + ,28 + ,23 + ,192565 + ,56 + ,92661 + ,1590 + ,61 + ,40 + ,17 + ,35232 + ,39 + ,133328 + ,1590 + ,55 + ,56 + ,20 + ,40909 + ,66 + ,61361 + ,1210 + ,77 + ,27 + ,12 + ,13294 + ,27 + ,125930 + ,2072 + ,75 + ,37 + ,17 + ,32387 + ,65 + ,100750 + ,1281 + ,72 + ,83 + ,30 + ,140867 + ,58 + ,224549 + ,1401 + ,50 + ,54 + ,31 + ,120662 + ,98 + ,82316 + ,834 + ,32 + ,27 + ,10 + ,21233 + ,25 + ,102010 + ,1105 + ,53 + ,28 + ,13 + ,44332 + ,26 + ,101523 + ,1272 + ,42 + ,59 + ,22 + ,61056 + ,77 + ,243511 + ,1944 + ,71 + ,133 + ,42 + ,101338 + ,130 + ,22938 + ,391 + ,10 + ,12 + ,1 + ,1168 + ,11 + ,41566 + ,761 + ,35 + ,0 + ,9 + ,13497 + ,2 + ,152474 + ,1605 + ,65 + ,106 + ,32 + ,65567 + ,101 + ,61857 + ,530 + ,25 + ,23 + ,11 + ,25162 + ,31 + ,99923 + ,1988 + ,66 + ,44 + ,25 + ,32334 + ,36 + ,132487 + ,1386 + ,41 + ,71 + ,36 + ,40735 + ,120 + ,317394 + ,2395 + ,86 + ,116 + ,31 + ,91413 + ,195 + ,21054 + ,387 + ,16 + ,4 + ,0 + ,855 + ,4 + ,209641 + ,1742 + ,42 + ,62 + ,24 + ,97068 + ,89 + ,22648 + ,620 + ,19 + ,12 + ,13 + ,44339 + ,24 + ,31414 + ,449 + ,19 + ,18 + ,8 + ,14116 + ,39 + ,46698 + ,800 + ,45 + ,14 + ,13 + ,10288 + ,14 + ,131698 + ,1684 + ,65 + ,60 + ,19 + ,65622 + ,78 + ,91735 + ,1050 + ,35 + ,7 + ,18 + ,16563 + ,15 + ,244749 + ,2699 + ,95 + ,98 + ,33 + ,76643 + ,106 + ,184510 + ,1606 + ,49 + ,64 + ,40 + ,110681 + ,83 + ,79863 + ,1502 + ,37 + ,29 + ,22 + ,29011 + ,24 + ,128423 + ,1204 + ,64 + ,32 + ,38 + ,92696 + ,37 + ,97839 + ,1138 + ,38 + ,25 + ,24 + ,94785 + ,77 + ,38214 + ,568 + ,34 + ,16 + ,8 + ,8773 + ,16 + ,151101 + ,1459 + ,32 + ,48 + ,35 + ,83209 + ,56 + ,272458 + ,2158 + ,65 + ,100 + ,43 + ,93815 + ,132 + ,172494 + ,1111 + ,52 + ,46 + ,43 + ,86687 + ,144 + ,108043 + ,1421 + ,62 + ,45 + ,14 + ,34553 + ,40 + ,328107 + ,2833 + ,65 + ,129 + ,41 + ,105547 + ,153 + ,250579 + ,1955 + ,83 + ,130 + ,38 + ,103487 + ,143 + ,351067 + ,2922 + ,95 + ,136 + ,45 + ,213688 + ,220 + ,158015 + ,1002 + ,29 + ,59 + ,31 + ,71220 + ,79 + ,98866 + ,1060 + ,18 + ,25 + ,13 + ,23517 + ,50 + ,85439 + ,956 + ,33 + ,32 + ,28 + ,56926 + ,39 + ,229242 + ,2186 + ,247 + ,63 + ,31 + ,91721 + ,95 + ,351619 + ,3604 + ,139 + ,95 + ,40 + ,115168 + ,169 + ,84207 + ,1035 + ,29 + ,14 + ,30 + ,111194 + ,12 + ,120445 + ,1417 + ,118 + ,36 + ,16 + ,51009 + ,63 + ,324598 + ,3261 + ,110 + ,113 + ,37 + ,135777 + ,134 + ,131069 + ,1587 + ,67 + ,47 + ,30 + ,51513 + ,69 + ,204271 + ,1424 + ,42 + ,92 + ,35 + ,74163 + ,119 + ,165543 + ,1701 + ,65 + ,70 + ,32 + ,51633 + ,119 + ,141722 + ,1249 + ,94 + ,19 + ,27 + ,75345 + ,75 + ,116048 + ,946 + ,64 + ,50 + ,20 + ,33416 + ,63 + ,250047 + ,1926 + ,81 + ,41 + ,18 + ,83305 + ,55 + ,299775 + ,3352 + ,95 + ,91 + ,31 + ,98952 + ,103 + ,195838 + ,1641 + ,67 + ,111 + ,31 + ,102372 + ,197 + ,173260 + ,2035 + ,63 + ,41 + ,21 + ,37238 + ,16 + ,254488 + ,2312 + ,83 + ,120 + ,39 + ,103772 + ,140 + ,104389 + ,1369 + ,45 + ,135 + ,41 + ,123969 + ,89 + ,136084 + ,1577 + ,30 + ,27 + ,13 + ,27142 + ,40 + ,199476 + ,2201 + ,70 + ,87 + ,32 + ,135400 + ,125 + ,92499 + ,961 + ,32 + ,25 + ,18 + ,21399 + ,21 + ,224330 + ,1900 + ,83 + ,131 + ,39 + ,130115 + ,167 + ,135781 + ,1254 + ,31 + ,45 + ,14 + ,24874 + ,32 + ,74408 + ,1335 + ,67 + ,29 + ,7 + ,34988 + ,36 + ,81240 + ,1597 + ,66 + ,58 + ,17 + ,45549 + ,13 + ,14688 + ,207 + ,10 + ,4 + ,0 + ,6023 + ,5 + ,181633 + ,1645 + ,70 + ,47 + ,30 + ,64466 + ,96 + ,271856 + ,2429 + ,103 + ,109 + ,37 + ,54990 + ,151 + ,7199 + ,151 + ,5 + ,7 + ,0 + ,1644 + ,6 + ,46660 + ,474 + ,20 + ,12 + ,5 + ,6179 + ,13 + ,17547 + ,141 + ,5 + ,0 + ,1 + ,3926 + ,3 + ,133368 + ,1639 + ,36 + ,37 + ,16 + ,32755 + ,57 + ,95227 + ,872 + ,34 + ,37 + ,32 + ,34777 + ,23 + ,152601 + ,1318 + ,48 + ,46 + ,24 + ,73224 + ,61 + ,98146 + ,1018 + ,40 + ,15 + ,17 + ,27114 + ,21 + ,79619 + ,1383 + ,43 + ,42 + ,11 + ,20760 + ,43 + ,59194 + ,1314 + ,31 + ,7 + ,24 + ,37636 + ,20 + ,139942 + ,1335 + ,42 + ,54 + ,22 + ,65461 + ,82 + ,118612 + ,1403 + ,46 + ,54 + ,12 + ,30080 + ,90 + ,72880 + ,910 + ,33 + ,14 + ,19 + ,24094 + ,25 + ,65475 + ,616 + ,18 + ,16 + ,13 + ,69008 + ,60 + ,99643 + ,1407 + ,55 + ,33 + ,17 + ,54968 + ,61 + ,71965 + ,771 + ,35 + ,32 + ,15 + ,46090 + ,85 + ,77272 + ,766 + ,59 + ,21 + ,16 + ,27507 + ,43 + ,49289 + ,473 + ,19 + ,15 + ,24 + ,10672 + ,25 + ,135131 + ,1376 + ,66 + ,38 + ,15 + ,34029 + ,41 + ,108446 + ,1232 + ,60 + ,22 + ,17 + ,46300 + ,26 + ,89746 + ,1521 + ,36 + ,28 + ,18 + ,24760 + ,38 + ,44296 + ,572 + ,25 + ,10 + ,20 + ,18779 + ,12 + ,77648 + ,1059 + ,47 + ,31 + ,16 + ,21280 + ,29 + ,181528 + ,1544 + ,54 + ,32 + ,16 + ,40662 + ,49 + ,134019 + ,1230 + ,53 + ,32 + ,18 + ,28987 + ,46 + ,124064 + ,1206 + ,40 + ,43 + ,22 + ,22827 + ,41 + ,92630 + ,1205 + ,40 + ,27 + ,8 + ,18513 + ,31 + ,121848 + ,1255 + ,39 + ,37 + ,17 + ,30594 + ,41 + ,52915 + ,613 + ,14 + ,20 + ,18 + ,24006 + ,26 + ,81872 + ,721 + ,45 + ,32 + ,16 + ,27913 + ,23 + ,58981 + ,1109 + ,36 + ,0 + ,23 + ,42744 + ,14 + ,53515 + ,740 + ,28 + ,5 + ,22 + ,12934 + ,16 + ,60812 + ,1126 + ,44 + ,26 + ,13 + ,22574 + ,25 + ,56375 + ,728 + ,30 + ,10 + ,13 + ,41385 + ,21 + ,65490 + ,689 + ,22 + ,27 + ,16 + ,18653 + ,32 + ,80949 + ,592 + ,17 + ,11 + ,16 + ,18472 + ,9 + ,76302 + ,995 + ,31 + ,29 + ,20 + ,30976 + ,35 + ,104011 + ,1613 + ,55 + ,25 + ,22 + ,63339 + ,42 + ,98104 + ,2048 + ,54 + ,55 + ,17 + ,25568 + ,68 + ,67989 + ,705 + ,21 + ,23 + ,18 + ,33747 + ,32 + ,30989 + ,301 + ,14 + ,5 + ,17 + ,4154 + ,6 + ,135458 + ,1803 + ,81 + ,43 + ,12 + ,19474 + ,68 + ,73504 + ,799 + ,35 + ,23 + ,7 + ,35130 + ,33 + ,63123 + ,861 + ,43 + ,34 + ,17 + ,39067 + ,84 + ,61254 + ,1186 + ,46 + ,36 + ,14 + ,13310 + ,46 + ,74914 + ,1451 + ,30 + ,35 + ,23 + ,65892 + ,30 + ,31774 + ,628 + ,23 + ,0 + ,17 + ,4143 + ,0 + ,81437 + ,1161 + ,38 + ,37 + ,14 + ,28579 + ,36 + ,87186 + ,1463 + ,54 + ,28 + ,15 + ,51776 + ,47 + ,50090 + ,742 + ,20 + ,16 + ,17 + ,21152 + ,20 + ,65745 + ,979 + ,53 + ,26 + ,21 + ,38084 + ,50 + ,56653 + ,675 + ,45 + ,38 + ,18 + ,27717 + ,30 + ,158399 + ,1241 + ,39 + ,23 + ,18 + ,32928 + ,30 + ,46455 + ,676 + ,20 + ,22 + ,17 + ,11342 + ,34 + ,73624 + ,1049 + ,24 + ,30 + ,17 + ,19499 + ,33 + ,38395 + ,620 + ,31 + ,16 + ,16 + ,16380 + ,34 + ,91899 + ,1081 + ,35 + ,18 + ,15 + ,36874 + ,37 + ,139526 + ,1688 + ,151 + ,28 + ,21 + ,48259 + ,83 + ,52164 + ,736 + ,52 + ,32 + ,16 + ,16734 + ,32 + ,51567 + ,617 + ,30 + ,21 + ,14 + ,28207 + ,30 + ,70551 + ,812 + ,31 + ,23 + ,15 + ,30143 + ,43 + ,84856 + ,1051 + ,29 + ,29 + ,17 + ,41369 + ,41 + ,102538 + ,1656 + ,57 + ,50 + ,15 + ,45833 + ,51 + ,86678 + ,705 + ,40 + ,12 + ,15 + ,29156 + ,19 + ,85709 + ,945 + ,44 + ,21 + ,10 + ,35944 + ,37 + ,34662 + ,554 + ,25 + ,18 + ,6 + ,36278 + ,33 + ,150580 + ,1597 + ,77 + ,27 + ,22 + ,45588 + ,41 + ,99611 + ,982 + ,35 + ,41 + ,21 + ,45097 + ,54 + ,19349 + ,222 + ,11 + ,13 + ,1 + ,3895 + ,14 + ,99373 + ,1212 + ,63 + ,12 + ,18 + ,28394 + ,25 + ,86230 + ,1143 + ,44 + ,21 + ,17 + ,18632 + ,25 + ,30837 + ,435 + ,19 + ,8 + ,4 + ,2325 + ,8 + ,31706 + ,532 + ,13 + ,26 + ,10 + ,25139 + ,26 + ,89806 + ,882 + ,42 + ,27 + ,16 + ,27975 + ,20 + ,62088 + ,608 + ,38 + ,13 + ,16 + ,14483 + ,11 + ,40151 + ,459 + ,29 + ,16 + ,9 + ,13127 + ,14 + ,27634 + ,578 + ,20 + ,2 + ,16 + ,5839 + ,3 + ,76990 + ,826 + ,27 + ,42 + ,17 + ,24069 + ,40 + ,37460 + ,509 + ,20 + ,5 + ,7 + ,3738 + ,5 + ,54157 + ,717 + ,19 + ,37 + ,15 + ,18625 + ,38 + ,49862 + ,637 + ,37 + ,17 + ,14 + ,36341 + ,32 + ,84337 + ,857 + ,26 + ,38 + ,14 + ,24548 + ,41 + ,64175 + ,830 + ,42 + ,37 + ,18 + ,21792 + ,46 + ,59382 + ,652 + ,49 + ,29 + ,12 + ,26263 + ,47 + ,119308 + ,707 + ,30 + ,32 + ,16 + ,23686 + ,37 + ,76702 + ,954 + ,49 + ,35 + ,21 + ,49303 + ,51 + ,103425 + ,1461 + ,67 + ,17 + ,19 + ,25659 + ,49 + ,70344 + ,672 + ,28 + ,20 + ,16 + ,28904 + ,21 + ,43410 + ,778 + ,19 + ,7 + ,1 + ,2781 + ,1 + ,104838 + ,1141 + ,49 + ,46 + ,16 + ,29236 + ,44 + ,62215 + ,680 + ,27 + ,24 + ,10 + ,19546 + ,26 + ,69304 + ,1090 + ,30 + ,40 + ,19 + ,22818 + ,21 + ,53117 + ,616 + ,22 + ,3 + ,12 + ,32689 + ,4 + ,19764 + ,285 + ,12 + ,10 + ,2 + ,5752 + ,10 + ,86680 + ,1145 + ,31 + ,37 + ,14 + ,22197 + ,43 + ,84105 + ,733 + ,20 + ,17 + ,17 + ,20055 + ,34 + ,77945 + ,888 + ,20 + ,28 + ,19 + ,25272 + ,32 + ,89113 + ,849 + ,39 + ,19 + ,14 + ,82206 + ,20 + ,91005 + ,1182 + ,29 + ,29 + ,11 + ,32073 + ,34 + ,40248 + ,528 + ,16 + ,8 + ,4 + ,5444 + ,6 + ,64187 + ,642 + ,27 + ,10 + ,16 + ,20154 + ,12 + ,50857 + ,947 + ,21 + ,15 + ,20 + ,36944 + ,24 + ,56613 + ,819 + ,19 + ,15 + ,12 + ,8019 + ,16 + ,62792 + ,757 + ,35 + ,28 + ,15 + ,30884 + ,72 + ,72535 + ,894 + ,14 + ,17 + ,16 + ,19540 + ,27) + ,dim=c(7 + ,289) + ,dimnames=list(c('time_in_rfc' + ,'pageviews' + ,'logins' + ,'blogged_computations' + ,'compendiums_reviewed' + ,'totsize' + ,'tothyperlinks ') + ,1:289)) > y <- array(NA,dim=c(7,289),dimnames=list(c('time_in_rfc','pageviews','logins','blogged_computations','compendiums_reviewed','totsize','tothyperlinks '),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' > 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 Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Hmisc library by Frank E Harrell Jr Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview') to see overall documentation. NOTE:Hmisc no longer redefines [.factor to drop unused levels when subsetting. To get the old behavior of Hmisc type dropUnusedLevels(). Attaching package: 'Hmisc' The following object is masked from 'package:survival': untangle.specials The following objects 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] "time_in_rfc" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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]) 7176 7199 14688 17547 19349 19764 21054 22648 22938 24188 27634 1 1 1 1 1 1 1 1 1 1 1 30837 30989 31414 31706 31774 33170 34662 37460 38214 38395 40151 1 1 1 1 1 1 1 1 1 1 1 40248 41566 43287 43410 44296 46455 46660 46698 49289 49862 50090 1 1 1 1 1 1 1 1 1 1 1 50857 51567 52164 52746 52915 53117 53515 54157 56375 56613 56653 1 1 1 1 1 1 1 1 1 1 1 58981 59194 59382 60812 61254 61361 61857 62088 62215 62792 63123 1 1 1 1 1 1 1 1 1 1 1 64175 64187 65029 65475 65490 65745 67989 69304 70344 70551 71965 1 1 1 1 1 1 1 1 1 1 1 72535 72880 73504 73566 73624 74408 74914 76302 76702 76990 77272 1 1 1 1 1 1 1 1 1 1 1 77648 77945 78800 79619 79863 80949 80953 81240 81437 81872 82316 1 1 1 1 1 1 1 1 1 1 1 84105 84207 84337 84853 84856 85439 85574 85709 86230 86678 86680 1 1 1 1 1 1 1 1 1 1 1 87186 89113 89746 89806 91005 91735 91899 92499 92630 92661 95227 1 1 1 1 1 1 1 1 1 1 1 96560 97839 98104 98146 98866 99373 99466 99611 99643 99923 100750 1 1 1 1 1 1 1 1 1 1 1 101011 101097 101523 101645 102010 102538 103425 103597 104011 104389 104838 1 1 1 1 1 1 1 1 1 1 1 106408 108043 108446 111665 112611 116048 116408 118612 119016 119308 120221 1 1 1 1 1 1 1 1 1 1 1 120445 120982 121848 122774 123185 124064 124817 125930 128423 130585 131069 1 1 1 1 1 1 1 1 1 1 1 131698 132487 132943 133131 133328 133368 134019 135131 135458 135473 135649 1 1 1 1 1 1 1 1 1 1 1 135781 136084 139526 139942 140344 141722 143246 143756 144966 145790 148446 1 1 1 1 1 1 1 1 1 1 1 149061 149112 150580 150629 151101 152299 152474 152601 152871 153935 155754 1 1 1 1 1 1 1 1 1 1 1 158015 158399 162765 164709 165446 165543 167488 167542 168809 170266 172494 1 1 1 1 1 1 1 1 1 1 1 173260 173326 174184 174415 174724 175824 176508 177939 179321 180083 181528 1 1 1 1 1 1 1 1 1 1 1 181633 182079 182192 182613 182999 183167 184510 187559 187681 193339 194979 1 1 1 1 1 1 1 1 1 1 1 195838 196553 199476 201940 202925 204271 204713 206161 207176 209641 210767 1 1 1 1 1 1 1 1 1 1 1 210907 215147 215641 218946 220516 220801 221698 223632 224330 224549 225060 1 1 1 1 1 1 1 1 1 1 1 225548 229242 230964 232138 232317 233328 235454 235800 236785 237213 241066 1 1 1 1 1 1 1 1 1 1 1 243060 243199 243511 244052 244749 250047 250579 254488 256462 258873 260561 1 1 1 1 1 1 1 1 1 1 1 265318 265769 269651 271856 272458 275541 277965 286468 294424 299775 310839 1 1 1 1 1 1 1 1 1 1 1 311473 317394 324598 324799 325107 328107 329267 341570 344297 346485 351067 1 1 1 1 1 1 1 1 1 1 1 351619 362301 385534 1 1 1 > colnames(x) [1] "time_in_rfc" "pageviews" "logins" [4] "blogged_computations" "compendiums_reviewed" "totsize" [7] "tothyperlinks." > colnames(x)[par1] [1] "time_in_rfc" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/1xpkw1386535310.tab") + } + } > m Conditional inference tree with 13 terminal nodes Response: time_in_rfc Inputs: pageviews, logins, blogged_computations, compendiums_reviewed, totsize, tothyperlinks. Number of observations: 289 1) pageviews <= 1613; criterion = 1, statistic = 229.566 2) pageviews <= 1212; criterion = 1, statistic = 126.863 3) pageviews <= 800; criterion = 1, statistic = 72.955 4) pageviews <= 578; criterion = 1, statistic = 31.889 5) pageviews <= 391; criterion = 0.998, statistic = 13.203 6)* weights = 10 5) pageviews > 391 7)* weights = 15 4) pageviews > 578 8)* weights = 36 3) pageviews > 800 9) tothyperlinks. <= 59; criterion = 1, statistic = 24.861 10)* weights = 55 9) tothyperlinks. > 59 11)* weights = 9 2) pageviews > 1212 12) tothyperlinks. <= 47; criterion = 1, statistic = 27.915 13)* weights = 21 12) tothyperlinks. > 47 14) tothyperlinks. <= 96; criterion = 0.986, statistic = 9.225 15)* weights = 33 14) tothyperlinks. > 96 16)* weights = 16 1) pageviews > 1613 17) pageviews <= 2702; criterion = 1, statistic = 42.52 18) tothyperlinks. <= 83; criterion = 1, statistic = 21.471 19) totsize <= 32755; criterion = 0.951, statistic = 6.944 20)* weights = 7 19) totsize > 32755 21)* weights = 14 18) tothyperlinks. > 83 22) pageviews <= 2201; criterion = 0.964, statistic = 7.537 23)* weights = 40 22) pageviews > 2201 24)* weights = 17 17) pageviews > 2702 25)* weights = 16 > postscript(file="/var/fisher/rcomp/tmp/2o5cl1386535310.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/fisher/rcomp/tmp/3c1f21386535310.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 210907 170896.50 40010.5000 2 120982 124193.78 -3211.7778 3 176508 170896.50 5611.5000 4 179321 217375.42 -38054.4250 5 123185 124193.78 -1008.7778 6 52746 39424.13 13321.8667 7 385534 321098.06 64435.9375 8 33170 19387.40 13782.6000 9 101645 86007.40 15637.6000 10 149061 141926.97 7134.0303 11 165446 141926.97 23519.0303 12 237213 217375.42 19837.5750 13 173326 141926.97 31399.0303 14 133131 141926.97 -8795.9697 15 258873 217375.42 41497.5750 16 180083 141926.97 38156.0303 17 324799 321098.06 3700.9375 18 230964 217375.42 13588.5750 19 236785 217375.42 19409.5750 20 135473 124193.78 11279.2222 21 202925 217375.42 -14450.4250 22 215147 217375.42 -2228.4250 23 344297 252483.41 91813.5882 24 153935 141926.97 12008.0303 25 132943 170896.50 -37953.5000 26 174724 252483.41 -77759.4118 27 174415 217375.42 -42960.4250 28 225548 252483.41 -26935.4118 29 223632 217375.42 6256.5750 30 124817 141926.97 -17109.9697 31 221698 217375.42 4322.5750 32 210767 217375.42 -6608.4250 33 170266 170896.50 -630.5000 34 260561 217375.42 43185.5750 35 84853 86007.40 -1154.4000 36 294424 252483.41 41940.5882 37 101011 86007.40 15003.6000 38 215641 179384.00 36257.0000 39 325107 252483.41 72623.5882 40 7176 19387.40 -12211.4000 41 167542 141926.97 25615.0303 42 106408 86007.40 20400.6000 43 96560 116016.71 -19456.7143 44 265769 252483.41 13285.5882 45 269651 321098.06 -51447.0625 46 149112 141926.97 7185.0303 47 175824 179384.00 -3560.0000 48 152871 141926.97 10944.0303 49 111665 86007.40 25657.6000 50 116408 179384.00 -62976.0000 51 362301 321098.06 41202.9375 52 78800 86007.40 -7207.4000 53 183167 217375.42 -34208.4250 54 277965 321098.06 -43133.0625 55 150629 217375.42 -66746.4250 56 168809 170896.50 -2087.5000 57 24188 39424.13 -15236.1333 58 329267 252483.41 76783.5882 59 65029 60147.00 4882.0000 60 101097 86007.40 15089.6000 61 218946 252483.41 -33537.4118 62 244052 217375.42 26676.5750 63 341570 321098.06 20471.9375 64 103597 86007.40 17589.6000 65 233328 252483.41 -19155.4118 66 256462 217375.42 39086.5750 67 206161 179384.00 26777.0000 68 311473 321098.06 -9625.0625 69 235800 252483.41 -16683.4118 70 177939 179384.00 -1445.0000 71 207176 217375.42 -10199.4250 72 196553 170896.50 25656.5000 73 174184 141926.97 32257.0303 74 143246 170896.50 -27650.5000 75 187559 252483.41 -64924.4118 76 187681 217375.42 -29694.4250 77 119016 141926.97 -22910.9697 78 182192 217375.42 -35183.4250 79 73566 86007.40 -12441.4000 80 194979 217375.42 -22396.4250 81 167488 170896.50 -3408.5000 82 143756 170896.50 -27140.5000 83 275541 217375.42 58165.5750 84 243199 217375.42 25823.5750 85 182999 141926.97 41072.0303 86 135649 141926.97 -6277.9697 87 152299 141926.97 10372.0303 88 120221 141926.97 -21705.9697 89 346485 321098.06 25386.9375 90 145790 106787.48 39002.5238 91 193339 217375.42 -24036.4250 92 80953 86007.40 -5054.4000 93 122774 116016.71 6757.2857 94 130585 124193.78 6391.2222 95 112611 86007.40 26603.6000 96 286468 321098.06 -34630.0625 97 241066 179384.00 61682.0000 98 148446 252483.41 -104037.4118 99 204713 179384.00 25329.0000 100 182079 217375.42 -35296.4250 101 140344 141926.97 -1582.9697 102 220516 252483.41 -31967.4118 103 243060 217375.42 25684.5750 104 162765 170896.50 -8131.5000 105 182613 170896.50 11716.5000 106 232138 217375.42 14762.5750 107 265318 321098.06 -55780.0625 108 85574 106787.48 -21213.4762 109 310839 321098.06 -10259.0625 110 225060 217375.42 7684.5750 111 232317 217375.42 14941.5750 112 144966 141926.97 3039.0303 113 43287 60147.00 -16860.0000 114 155754 179384.00 -23630.0000 115 164709 170896.50 -6187.5000 116 201940 217375.42 -15435.4250 117 235454 217375.42 18078.5750 118 220801 179384.00 41417.0000 119 99466 86007.40 13458.6000 120 92661 106787.48 -14126.4762 121 133328 141926.97 -8598.9697 122 61361 86007.40 -24646.4000 123 125930 116016.71 9913.2857 124 100750 141926.97 -41176.9697 125 224549 170896.50 53652.5000 126 82316 86007.40 -3691.4000 127 102010 86007.40 16002.6000 128 101523 141926.97 -40403.9697 129 243511 217375.42 26135.5750 130 22938 19387.40 3550.6000 131 41566 60147.00 -18581.0000 132 152474 170896.50 -18422.5000 133 61857 39424.13 22432.8667 134 99923 116016.71 -16093.7143 135 132487 170896.50 -38409.5000 136 317394 252483.41 64910.5882 137 21054 19387.40 1666.6000 138 209641 217375.42 -7734.4250 139 22648 60147.00 -37499.0000 140 31414 39424.13 -8010.1333 141 46698 60147.00 -13449.0000 142 131698 179384.00 -47686.0000 143 91735 86007.40 5727.6000 144 244749 252483.41 -7734.4118 145 184510 141926.97 42583.0303 146 79863 106787.48 -26924.4762 147 128423 86007.40 42415.6000 148 97839 124193.78 -26354.7778 149 38214 39424.13 -1210.1333 150 151101 141926.97 9174.0303 151 272458 217375.42 55082.5750 152 172494 124193.78 48300.2222 153 108043 106787.48 1255.5238 154 328107 321098.06 7008.9375 155 250579 217375.42 33203.5750 156 351067 321098.06 29968.9375 157 158015 124193.78 33821.2222 158 98866 86007.40 12858.6000 159 85439 86007.40 -568.4000 160 229242 217375.42 11866.5750 161 351619 321098.06 30520.9375 162 84207 86007.40 -1800.4000 163 120445 141926.97 -21481.9697 164 324598 321098.06 3499.9375 165 131069 141926.97 -10857.9697 166 204271 170896.50 33374.5000 167 165543 217375.42 -51832.4250 168 141722 141926.97 -204.9697 169 116048 124193.78 -8145.7778 170 250047 179384.00 70663.0000 171 299775 321098.06 -21323.0625 172 195838 217375.42 -21537.4250 173 173260 179384.00 -6124.0000 174 254488 252483.41 2004.5882 175 104389 141926.97 -37537.9697 176 136084 106787.48 29296.5238 177 199476 217375.42 -17899.4250 178 92499 86007.40 6491.6000 179 224330 217375.42 6954.5750 180 135781 106787.48 28993.5238 181 74408 106787.48 -32379.4762 182 81240 106787.48 -25547.4762 183 14688 19387.40 -4699.4000 184 181633 217375.42 -35742.4250 185 271856 252483.41 19372.5882 186 7199 19387.40 -12188.4000 187 46660 39424.13 7235.8667 188 17547 19387.40 -1840.4000 189 133368 116016.71 17351.2857 190 95227 86007.40 9219.6000 191 152601 141926.97 10674.0303 192 98146 86007.40 12138.6000 193 79619 106787.48 -27168.4762 194 59194 106787.48 -47593.4762 195 139942 141926.97 -1984.9697 196 118612 141926.97 -23314.9697 197 72880 86007.40 -13127.4000 198 65475 60147.00 5328.0000 199 99643 141926.97 -42283.9697 200 71965 60147.00 11818.0000 201 77272 60147.00 17125.0000 202 49289 39424.13 9864.8667 203 135131 106787.48 28343.5238 204 108446 106787.48 1658.5238 205 89746 106787.48 -17041.4762 206 44296 39424.13 4871.8667 207 77648 86007.40 -8359.4000 208 181528 141926.97 39601.0303 209 134019 106787.48 27231.5238 210 124064 86007.40 38056.6000 211 92630 86007.40 6622.6000 212 121848 106787.48 15060.5238 213 52915 60147.00 -7232.0000 214 81872 60147.00 21725.0000 215 58981 86007.40 -27026.4000 216 53515 60147.00 -6632.0000 217 60812 86007.40 -25195.4000 218 56375 60147.00 -3772.0000 219 65490 60147.00 5343.0000 220 80949 60147.00 20802.0000 221 76302 86007.40 -9705.4000 222 104011 106787.48 -2776.4762 223 98104 116016.71 -17912.7143 224 67989 60147.00 7842.0000 225 30989 19387.40 11601.6000 226 135458 116016.71 19441.2857 227 73504 60147.00 13357.0000 228 63123 124193.78 -61070.7778 229 61254 86007.40 -24753.4000 230 74914 106787.48 -31873.4762 231 31774 60147.00 -28373.0000 232 81437 86007.40 -4570.4000 233 87186 106787.48 -19601.4762 234 50090 60147.00 -10057.0000 235 65745 86007.40 -20262.4000 236 56653 60147.00 -3494.0000 237 158399 106787.48 51611.5238 238 46455 60147.00 -13692.0000 239 73624 86007.40 -12383.4000 240 38395 60147.00 -21752.0000 241 91899 86007.40 5891.6000 242 139526 179384.00 -39858.0000 243 52164 60147.00 -7983.0000 244 51567 60147.00 -8580.0000 245 70551 86007.40 -15456.4000 246 84856 86007.40 -1151.4000 247 102538 179384.00 -76846.0000 248 86678 60147.00 26531.0000 249 85709 86007.40 -298.4000 250 34662 39424.13 -4762.1333 251 150580 106787.48 43792.5238 252 99611 86007.40 13603.6000 253 19349 19387.40 -38.4000 254 99373 86007.40 13365.6000 255 86230 86007.40 222.6000 256 30837 39424.13 -8587.1333 257 31706 39424.13 -7718.1333 258 89806 86007.40 3798.6000 259 62088 60147.00 1941.0000 260 40151 39424.13 726.8667 261 27634 39424.13 -11790.1333 262 76990 86007.40 -9017.4000 263 37460 39424.13 -1964.1333 264 54157 60147.00 -5990.0000 265 49862 60147.00 -10285.0000 266 84337 86007.40 -1670.4000 267 64175 86007.40 -21832.4000 268 59382 60147.00 -765.0000 269 119308 60147.00 59161.0000 270 76702 86007.40 -9305.4000 271 103425 141926.97 -38501.9697 272 70344 60147.00 10197.0000 273 43410 60147.00 -16737.0000 274 104838 86007.40 18830.6000 275 62215 60147.00 2068.0000 276 69304 86007.40 -16703.4000 277 53117 60147.00 -7030.0000 278 19764 19387.40 376.6000 279 86680 86007.40 672.6000 280 84105 60147.00 23958.0000 281 77945 86007.40 -8062.4000 282 89113 86007.40 3105.6000 283 91005 86007.40 4997.6000 284 40248 39424.13 823.8667 285 64187 60147.00 4040.0000 286 50857 86007.40 -35150.4000 287 56613 86007.40 -29394.4000 288 62792 60147.00 2645.0000 289 72535 86007.40 -13472.4000 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/fisher/rcomp/tmp/4c0ke1386535310.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/fisher/rcomp/tmp/5m4w41386535310.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/fisher/rcomp/tmp/6v9q51386535310.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/fisher/rcomp/tmp/7ho9v1386535310.tab") + } > > try(system("convert tmp/2o5cl1386535310.ps tmp/2o5cl1386535310.png",intern=TRUE)) character(0) > try(system("convert tmp/3c1f21386535310.ps tmp/3c1f21386535310.png",intern=TRUE)) character(0) > try(system("convert tmp/4c0ke1386535310.ps tmp/4c0ke1386535310.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 16.151 1.903 18.015