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(210907 + ,79 + ,81 + ,94 + ,56 + ,3 + ,1418 + ,112285 + ,120982 + ,58 + ,55 + ,103 + ,56 + ,4 + ,869 + ,84786 + ,176508 + ,60 + ,50 + ,93 + ,54 + ,12 + ,1530 + ,83123 + ,179321 + ,108 + ,125 + ,103 + ,89 + ,2 + ,2172 + ,101193 + ,123185 + ,49 + ,40 + ,51 + ,40 + ,1 + ,901 + ,38361 + ,52746 + ,0 + ,37 + ,70 + ,25 + ,3 + ,463 + ,68504 + ,385534 + ,121 + ,63 + ,91 + ,92 + ,0 + ,3201 + ,119182 + ,33170 + ,1 + ,44 + ,22 + ,18 + ,0 + ,371 + ,22807 + ,101645 + ,20 + ,88 + ,38 + ,63 + ,0 + ,1192 + ,17140 + ,149061 + ,43 + ,66 + ,93 + ,44 + ,5 + ,1583 + ,116174 + ,165446 + ,69 + ,57 + ,60 + ,33 + ,0 + ,1439 + ,57635 + ,237213 + ,78 + ,74 + ,123 + ,84 + ,0 + ,1764 + ,66198 + ,173326 + ,86 + ,49 + ,148 + ,88 + ,7 + ,1495 + ,71701 + ,133131 + ,44 + ,52 + ,90 + ,55 + ,7 + ,1373 + ,57793 + ,258873 + ,104 + ,88 + ,124 + ,60 + ,3 + ,2187 + ,80444 + ,180083 + ,63 + ,36 + ,70 + ,66 + ,9 + ,1491 + ,53855 + ,324799 + ,158 + ,108 + ,168 + ,154 + ,0 + ,4041 + ,97668 + ,230964 + ,102 + ,43 + ,115 + ,53 + ,4 + ,1706 + ,133824 + ,236785 + ,77 + ,75 + ,71 + ,119 + ,3 + ,2152 + ,101481 + ,135473 + ,82 + ,32 + ,66 + ,41 + ,0 + ,1036 + ,99645 + ,202925 + ,115 + ,44 + ,134 + ,61 + ,7 + ,1882 + ,114789 + ,215147 + ,101 + ,85 + ,117 + ,58 + ,0 + ,1929 + ,99052 + ,344297 + ,80 + ,86 + ,108 + ,75 + ,1 + ,2242 + ,67654 + ,153935 + ,50 + ,56 + ,84 + ,33 + ,5 + ,1220 + ,65553 + ,132943 + ,83 + ,50 + ,156 + ,40 + ,7 + ,1289 + ,97500 + ,174724 + ,123 + ,135 + ,120 + ,92 + ,0 + ,2515 + ,69112 + ,174415 + ,73 + ,63 + ,114 + ,100 + ,0 + ,2147 + ,82753 + ,225548 + ,81 + ,81 + ,94 + ,112 + ,5 + ,2352 + ,85323 + ,223632 + ,105 + ,52 + ,120 + ,73 + ,0 + ,1638 + ,72654 + ,124817 + ,47 + ,44 + ,81 + ,40 + ,0 + ,1222 + ,30727 + ,221698 + ,105 + ,113 + ,110 + ,45 + ,0 + ,1812 + ,77873 + ,210767 + ,94 + ,39 + ,133 + ,60 + ,3 + ,1677 + ,117478 + ,170266 + ,44 + ,73 + ,122 + ,62 + ,4 + ,1579 + ,74007 + ,260561 + ,114 + ,48 + ,158 + ,75 + ,1 + ,1731 + ,90183 + ,84853 + ,38 + ,33 + ,109 + ,31 + ,4 + ,807 + ,61542 + ,294424 + ,107 + ,59 + ,124 + ,77 + ,2 + ,2452 + ,101494 + ,101011 + ,30 + ,41 + ,39 + ,34 + ,0 + ,829 + ,27570 + ,215641 + ,71 + ,69 + ,92 + ,46 + ,0 + ,1940 + ,55813 + ,325107 + ,84 + ,64 + ,126 + ,99 + ,0 + ,2662 + ,79215 + ,7176 + ,0 + ,1 + ,0 + ,17 + ,0 + ,186 + ,1423 + ,167542 + ,59 + ,59 + ,70 + ,66 + ,2 + ,1499 + ,55461 + ,106408 + ,33 + ,32 + ,37 + ,30 + ,1 + ,865 + ,31081 + ,96560 + ,42 + ,129 + ,38 + ,76 + ,0 + ,1793 + ,22996 + ,265769 + ,96 + ,37 + ,120 + ,146 + ,2 + ,2527 + ,83122 + ,269651 + ,106 + ,31 + ,93 + ,67 + ,10 + ,2747 + ,70106 + ,149112 + ,56 + ,65 + ,95 + ,56 + ,6 + ,1324 + ,60578 + ,175824 + ,57 + ,107 + ,77 + ,107 + ,0 + ,2702 + ,39992 + ,152871 + ,59 + ,74 + ,90 + ,58 + ,5 + ,1383 + ,79892 + ,111665 + ,39 + ,54 + ,80 + ,34 + ,4 + ,1179 + ,49810 + ,116408 + ,34 + ,76 + ,31 + ,61 + ,1 + ,2099 + ,71570 + ,362301 + ,76 + ,715 + ,110 + ,119 + ,2 + ,4308 + ,100708 + ,78800 + ,20 + ,57 + ,66 + ,42 + ,2 + ,918 + ,33032 + ,183167 + ,91 + ,66 + ,138 + ,66 + ,0 + ,1831 + ,82875 + ,277965 + ,115 + ,106 + ,133 + ,89 + ,8 + ,3373 + ,139077 + ,150629 + ,85 + ,54 + ,113 + ,44 + ,3 + ,1713 + ,71595 + ,168809 + ,76 + ,32 + ,100 + ,66 + ,0 + ,1438 + ,72260 + ,24188 + ,8 + ,20 + ,7 + ,24 + ,0 + ,496 + ,5950 + ,329267 + ,79 + ,71 + ,140 + ,259 + ,8 + ,2253 + ,115762 + ,65029 + ,21 + ,21 + ,61 + ,17 + ,5 + ,744 + ,32551 + ,101097 + ,30 + ,70 + ,41 + ,64 + ,3 + ,1161 + ,31701 + ,218946 + ,76 + ,112 + ,96 + ,41 + ,1 + ,2352 + ,80670 + ,244052 + ,101 + ,66 + ,164 + ,68 + ,5 + ,2144 + ,143558 + ,341570 + ,94 + ,190 + ,78 + ,168 + ,1 + ,4691 + ,117105 + ,103597 + ,27 + ,66 + ,49 + ,43 + ,1 + ,1112 + ,23789 + ,233328 + ,92 + ,165 + ,102 + ,132 + ,5 + ,2694 + ,120733 + ,256462 + ,123 + ,56 + ,124 + ,105 + ,0 + ,1973 + ,105195 + ,206161 + ,75 + ,61 + ,99 + ,71 + ,12 + ,1769 + ,73107 + ,311473 + ,128 + ,53 + ,129 + ,112 + ,8 + ,3148 + ,132068 + ,235800 + ,105 + ,127 + ,62 + ,94 + ,8 + ,2474 + ,149193 + ,177939 + ,55 + ,63 + ,73 + ,82 + ,8 + ,2084 + ,46821 + ,207176 + ,56 + ,38 + ,114 + ,70 + ,8 + ,1954 + ,87011 + ,196553 + ,41 + ,50 + ,99 + ,57 + ,2 + ,1226 + ,95260 + ,174184 + ,72 + ,52 + ,70 + ,53 + ,0 + ,1389 + ,55183 + ,143246 + ,67 + ,42 + ,104 + ,103 + ,5 + ,1496 + ,106671 + ,187559 + ,75 + ,76 + ,116 + ,121 + ,8 + ,2269 + ,73511 + ,187681 + ,114 + ,67 + ,91 + ,62 + ,2 + ,1833 + ,92945 + ,119016 + ,118 + ,50 + ,74 + ,52 + ,5 + ,1268 + ,78664 + ,182192 + ,77 + ,53 + ,138 + ,52 + ,12 + ,1943 + ,70054 + ,73566 + ,22 + ,39 + ,67 + ,32 + ,6 + ,893 + ,22618 + ,194979 + ,66 + ,50 + ,151 + ,62 + ,7 + ,1762 + ,74011 + ,167488 + ,69 + ,77 + ,72 + ,45 + ,2 + ,1403 + ,83737 + ,143756 + ,105 + ,57 + ,120 + ,46 + ,0 + ,1425 + ,69094 + ,275541 + ,116 + ,73 + ,115 + ,63 + ,4 + ,1857 + ,93133 + ,243199 + ,88 + ,34 + ,105 + ,75 + ,3 + ,1840 + ,95536 + ,182999 + ,73 + ,39 + ,104 + ,88 + ,6 + ,1502 + ,225920 + ,135649 + ,99 + ,46 + ,108 + ,46 + ,2 + ,1441 + ,62133 + ,152299 + ,62 + ,63 + ,98 + ,53 + ,0 + ,1420 + ,61370 + ,120221 + ,53 + ,35 + ,69 + ,37 + ,1 + ,1416 + ,43836 + ,346485 + ,118 + ,106 + ,111 + ,90 + ,0 + ,2970 + ,106117 + ,145790 + ,30 + ,43 + ,99 + ,63 + ,5 + ,1317 + ,38692 + ,193339 + ,100 + ,47 + ,71 + ,78 + ,2 + ,1644 + ,84651 + ,80953 + ,49 + ,31 + ,27 + ,25 + ,0 + ,870 + ,56622 + ,122774 + ,24 + ,162 + ,69 + ,45 + ,0 + ,1654 + ,15986 + ,130585 + ,67 + ,57 + ,107 + ,46 + ,5 + ,1054 + ,95364 + ,112611 + ,46 + ,36 + ,73 + ,41 + ,0 + ,937 + ,26706 + ,286468 + ,57 + ,263 + ,107 + ,144 + ,1 + ,3004 + ,89691 + ,241066 + ,75 + ,78 + ,93 + ,82 + ,0 + ,2008 + ,67267 + ,148446 + ,135 + ,63 + ,129 + ,91 + ,1 + ,2547 + ,126846 + ,204713 + ,68 + ,54 + ,69 + ,71 + ,1 + ,1885 + ,41140 + ,182079 + ,124 + ,63 + ,118 + ,63 + ,2 + ,1626 + ,102860 + ,140344 + ,33 + ,77 + ,73 + ,53 + ,6 + ,1468 + ,51715 + ,220516 + ,98 + ,79 + ,119 + ,62 + ,1 + ,2445 + ,55801 + ,243060 + ,58 + ,110 + ,104 + ,63 + ,4 + ,1964 + ,111813 + ,162765 + ,68 + ,56 + ,107 + ,32 + ,2 + ,1381 + ,120293 + ,182613 + ,81 + ,56 + ,99 + ,39 + ,3 + ,1369 + ,138599 + ,232138 + ,131 + ,43 + ,90 + ,62 + ,0 + ,1659 + ,161647 + ,265318 + ,110 + ,111 + ,197 + ,117 + ,10 + ,2888 + ,115929 + ,85574 + ,37 + ,71 + ,36 + ,34 + ,0 + ,1290 + ,24266 + ,310839 + ,130 + ,62 + ,85 + ,92 + ,9 + ,2845 + ,162901 + ,225060 + ,93 + ,56 + ,139 + ,93 + ,7 + ,1982 + ,109825 + ,232317 + ,118 + ,74 + ,106 + ,54 + ,0 + ,1904 + ,129838 + ,144966 + ,39 + ,60 + ,50 + ,144 + ,0 + ,1391 + ,37510 + ,43287 + ,13 + ,43 + ,64 + ,14 + ,4 + ,602 + ,43750 + ,155754 + ,74 + ,68 + ,31 + ,61 + ,4 + ,1743 + ,40652 + ,164709 + ,81 + ,53 + ,63 + ,109 + ,0 + ,1559 + ,87771 + ,201940 + ,109 + ,87 + ,92 + ,38 + ,0 + ,2014 + ,85872 + ,235454 + ,151 + ,46 + ,106 + ,73 + ,0 + ,2143 + ,89275 + ,220801 + ,51 + ,105 + ,63 + ,75 + ,1 + ,2146 + ,44418 + ,99466 + ,28 + ,32 + ,69 + ,50 + ,0 + ,874 + ,192565 + ,92661 + ,40 + ,133 + ,41 + ,61 + ,1 + ,1590 + ,35232 + ,133328 + ,56 + ,79 + ,56 + ,55 + ,0 + ,1590 + ,40909 + ,61361 + ,27 + ,51 + ,25 + ,77 + ,0 + ,1210 + ,13294 + ,125930 + ,37 + ,207 + ,65 + ,75 + ,4 + ,2072 + ,32387 + ,100750 + ,83 + ,67 + ,93 + ,72 + ,0 + ,1281 + ,140867 + ,224549 + ,54 + ,47 + ,114 + ,50 + ,4 + ,1401 + ,120662 + ,82316 + ,27 + ,34 + ,38 + ,32 + ,4 + ,834 + ,21233 + ,102010 + ,28 + ,66 + ,44 + ,53 + ,3 + ,1105 + ,44332 + ,101523 + ,59 + ,76 + ,87 + ,42 + ,0 + ,1272 + ,61056 + ,243511 + ,133 + ,65 + ,110 + ,71 + ,0 + ,1944 + ,101338 + ,22938 + ,12 + ,9 + ,0 + ,10 + ,0 + ,391 + ,1168 + ,41566 + ,0 + ,42 + ,27 + ,35 + ,5 + ,761 + ,13497 + ,152474 + ,106 + ,45 + ,83 + ,65 + ,0 + ,1605 + ,65567 + ,61857 + ,23 + ,25 + ,30 + ,25 + ,4 + ,530 + ,25162 + ,99923 + ,44 + ,115 + ,80 + ,66 + ,0 + ,1988 + ,32334 + ,132487 + ,71 + ,97 + ,98 + ,41 + ,0 + ,1386 + ,40735 + ,317394 + ,116 + ,53 + ,82 + ,86 + ,1 + ,2395 + ,91413 + ,21054 + ,4 + ,2 + ,0 + ,16 + ,0 + ,387 + ,855 + ,209641 + ,62 + ,52 + ,60 + ,42 + ,5 + ,1742 + ,97068 + ,22648 + ,12 + ,44 + ,28 + ,19 + ,0 + ,620 + ,44339 + ,31414 + ,18 + ,22 + ,9 + ,19 + ,0 + ,449 + ,14116 + ,46698 + ,14 + ,35 + ,33 + ,45 + ,0 + ,800 + ,10288 + ,131698 + ,60 + ,74 + ,59 + ,65 + ,0 + ,1684 + ,65622 + ,91735 + ,7 + ,103 + ,49 + ,35 + ,0 + ,1050 + ,16563 + ,244749 + ,98 + ,144 + ,115 + ,95 + ,2 + ,2699 + ,76643 + ,184510 + ,64 + ,60 + ,140 + ,49 + ,7 + ,1606 + ,110681 + ,79863 + ,29 + ,134 + ,49 + ,37 + ,1 + ,1502 + ,29011 + ,128423 + ,32 + ,89 + ,120 + ,64 + ,8 + ,1204 + ,92696 + ,97839 + ,25 + ,42 + ,66 + ,38 + ,2 + ,1138 + ,94785 + ,38214 + ,16 + ,52 + ,21 + ,34 + ,0 + ,568 + ,8773 + ,151101 + ,48 + ,98 + ,124 + ,32 + ,2 + ,1459 + ,83209 + ,272458 + ,100 + ,99 + ,152 + ,65 + ,0 + ,2158 + ,93815 + ,172494 + ,46 + ,52 + ,139 + ,52 + ,0 + ,1111 + ,86687 + ,108043 + ,45 + ,29 + ,38 + ,62 + ,1 + ,1421 + ,34553 + ,328107 + ,129 + ,125 + ,144 + ,65 + ,3 + ,2833 + ,105547 + ,250579 + ,130 + ,106 + ,120 + ,83 + ,0 + ,1955 + ,103487 + ,351067 + ,136 + ,95 + ,160 + ,95 + ,3 + ,2922 + ,213688 + ,158015 + ,59 + ,40 + ,114 + ,29 + ,0 + ,1002 + ,71220 + ,98866 + ,25 + ,140 + ,39 + ,18 + ,0 + ,1060 + ,23517 + ,85439 + ,32 + ,43 + ,78 + ,33 + ,0 + ,956 + ,56926 + ,229242 + ,63 + ,128 + ,119 + ,247 + ,4 + ,2186 + ,91721 + ,351619 + ,95 + ,142 + ,141 + ,139 + ,4 + ,3604 + ,115168 + ,84207 + ,14 + ,73 + ,101 + ,29 + ,11 + ,1035 + ,111194 + ,120445 + ,36 + ,72 + ,56 + ,118 + ,0 + ,1417 + ,51009 + ,324598 + ,113 + ,128 + ,133 + ,110 + ,0 + ,3261 + ,135777 + ,131069 + ,47 + ,61 + ,83 + ,67 + ,4 + ,1587 + ,51513 + ,204271 + ,92 + ,73 + ,116 + ,42 + ,0 + ,1424 + ,74163 + ,165543 + ,70 + ,148 + ,90 + ,65 + ,1 + ,1701 + ,51633 + ,141722 + ,19 + ,64 + ,36 + ,94 + ,0 + ,1249 + ,75345 + ,116048 + ,50 + ,45 + ,50 + ,64 + ,0 + ,946 + ,33416 + ,250047 + ,41 + ,58 + ,61 + ,81 + ,0 + ,1926 + ,83305 + ,299775 + ,91 + ,97 + ,97 + ,95 + ,9 + ,3352 + ,98952 + ,195838 + ,111 + ,50 + ,98 + ,67 + ,1 + ,1641 + ,102372 + ,173260 + ,41 + ,37 + ,78 + ,63 + ,3 + ,2035 + ,37238 + ,254488 + ,120 + ,50 + ,117 + ,83 + ,10 + ,2312 + ,103772 + ,104389 + ,135 + ,105 + ,148 + ,45 + ,5 + ,1369 + ,123969 + ,136084 + ,27 + ,69 + ,41 + ,30 + ,0 + ,1577 + ,27142 + ,199476 + ,87 + ,46 + ,105 + ,70 + ,2 + ,2201 + ,135400 + ,92499 + ,25 + ,57 + ,55 + ,32 + ,0 + ,961 + ,21399 + ,224330 + ,131 + ,52 + ,132 + ,83 + ,1 + ,1900 + ,130115 + ,135781 + ,45 + ,98 + ,44 + ,31 + ,2 + ,1254 + ,24874 + ,74408 + ,29 + ,61 + ,21 + ,67 + ,4 + ,1335 + ,34988 + ,81240 + ,58 + ,89 + ,50 + ,66 + ,0 + ,1597 + ,45549 + ,14688 + ,4 + ,0 + ,0 + ,10 + ,0 + ,207 + ,6023 + ,181633 + ,47 + ,48 + ,73 + ,70 + ,2 + ,1645 + ,64466 + ,271856 + ,109 + ,91 + ,86 + ,103 + ,1 + ,2429 + ,54990 + ,7199 + ,7 + ,0 + ,0 + ,5 + ,0 + ,151 + ,1644 + ,46660 + ,12 + ,7 + ,13 + ,20 + ,0 + ,474 + ,6179 + ,17547 + ,0 + ,3 + ,4 + ,5 + ,0 + ,141 + ,3926 + ,133368 + ,37 + ,54 + ,57 + ,36 + ,1 + ,1639 + ,32755 + ,95227 + ,37 + ,70 + ,48 + ,34 + ,0 + ,872 + ,34777 + ,152601 + ,46 + ,36 + ,46 + ,48 + ,2 + ,1318 + ,73224 + ,98146 + ,15 + ,37 + ,48 + ,40 + ,0 + ,1018 + ,27114 + ,79619 + ,42 + ,123 + ,32 + ,43 + ,3 + ,1383 + ,20760 + ,59194 + ,7 + ,247 + ,68 + ,31 + ,6 + ,1314 + ,37636 + ,139942 + ,54 + ,46 + ,87 + ,42 + ,0 + ,1335 + ,65461 + ,118612 + ,54 + ,72 + ,43 + ,46 + ,2 + ,1403 + ,30080 + ,72880 + ,14 + ,41 + ,67 + ,33 + ,0 + ,910 + ,24094 + ,65475 + ,16 + ,24 + ,46 + ,18 + ,2 + ,616 + ,69008 + ,99643 + ,33 + ,45 + ,46 + ,55 + ,1 + ,1407 + ,54968 + ,71965 + ,32 + ,33 + ,56 + ,35 + ,1 + ,771 + ,46090 + ,77272 + ,21 + ,27 + ,48 + ,59 + ,2 + ,766 + ,27507 + ,49289 + ,15 + ,36 + ,44 + ,19 + ,1 + ,473 + ,10672 + ,135131 + ,38 + ,87 + ,60 + ,66 + ,0 + ,1376 + ,34029 + ,108446 + ,22 + ,90 + ,65 + ,60 + ,1 + ,1232 + ,46300 + ,89746 + ,28 + ,114 + ,55 + ,36 + ,3 + ,1521 + ,24760 + ,44296 + ,10 + ,31 + ,38 + ,25 + ,0 + ,572 + ,18779 + ,77648 + ,31 + ,45 + ,52 + ,47 + ,0 + ,1059 + ,21280 + ,181528 + ,32 + ,69 + ,60 + ,54 + ,0 + ,1544 + ,40662 + ,134019 + ,32 + ,51 + ,54 + ,53 + ,0 + ,1230 + ,28987 + ,124064 + ,43 + ,34 + ,86 + ,40 + ,1 + ,1206 + ,22827 + ,92630 + ,27 + ,60 + ,24 + ,40 + ,4 + ,1205 + ,18513 + ,121848 + ,37 + ,45 + ,52 + ,39 + ,0 + ,1255 + ,30594 + ,52915 + ,20 + ,54 + ,49 + ,14 + ,0 + ,613 + ,24006 + ,81872 + ,32 + ,25 + ,61 + ,45 + ,0 + ,721 + ,27913 + ,58981 + ,0 + ,38 + ,61 + ,36 + ,7 + ,1109 + ,42744 + ,53515 + ,5 + ,52 + ,81 + ,28 + ,2 + ,740 + ,12934 + ,60812 + ,26 + ,67 + ,43 + ,44 + ,0 + ,1126 + ,22574 + ,56375 + ,10 + ,74 + ,40 + ,30 + ,7 + ,728 + ,41385 + ,65490 + ,27 + ,38 + ,40 + ,22 + ,3 + ,689 + ,18653 + ,80949 + ,11 + ,30 + ,56 + ,17 + ,0 + ,592 + ,18472 + ,76302 + ,29 + ,26 + ,68 + ,31 + ,0 + ,995 + ,30976 + ,104011 + ,25 + ,67 + ,79 + ,55 + ,6 + ,1613 + ,63339 + ,98104 + ,55 + ,132 + ,47 + ,54 + ,2 + ,2048 + ,25568 + ,67989 + ,23 + ,42 + ,57 + ,21 + ,0 + ,705 + ,33747 + ,30989 + ,5 + ,35 + ,41 + ,14 + ,0 + ,301 + ,4154 + ,135458 + ,43 + ,118 + ,29 + ,81 + ,3 + ,1803 + ,19474 + ,73504 + ,23 + ,68 + ,3 + ,35 + ,0 + ,799 + ,35130 + ,63123 + ,34 + ,43 + ,60 + ,43 + ,1 + ,861 + ,39067 + ,61254 + ,36 + ,76 + ,30 + ,46 + ,1 + ,1186 + ,13310 + ,74914 + ,35 + ,64 + ,79 + ,30 + ,0 + ,1451 + ,65892 + ,31774 + ,0 + ,48 + ,47 + ,23 + ,1 + ,628 + ,4143 + ,81437 + ,37 + ,64 + ,40 + ,38 + ,0 + ,1161 + ,28579 + ,87186 + ,28 + ,56 + ,48 + ,54 + ,0 + ,1463 + ,51776 + ,50090 + ,16 + ,71 + ,36 + ,20 + ,0 + ,742 + ,21152 + ,65745 + ,26 + ,75 + ,42 + ,53 + ,0 + ,979 + ,38084 + ,56653 + ,38 + ,39 + ,49 + ,45 + ,0 + ,675 + ,27717 + ,158399 + ,23 + ,42 + ,57 + ,39 + ,0 + ,1241 + ,32928 + ,46455 + ,22 + ,39 + ,12 + ,20 + ,0 + ,676 + ,11342 + ,73624 + ,30 + ,93 + ,40 + ,24 + ,0 + ,1049 + ,19499 + ,38395 + ,16 + ,38 + ,43 + ,31 + ,0 + ,620 + ,16380 + ,91899 + ,18 + ,60 + ,33 + ,35 + ,0 + ,1081 + ,36874 + ,139526 + ,28 + ,71 + ,77 + ,151 + ,0 + ,1688 + ,48259 + ,52164 + ,32 + ,52 + ,43 + ,52 + ,0 + ,736 + ,16734 + ,51567 + ,21 + ,27 + ,45 + ,30 + ,2 + ,617 + ,28207 + ,70551 + ,23 + ,59 + ,47 + ,31 + ,0 + ,812 + ,30143 + ,84856 + ,29 + ,40 + ,43 + ,29 + ,1 + ,1051 + ,41369 + ,102538 + ,50 + ,79 + ,45 + ,57 + ,1 + ,1656 + ,45833 + ,86678 + ,12 + ,44 + ,50 + ,40 + ,0 + ,705 + ,29156 + ,85709 + ,21 + ,65 + ,35 + ,44 + ,0 + ,945 + ,35944 + ,34662 + ,18 + ,10 + ,7 + ,25 + ,0 + ,554 + ,36278 + ,150580 + ,27 + ,124 + ,71 + ,77 + ,0 + ,1597 + ,45588 + ,99611 + ,41 + ,81 + ,67 + ,35 + ,0 + ,982 + ,45097 + ,19349 + ,13 + ,15 + ,0 + ,11 + ,0 + ,222 + ,3895 + ,99373 + ,12 + ,92 + ,62 + ,63 + ,1 + ,1212 + ,28394 + ,86230 + ,21 + ,42 + ,54 + ,44 + ,0 + ,1143 + ,18632 + ,30837 + ,8 + ,10 + ,4 + ,19 + ,0 + ,435 + ,2325 + ,31706 + ,26 + ,24 + ,25 + ,13 + ,0 + ,532 + ,25139 + ,89806 + ,27 + ,64 + ,40 + ,42 + ,0 + ,882 + ,27975 + ,62088 + ,13 + ,45 + ,38 + ,38 + ,1 + ,608 + ,14483 + ,40151 + ,16 + ,22 + ,19 + ,29 + ,0 + ,459 + ,13127 + ,27634 + ,2 + ,56 + ,17 + ,20 + ,0 + ,578 + ,5839 + ,76990 + ,42 + ,94 + ,67 + ,27 + ,0 + ,826 + ,24069 + ,37460 + ,5 + ,19 + ,14 + ,20 + ,0 + ,509 + ,3738 + ,54157 + ,37 + ,35 + ,30 + ,19 + ,0 + ,717 + ,18625 + ,49862 + ,17 + ,32 + ,54 + ,37 + ,0 + ,637 + ,36341 + ,84337 + ,38 + ,35 + ,35 + ,26 + ,0 + ,857 + ,24548 + ,64175 + ,37 + ,48 + ,59 + ,42 + ,0 + ,830 + ,21792 + ,59382 + ,29 + ,49 + ,24 + ,49 + ,0 + ,652 + ,26263 + ,119308 + ,32 + ,48 + ,58 + ,30 + ,0 + ,707 + ,23686 + ,76702 + ,35 + ,62 + ,42 + ,49 + ,0 + ,954 + ,49303 + ,103425 + ,17 + ,96 + ,46 + ,67 + ,1 + ,1461 + ,25659 + ,70344 + ,20 + ,45 + ,61 + ,28 + ,0 + ,672 + ,28904 + ,43410 + ,7 + ,63 + ,3 + ,19 + ,0 + ,778 + ,2781 + ,104838 + ,46 + ,71 + ,52 + ,49 + ,1 + ,1141 + ,29236 + ,62215 + ,24 + ,26 + ,25 + ,27 + ,0 + ,680 + ,19546 + ,69304 + ,40 + ,48 + ,40 + ,30 + ,6 + ,1090 + ,22818 + ,53117 + ,3 + ,29 + ,32 + ,22 + ,3 + ,616 + ,32689 + ,19764 + ,10 + ,19 + ,4 + ,12 + ,1 + ,285 + ,5752 + ,86680 + ,37 + ,45 + ,49 + ,31 + ,2 + ,1145 + ,22197 + ,84105 + ,17 + ,45 + ,63 + ,20 + ,0 + ,733 + ,20055 + ,77945 + ,28 + ,67 + ,67 + ,20 + ,0 + ,888 + ,25272 + ,89113 + ,19 + ,30 + ,32 + ,39 + ,0 + ,849 + ,82206 + ,91005 + ,29 + ,36 + ,23 + ,29 + ,3 + ,1182 + ,32073 + ,40248 + ,8 + ,34 + ,7 + ,16 + ,1 + ,528 + ,5444 + ,64187 + ,10 + ,36 + ,54 + ,27 + ,0 + ,642 + ,20154 + ,50857 + ,15 + ,34 + ,37 + ,21 + ,0 + ,947 + ,36944 + ,56613 + ,15 + ,37 + ,35 + ,19 + ,1 + ,819 + ,8019 + ,62792 + ,28 + ,46 + ,51 + ,35 + ,0 + ,757 + ,30884 + ,72535 + ,17 + ,44 + ,39 + ,14 + ,0 + ,894 + ,19540) + ,dim=c(8 + ,289) + ,dimnames=list(c('time_in_rfc' + ,'blogged_computations' + ,'compendium_views_pr' + ,'feedback_messages_p120' + ,'logins' + ,'shared_compendiums' + ,'pageviews' + ,'totsize ') + ,1:289)) > y <- array(NA,dim=c(8,289),dimnames=list(c('time_in_rfc','blogged_computations','compendium_views_pr','feedback_messages_p120','logins','shared_compendiums','pageviews','totsize '),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] "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" "blogged_computations" "compendium_views_pr" [4] "feedback_messages_p120" "logins" "shared_compendiums" [7] "pageviews" "totsize..." > 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/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/1gok41324463650.tab") + } + } > m Conditional inference tree with 13 terminal nodes Response: time_in_rfc Inputs: blogged_computations, compendium_views_pr, feedback_messages_p120, logins, shared_compendiums, pageviews, totsize... 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) feedback_messages_p120 <= 78; criterion = 1, statistic = 21.715 10) blogged_computations <= 40; criterion = 0.996, statistic = 11.815 11)* weights = 47 10) blogged_computations > 40 12)* weights = 8 9) feedback_messages_p120 > 78 13)* weights = 9 2) pageviews > 1212 14) feedback_messages_p120 <= 56; criterion = 1, statistic = 16.046 15)* weights = 21 14) feedback_messages_p120 > 56 16) compendium_views_pr <= 81; criterion = 0.982, statistic = 9.066 17)* weights = 42 16) compendium_views_pr > 81 18)* weights = 7 1) pageviews > 1613 19) pageviews <= 2702; criterion = 1, statistic = 42.52 20) feedback_messages_p120 <= 80; criterion = 1, statistic = 22.554 21) totsize... <= 32755; criterion = 0.991, statistic = 10.271 22)* weights = 7 21) totsize... > 32755 23)* weights = 16 20) feedback_messages_p120 > 80 24)* weights = 55 19) pageviews > 2702 25)* weights = 16 > postscript(file="/var/wessaorg/rcomp/tmp/2gk2o1324463650.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/38nye1324463650.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 154722.12 56184.8810 2 120982 123920.89 -2938.8889 3 176508 154722.12 21785.8810 4 179321 228961.91 -49640.9091 5 123185 106213.62 16971.3750 6 52746 39424.13 13321.8667 7 385534 321098.06 64435.9375 8 33170 19387.40 13782.6000 9 101645 82620.30 19024.7021 10 149061 154722.12 -5661.1190 11 165446 154722.12 10723.8810 12 237213 228961.91 8251.0909 13 173326 154722.12 18603.8810 14 133131 154722.12 -21591.1190 15 258873 228961.91 29911.0909 16 180083 154722.12 25360.8810 17 324799 321098.06 3700.9375 18 230964 228961.91 2002.0909 19 236785 181606.62 55178.3750 20 135473 106213.62 29259.3750 21 202925 228961.91 -26036.9091 22 215147 228961.91 -13814.9091 23 344297 228961.91 115335.0909 24 153935 154722.12 -787.1190 25 132943 154722.12 -21779.1190 26 174724 228961.91 -54237.9091 27 174415 228961.91 -54546.9091 28 225548 228961.91 -3413.9091 29 223632 228961.91 -5329.9091 30 124817 154722.12 -29905.1190 31 221698 228961.91 -7263.9091 32 210767 228961.91 -18194.9091 33 170266 154722.12 15543.8810 34 260561 228961.91 31599.0909 35 84853 123920.89 -39067.8889 36 294424 228961.91 65462.0909 37 101011 82620.30 18390.7021 38 215641 228961.91 -13320.9091 39 325107 228961.91 96145.0909 40 7176 19387.40 -12211.4000 41 167542 154722.12 12819.8810 42 106408 82620.30 23787.7021 43 96560 116016.71 -19456.7143 44 265769 228961.91 36807.0909 45 269651 321098.06 -51447.0625 46 149112 154722.12 -5610.1190 47 175824 181606.62 -5782.6250 48 152871 154722.12 -1851.1190 49 111665 123920.89 -12255.8889 50 116408 181606.62 -65198.6250 51 362301 321098.06 41202.9375 52 78800 82620.30 -3820.2979 53 183167 228961.91 -45794.9091 54 277965 321098.06 -43133.0625 55 150629 228961.91 -78332.9091 56 168809 154722.12 14086.8810 57 24188 39424.13 -15236.1333 58 329267 228961.91 100305.0909 59 65029 60147.00 4882.0000 60 101097 82620.30 18476.7021 61 218946 228961.91 -10015.9091 62 244052 228961.91 15090.0909 63 341570 321098.06 20471.9375 64 103597 82620.30 20976.7021 65 233328 228961.91 4366.0909 66 256462 228961.91 27500.0909 67 206161 228961.91 -22800.9091 68 311473 321098.06 -9625.0625 69 235800 181606.62 54193.3750 70 177939 181606.62 -3667.6250 71 207176 228961.91 -21785.9091 72 196553 154722.12 41830.8810 73 174184 154722.12 19461.8810 74 143246 154722.12 -11476.1190 75 187559 228961.91 -41402.9091 76 187681 228961.91 -41280.9091 77 119016 154722.12 -35706.1190 78 182192 228961.91 -46769.9091 79 73566 82620.30 -9054.2979 80 194979 228961.91 -33982.9091 81 167488 154722.12 12765.8810 82 143756 154722.12 -10966.1190 83 275541 228961.91 46579.0909 84 243199 228961.91 14237.0909 85 182999 154722.12 28276.8810 86 135649 154722.12 -19073.1190 87 152299 154722.12 -2423.1190 88 120221 154722.12 -34501.1190 89 346485 321098.06 25386.9375 90 145790 154722.12 -8932.1190 91 193339 181606.62 11732.3750 92 80953 106213.62 -25260.6250 93 122774 116016.71 6757.2857 94 130585 123920.89 6664.1111 95 112611 106213.62 6397.3750 96 286468 321098.06 -34630.0625 97 241066 228961.91 12104.0909 98 148446 228961.91 -80515.9091 99 204713 181606.62 23106.3750 100 182079 228961.91 -46882.9091 101 140344 154722.12 -14378.1190 102 220516 228961.91 -8445.9091 103 243060 228961.91 14098.0909 104 162765 154722.12 8042.8810 105 182613 154722.12 27890.8810 106 232138 228961.91 3176.0909 107 265318 321098.06 -55780.0625 108 85574 110514.95 -24940.9524 109 310839 321098.06 -10259.0625 110 225060 228961.91 -3901.9091 111 232317 228961.91 3355.0909 112 144966 110514.95 34451.0476 113 43287 60147.00 -16860.0000 114 155754 181606.62 -25852.6250 115 164709 154722.12 9986.8810 116 201940 228961.91 -27021.9091 117 235454 228961.91 6492.0909 118 220801 181606.62 39194.3750 119 99466 82620.30 16845.7021 120 92661 110514.95 -17853.9524 121 133328 110514.95 22813.0476 122 61361 82620.30 -21259.2979 123 125930 116016.71 9913.2857 124 100750 154722.12 -53972.1190 125 224549 154722.12 69826.8810 126 82316 82620.30 -304.2979 127 102010 82620.30 19389.7021 128 101523 154722.12 -53199.1190 129 243511 228961.91 14549.0909 130 22938 19387.40 3550.6000 131 41566 60147.00 -18581.0000 132 152474 154722.12 -2248.1190 133 61857 39424.13 22432.8667 134 99923 116016.71 -16093.7143 135 132487 120189.71 12297.2857 136 317394 228961.91 88432.0909 137 21054 19387.40 1666.6000 138 209641 181606.62 28034.3750 139 22648 60147.00 -37499.0000 140 31414 39424.13 -8010.1333 141 46698 60147.00 -13449.0000 142 131698 181606.62 -49908.6250 143 91735 82620.30 9114.7021 144 244749 228961.91 15787.0909 145 184510 154722.12 29787.8810 146 79863 110514.95 -30651.9524 147 128423 123920.89 4502.1111 148 97839 82620.30 15218.7021 149 38214 39424.13 -1210.1333 150 151101 120189.71 30911.2857 151 272458 228961.91 43496.0909 152 172494 123920.89 48573.1111 153 108043 110514.95 -2471.9524 154 328107 321098.06 7008.9375 155 250579 228961.91 21617.0909 156 351067 321098.06 29968.9375 157 158015 123920.89 34094.1111 158 98866 82620.30 16245.7021 159 85439 82620.30 2818.7021 160 229242 228961.91 280.0909 161 351619 321098.06 30520.9375 162 84207 123920.89 -39713.8889 163 120445 110514.95 9930.0476 164 324598 321098.06 3499.9375 165 131069 154722.12 -23653.1190 166 204271 154722.12 49548.8810 167 165543 228961.91 -63418.9091 168 141722 110514.95 31207.0476 169 116048 106213.62 9834.3750 170 250047 181606.62 68440.3750 171 299775 321098.06 -21323.0625 172 195838 228961.91 -33123.9091 173 173260 181606.62 -8346.6250 174 254488 228961.91 25526.0909 175 104389 120189.71 -15800.7143 176 136084 110514.95 25569.0476 177 199476 228961.91 -29485.9091 178 92499 82620.30 9878.7021 179 224330 228961.91 -4631.9091 180 135781 110514.95 25266.0476 181 74408 110514.95 -36106.9524 182 81240 110514.95 -29274.9524 183 14688 19387.40 -4699.4000 184 181633 181606.62 26.3750 185 271856 228961.91 42894.0909 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 82620.30 12606.7021 191 152601 110514.95 42086.0476 192 98146 82620.30 15525.7021 193 79619 110514.95 -30895.9524 194 59194 120189.71 -60995.7143 195 139942 154722.12 -14780.1190 196 118612 110514.95 8097.0476 197 72880 82620.30 -9740.2979 198 65475 60147.00 5328.0000 199 99643 110514.95 -10871.9524 200 71965 60147.00 11818.0000 201 77272 60147.00 17125.0000 202 49289 39424.13 9864.8667 203 135131 120189.71 14941.2857 204 108446 120189.71 -11743.7143 205 89746 110514.95 -20768.9524 206 44296 39424.13 4871.8667 207 77648 82620.30 -4972.2979 208 181528 154722.12 26805.8810 209 134019 110514.95 23504.0476 210 124064 123920.89 143.1111 211 92630 82620.30 10009.7021 212 121848 110514.95 11333.0476 213 52915 60147.00 -7232.0000 214 81872 60147.00 21725.0000 215 58981 82620.30 -23639.2979 216 53515 60147.00 -6632.0000 217 60812 82620.30 -21808.2979 218 56375 60147.00 -3772.0000 219 65490 60147.00 5343.0000 220 80949 60147.00 20802.0000 221 76302 82620.30 -6318.2979 222 104011 154722.12 -50711.1190 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 82620.30 -19497.2979 229 61254 82620.30 -21366.2979 230 74914 154722.12 -79808.1190 231 31774 60147.00 -28373.0000 232 81437 82620.30 -1183.2979 233 87186 110514.95 -23328.9524 234 50090 60147.00 -10057.0000 235 65745 82620.30 -16875.2979 236 56653 60147.00 -3494.0000 237 158399 154722.12 3676.8810 238 46455 60147.00 -13692.0000 239 73624 82620.30 -8996.2979 240 38395 60147.00 -21752.0000 241 91899 82620.30 9278.7021 242 139526 181606.62 -42080.6250 243 52164 60147.00 -7983.0000 244 51567 60147.00 -8580.0000 245 70551 82620.30 -12069.2979 246 84856 82620.30 2235.7021 247 102538 181606.62 -79068.6250 248 86678 60147.00 26531.0000 249 85709 82620.30 3088.7021 250 34662 39424.13 -4762.1333 251 150580 120189.71 30390.2857 252 99611 106213.62 -6602.6250 253 19349 19387.40 -38.4000 254 99373 82620.30 16752.7021 255 86230 82620.30 3609.7021 256 30837 39424.13 -8587.1333 257 31706 39424.13 -7718.1333 258 89806 82620.30 7185.7021 259 62088 60147.00 1941.0000 260 40151 39424.13 726.8667 261 27634 39424.13 -11790.1333 262 76990 106213.62 -29223.6250 263 37460 39424.13 -1964.1333 264 54157 60147.00 -5990.0000 265 49862 60147.00 -10285.0000 266 84337 82620.30 1716.7021 267 64175 82620.30 -18445.2979 268 59382 60147.00 -765.0000 269 119308 60147.00 59161.0000 270 76702 82620.30 -5918.2979 271 103425 110514.95 -7089.9524 272 70344 60147.00 10197.0000 273 43410 60147.00 -16737.0000 274 104838 106213.62 -1375.6250 275 62215 60147.00 2068.0000 276 69304 82620.30 -13316.2979 277 53117 60147.00 -7030.0000 278 19764 19387.40 376.6000 279 86680 82620.30 4059.7021 280 84105 60147.00 23958.0000 281 77945 82620.30 -4675.2979 282 89113 82620.30 6492.7021 283 91005 82620.30 8384.7021 284 40248 39424.13 823.8667 285 64187 60147.00 4040.0000 286 50857 82620.30 -31763.2979 287 56613 82620.30 -26007.2979 288 62792 60147.00 2645.0000 289 72535 82620.30 -10085.2979 > 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/4daqk1324463650.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/5i1bu1324463650.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/6haul1324463650.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/7ri8u1324463650.tab") + } > > try(system("convert tmp/2gk2o1324463650.ps tmp/2gk2o1324463650.png",intern=TRUE)) character(0) > try(system("convert tmp/38nye1324463650.ps tmp/38nye1324463650.png",intern=TRUE)) character(0) > try(system("convert tmp/4daqk1324463650.ps tmp/4daqk1324463650.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.471 0.299 6.769