R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(1418 + ,210907 + ,56 + ,396 + ,81 + ,3 + ,79 + ,869 + ,120982 + ,56 + ,297 + ,55 + ,4 + ,58 + ,1530 + ,176508 + ,54 + ,559 + ,50 + ,12 + ,60 + ,2172 + ,179321 + ,89 + ,967 + ,125 + ,2 + ,108 + ,901 + ,123185 + ,40 + ,270 + ,40 + ,1 + ,49 + ,463 + ,52746 + ,25 + ,143 + ,37 + ,3 + ,0 + ,3201 + ,385534 + ,92 + ,1562 + ,63 + ,0 + ,121 + ,371 + ,33170 + ,18 + ,109 + ,44 + ,0 + ,1 + ,1192 + ,101645 + ,63 + ,371 + ,88 + ,0 + ,20 + ,1583 + ,149061 + ,44 + ,656 + ,66 + ,5 + ,43 + ,1439 + ,165446 + ,33 + ,511 + ,57 + ,0 + ,69 + ,1764 + ,237213 + ,84 + ,655 + ,74 + ,0 + ,78 + ,1495 + ,173326 + ,88 + ,465 + ,49 + ,7 + ,86 + ,1373 + ,133131 + ,55 + ,525 + ,52 + ,7 + ,44 + ,2187 + ,258873 + ,60 + ,885 + ,88 + ,3 + ,104 + ,1491 + ,180083 + ,66 + ,497 + ,36 + ,9 + ,63 + ,4041 + ,324799 + ,154 + ,1436 + ,108 + ,0 + ,158 + ,1706 + ,230964 + ,53 + ,612 + ,43 + ,4 + ,102 + ,2152 + ,236785 + ,119 + ,865 + ,75 + ,3 + ,77 + ,1036 + ,135473 + ,41 + ,385 + ,32 + ,0 + ,82 + ,1882 + ,202925 + ,61 + ,567 + ,44 + ,7 + ,115 + ,1929 + ,215147 + ,58 + ,639 + ,85 + ,0 + ,101 + ,2242 + ,344297 + ,75 + ,963 + ,86 + ,1 + ,80 + ,1220 + ,153935 + ,33 + ,398 + ,56 + ,5 + ,50 + ,1289 + ,132943 + ,40 + ,410 + ,50 + ,7 + ,83 + ,2515 + ,174724 + ,92 + ,966 + ,135 + ,0 + ,123 + ,2147 + ,174415 + ,100 + ,801 + ,63 + ,0 + ,73 + ,2352 + ,225548 + ,112 + ,892 + ,81 + ,5 + ,81 + ,1638 + ,223632 + ,73 + ,513 + ,52 + ,0 + ,105 + ,1222 + ,124817 + ,40 + ,469 + ,44 + ,0 + ,47 + ,1812 + ,221698 + ,45 + ,683 + ,113 + ,0 + ,105 + ,1677 + ,210767 + ,60 + ,643 + ,39 + ,3 + ,94 + ,1579 + ,170266 + ,62 + ,535 + ,73 + ,4 + ,44 + ,1731 + ,260561 + ,75 + ,625 + ,48 + ,1 + ,114 + ,807 + ,84853 + ,31 + ,264 + ,33 + ,4 + ,38 + ,2452 + ,294424 + ,77 + ,992 + ,59 + ,2 + ,107 + ,829 + ,101011 + ,34 + ,238 + ,41 + ,0 + ,30 + ,1940 + ,215641 + ,46 + ,818 + ,69 + ,0 + ,71 + ,2662 + ,325107 + ,99 + ,937 + ,64 + ,0 + ,84 + ,186 + ,7176 + ,17 + ,70 + ,1 + ,0 + ,0 + ,1499 + ,167542 + ,66 + ,507 + ,59 + ,2 + ,59 + ,865 + ,106408 + ,30 + ,260 + ,32 + ,1 + ,33 + ,1793 + ,96560 + ,76 + ,503 + ,129 + ,0 + ,42 + ,2527 + ,265769 + ,146 + ,927 + ,37 + ,2 + ,96 + ,2747 + ,269651 + ,67 + ,1269 + ,31 + ,10 + ,106 + ,1324 + ,149112 + ,56 + ,537 + ,65 + ,6 + ,56 + ,2702 + ,175824 + ,107 + ,910 + ,107 + ,0 + ,57 + ,1383 + ,152871 + ,58 + ,532 + ,74 + ,5 + ,59 + ,1179 + ,111665 + ,34 + ,345 + ,54 + ,4 + ,39 + ,2099 + ,116408 + ,61 + ,918 + ,76 + ,1 + ,34 + ,4308 + ,362301 + ,119 + ,1635 + ,715 + ,2 + ,76 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,2 + ,20 + ,1831 + ,183167 + ,66 + ,557 + ,66 + ,0 + ,91 + ,3373 + ,277965 + ,89 + ,1178 + ,106 + ,8 + ,115 + ,1713 + ,150629 + ,44 + ,740 + ,54 + ,3 + ,85 + ,1438 + ,168809 + ,66 + ,452 + ,32 + ,0 + ,76 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,0 + ,8 + ,2253 + ,329267 + ,259 + ,764 + ,71 + ,8 + ,79 + ,744 + ,65029 + ,17 + ,255 + ,21 + ,5 + ,21 + ,1161 + ,101097 + ,64 + ,454 + ,70 + ,3 + ,30 + ,2352 + ,218946 + ,41 + ,866 + ,112 + ,1 + ,76 + ,2144 + ,244052 + ,68 + ,574 + ,66 + ,5 + ,101 + ,4691 + ,341570 + ,168 + ,1276 + ,190 + ,1 + ,94 + ,1112 + ,103597 + ,43 + ,379 + ,66 + ,1 + ,27 + ,2694 + ,233328 + ,132 + ,825 + ,165 + ,5 + ,92 + ,1973 + ,256462 + ,105 + ,798 + ,56 + ,0 + ,123 + ,1769 + ,206161 + ,71 + ,663 + ,61 + ,12 + ,75 + ,3148 + ,311473 + ,112 + ,1069 + ,53 + ,8 + ,128 + ,2474 + ,235800 + ,94 + ,921 + ,127 + ,8 + ,105 + ,2084 + ,177939 + ,82 + ,858 + ,63 + ,8 + ,55 + ,1954 + ,207176 + ,70 + ,711 + ,38 + ,8 + ,56 + ,1226 + ,196553 + ,57 + ,503 + ,50 + ,2 + ,41 + ,1389 + ,174184 + ,53 + ,382 + ,52 + ,0 + ,72 + ,1496 + ,143246 + ,103 + ,464 + ,42 + ,5 + ,67 + ,2269 + ,187559 + ,121 + ,717 + ,76 + ,8 + ,75 + ,1833 + ,187681 + ,62 + ,690 + ,67 + ,2 + ,114 + ,1268 + ,119016 + ,52 + ,462 + ,50 + ,5 + ,118 + ,1943 + ,182192 + ,52 + ,657 + ,53 + ,12 + ,77 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,6 + ,22 + ,1762 + ,194979 + ,62 + ,577 + ,50 + ,7 + ,66 + ,1403 + ,167488 + ,45 + ,619 + ,77 + ,2 + ,69 + ,1425 + ,143756 + ,46 + ,479 + ,57 + ,0 + ,105 + ,1857 + ,275541 + ,63 + ,817 + ,73 + ,4 + ,116 + ,1840 + ,243199 + ,75 + ,752 + ,34 + ,3 + ,88 + ,1502 + ,182999 + ,88 + ,430 + ,39 + ,6 + ,73 + ,1441 + ,135649 + ,46 + ,451 + ,46 + ,2 + ,99 + ,1420 + ,152299 + ,53 + ,537 + ,63 + ,0 + ,62 + ,1416 + ,120221 + ,37 + ,519 + ,35 + ,1 + ,53 + ,2970 + ,346485 + ,90 + ,1000 + ,106 + ,0 + ,118 + ,1317 + ,145790 + ,63 + ,637 + ,43 + ,5 + ,30 + ,1644 + ,193339 + ,78 + ,465 + ,47 + ,2 + ,100 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,0 + ,49 + ,1654 + ,122774 + ,45 + ,711 + ,162 + ,0 + ,24 + ,1054 + ,130585 + ,46 + ,299 + ,57 + ,5 + ,67 + ,937 + ,112611 + ,41 + ,248 + ,36 + ,0 + ,46 + ,3004 + ,286468 + ,144 + ,1162 + ,263 + ,1 + ,57 + ,2008 + ,241066 + ,82 + ,714 + ,78 + ,0 + ,75 + ,2547 + ,148446 + ,91 + ,905 + ,63 + ,1 + ,135 + ,1885 + ,204713 + ,71 + ,649 + ,54 + ,1 + ,68 + ,1626 + ,182079 + ,63 + ,512 + ,63 + ,2 + ,124 + ,1468 + ,140344 + ,53 + ,472 + ,77 + ,6 + ,33 + ,2445 + ,220516 + ,62 + ,905 + ,79 + ,1 + ,98 + ,1964 + ,243060 + ,63 + ,786 + ,110 + ,4 + ,58 + ,1381 + ,162765 + ,32 + ,489 + ,56 + ,2 + ,68 + ,1369 + ,182613 + ,39 + ,479 + ,56 + ,3 + ,81 + ,1659 + ,232138 + ,62 + ,617 + ,43 + ,0 + ,131 + ,2888 + ,265318 + ,117 + ,925 + ,111 + ,10 + ,110 + ,1290 + ,85574 + ,34 + ,351 + ,71 + ,0 + ,37 + ,2845 + ,310839 + ,92 + ,1144 + ,62 + ,9 + ,130 + ,1982 + ,225060 + ,93 + ,669 + ,56 + ,7 + ,93 + ,1904 + ,232317 + ,54 + ,707 + ,74 + ,0 + ,118 + ,1391 + ,144966 + ,144 + ,458 + ,60 + ,0 + ,39 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,4 + ,13 + ,1743 + ,155754 + ,61 + ,599 + ,68 + ,4 + ,74 + ,1559 + ,164709 + ,109 + ,572 + ,53 + ,0 + ,81 + ,2014 + ,201940 + ,38 + ,897 + ,87 + ,0 + ,109 + ,2143 + ,235454 + ,73 + ,819 + ,46 + ,0 + ,151 + ,2146 + ,220801 + ,75 + ,720 + ,105 + ,1 + ,51 + ,874 + ,99466 + ,50 + ,273 + ,32 + ,0 + ,28 + ,1590 + ,92661 + ,61 + ,508 + ,133 + ,1 + ,40 + ,1590 + ,133328 + ,55 + ,506 + ,79 + ,0 + ,56 + ,1210 + ,61361 + ,77 + ,451 + ,51 + ,0 + ,27 + ,2072 + ,125930 + ,75 + ,699 + ,207 + ,4 + ,37 + ,1281 + ,100750 + ,72 + ,407 + ,67 + ,0 + ,83 + ,1401 + ,224549 + ,50 + ,465 + ,47 + ,4 + ,54 + ,834 + ,82316 + ,32 + ,245 + ,34 + ,4 + ,27 + ,1105 + ,102010 + ,53 + ,370 + ,66 + ,3 + ,28 + ,1272 + ,101523 + ,42 + ,316 + ,76 + ,0 + ,59 + ,1944 + ,243511 + ,71 + ,603 + ,65 + ,0 + ,133 + ,391 + ,22938 + ,10 + ,154 + ,9 + ,0 + ,12 + ,761 + ,41566 + ,35 + ,229 + ,42 + ,5 + ,0 + ,1605 + ,152474 + ,65 + ,577 + ,45 + ,0 + ,106 + ,530 + ,61857 + ,25 + ,192 + ,25 + ,4 + ,23 + ,1988 + ,99923 + ,66 + ,617 + ,115 + ,0 + ,44 + ,1386 + ,132487 + ,41 + ,411 + ,97 + ,0 + ,71 + ,2395 + ,317394 + ,86 + ,975 + ,53 + ,1 + ,116 + ,387 + ,21054 + ,16 + ,146 + ,2 + ,0 + ,4 + ,1742 + ,209641 + ,42 + ,705 + ,52 + ,5 + ,62 + ,620 + ,22648 + ,19 + ,184 + ,44 + ,0 + ,12 + ,449 + ,31414 + ,19 + ,200 + ,22 + ,0 + ,18 + ,800 + ,46698 + ,45 + ,274 + ,35 + ,0 + ,14 + ,1684 + ,131698 + ,65 + ,502 + ,74 + ,0 + ,60 + ,1050 + ,91735 + ,35 + ,382 + ,103 + ,0 + ,7 + ,2699 + ,244749 + ,95 + ,964 + ,144 + ,2 + ,98 + ,1606 + ,184510 + ,49 + ,537 + ,60 + ,7 + ,64 + ,1502 + ,79863 + ,37 + ,438 + ,134 + ,1 + ,29 + ,1204 + ,128423 + ,64 + ,369 + ,89 + ,8 + ,32 + ,1138 + ,97839 + ,38 + ,417 + ,42 + ,2 + ,25 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,0 + ,16 + ,1459 + ,151101 + ,32 + ,514 + ,98 + ,2 + ,48 + ,2158 + ,272458 + ,65 + ,822 + ,99 + ,0 + ,100 + ,1111 + ,172494 + ,52 + ,389 + ,52 + ,0 + ,46 + ,1421 + ,108043 + ,62 + ,466 + ,29 + ,1 + ,45 + ,2833 + ,328107 + ,65 + ,1255 + ,125 + ,3 + ,129 + ,1955 + ,250579 + ,83 + ,694 + ,106 + ,0 + ,130 + ,2922 + ,351067 + ,95 + ,1024 + ,95 + ,3 + ,136 + ,1002 + ,158015 + ,29 + ,400 + ,40 + ,0 + ,59 + ,1060 + ,98866 + ,18 + ,397 + ,140 + ,0 + ,25 + ,956 + ,85439 + ,33 + ,350 + ,43 + ,0 + ,32 + ,2186 + ,229242 + ,247 + ,719 + ,128 + ,4 + ,63 + ,3604 + ,351619 + ,139 + ,1277 + ,142 + ,4 + ,95 + ,1035 + ,84207 + ,29 + ,356 + ,73 + ,11 + ,14 + ,1417 + ,120445 + ,118 + ,457 + ,72 + ,0 + ,36 + ,3261 + ,324598 + ,110 + ,1402 + ,128 + ,0 + ,113 + ,1587 + ,131069 + ,67 + ,600 + ,61 + ,4 + ,47 + ,1424 + ,204271 + ,42 + ,480 + ,73 + ,0 + ,92 + ,1701 + ,165543 + ,65 + ,595 + ,148 + ,1 + ,70 + ,1249 + ,141722 + ,94 + ,436 + ,64 + ,0 + ,19 + ,946 + ,116048 + ,64 + ,230 + ,45 + ,0 + ,50 + ,1926 + ,250047 + ,81 + ,651 + ,58 + ,0 + ,41 + ,3352 + ,299775 + ,95 + ,1367 + ,97 + ,9 + ,91 + ,1641 + ,195838 + ,67 + ,564 + ,50 + ,1 + ,111 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,3 + ,41 + ,2312 + ,254488 + ,83 + ,747 + ,50 + ,10 + ,120 + ,1369 + ,104389 + ,45 + ,467 + ,105 + ,5 + ,135 + ,1577 + ,136084 + ,30 + ,671 + ,69 + ,0 + ,27 + ,2201 + ,199476 + ,70 + ,861 + ,46 + ,2 + ,87 + ,961 + ,92499 + ,32 + ,319 + ,57 + ,0 + ,25 + ,1900 + ,224330 + ,83 + ,612 + ,52 + ,1 + ,131 + ,1254 + ,135781 + ,31 + ,433 + ,98 + ,2 + ,45 + ,1335 + ,74408 + ,67 + ,434 + ,61 + ,4 + ,29 + ,1597 + ,81240 + ,66 + ,503 + ,89 + ,0 + ,58 + ,207 + ,14688 + ,10 + ,85 + ,0 + ,0 + ,4 + ,1645 + ,181633 + ,70 + ,564 + ,48 + ,2 + ,47 + ,2429 + ,271856 + ,103 + ,824 + ,91 + ,1 + ,109 + ,151 + ,7199 + ,5 + ,74 + ,0 + ,0 + ,7 + ,474 + ,46660 + ,20 + ,259 + ,7 + ,0 + ,12 + ,141 + ,17547 + ,5 + ,69 + ,3 + ,0 + ,0 + ,1639 + ,133368 + ,36 + ,535 + ,54 + ,1 + ,37 + ,872 + ,95227 + ,34 + ,239 + ,70 + ,0 + ,37 + ,1318 + ,152601 + ,48 + ,438 + ,36 + ,2 + ,46 + ,1018 + ,98146 + ,40 + ,459 + ,37 + ,0 + ,15 + ,1383 + ,79619 + ,43 + ,426 + ,123 + ,3 + ,42 + ,1314 + ,59194 + ,31 + ,288 + ,247 + ,6 + ,7 + ,1335 + ,139942 + ,42 + ,498 + ,46 + ,0 + ,54 + ,1403 + ,118612 + ,46 + ,454 + ,72 + ,2 + ,54 + ,910 + ,72880 + ,33 + ,376 + ,41 + ,0 + ,14 + ,616 + ,65475 + ,18 + ,225 + ,24 + ,2 + ,16 + ,1407 + ,99643 + ,55 + ,555 + ,45 + ,1 + ,33 + ,771 + ,71965 + ,35 + ,252 + ,33 + ,1 + ,32 + ,766 + ,77272 + ,59 + ,208 + ,27 + ,2 + ,21 + ,473 + ,49289 + ,19 + ,130 + ,36 + ,1 + ,15 + ,1376 + ,135131 + ,66 + ,481 + ,87 + ,0 + ,38 + ,1232 + ,108446 + ,60 + ,389 + ,90 + ,1 + ,22 + ,1521 + ,89746 + ,36 + ,565 + ,114 + ,3 + ,28 + ,572 + ,44296 + ,25 + ,173 + ,31 + ,0 + ,10 + ,1059 + ,77648 + ,47 + ,278 + ,45 + ,0 + ,31 + ,1544 + ,181528 + ,54 + ,609 + ,69 + ,0 + ,32 + ,1230 + ,134019 + ,53 + ,422 + ,51 + ,0 + ,32 + ,1206 + ,124064 + ,40 + ,445 + ,34 + ,1 + ,43 + ,1205 + ,92630 + ,40 + ,387 + ,60 + ,4 + ,27 + ,1255 + ,121848 + ,39 + ,339 + ,45 + ,0 + ,37 + ,613 + ,52915 + ,14 + ,181 + ,54 + ,0 + ,20 + ,721 + ,81872 + ,45 + ,245 + ,25 + ,0 + ,32 + ,1109 + ,58981 + ,36 + ,384 + ,38 + ,7 + ,0 + ,740 + ,53515 + ,28 + ,212 + ,52 + ,2 + ,5 + ,1126 + ,60812 + ,44 + ,399 + ,67 + ,0 + ,26 + ,728 + ,56375 + ,30 + ,229 + ,74 + ,7 + ,10 + ,689 + ,65490 + ,22 + ,224 + ,38 + ,3 + ,27 + ,592 + ,80949 + ,17 + ,203 + ,30 + ,0 + ,11 + ,995 + ,76302 + ,31 + ,333 + ,26 + ,0 + ,29 + ,1613 + ,104011 + ,55 + ,384 + ,67 + ,6 + ,25 + ,2048 + ,98104 + ,54 + ,636 + ,132 + ,2 + ,55 + ,705 + ,67989 + ,21 + ,185 + ,42 + ,0 + ,23 + ,301 + ,30989 + ,14 + ,93 + ,35 + ,0 + ,5 + ,1803 + ,135458 + ,81 + ,581 + ,118 + ,3 + ,43 + ,799 + ,73504 + ,35 + ,248 + ,68 + ,0 + ,23 + ,861 + ,63123 + ,43 + ,304 + ,43 + ,1 + ,34 + ,1186 + ,61254 + ,46 + ,344 + ,76 + ,1 + ,36 + ,1451 + ,74914 + ,30 + ,407 + ,64 + ,0 + ,35 + ,628 + ,31774 + ,23 + ,170 + ,48 + ,1 + ,0 + ,1161 + ,81437 + ,38 + ,312 + ,64 + ,0 + ,37 + ,1463 + ,87186 + ,54 + ,507 + ,56 + ,0 + ,28 + ,742 + ,50090 + ,20 + ,224 + ,71 + ,0 + ,16 + ,979 + ,65745 + ,53 + ,340 + ,75 + ,0 + ,26 + ,675 + ,56653 + ,45 + ,168 + ,39 + ,0 + ,38 + ,1241 + ,158399 + ,39 + ,443 + ,42 + ,0 + ,23 + ,676 + ,46455 + ,20 + ,204 + ,39 + ,0 + ,22 + ,1049 + ,73624 + ,24 + ,367 + ,93 + ,0 + ,30 + ,620 + ,38395 + ,31 + ,210 + ,38 + ,0 + ,16 + ,1081 + ,91899 + ,35 + ,335 + ,60 + ,0 + ,18 + ,1688 + ,139526 + ,151 + ,364 + ,71 + ,0 + ,28 + ,736 + ,52164 + ,52 + ,178 + ,52 + ,0 + ,32 + ,617 + ,51567 + ,30 + ,206 + ,27 + ,2 + ,21 + ,812 + ,70551 + ,31 + ,279 + ,59 + ,0 + ,23 + ,1051 + ,84856 + ,29 + ,387 + ,40 + ,1 + ,29 + ,1656 + ,102538 + ,57 + ,490 + ,79 + ,1 + ,50 + ,705 + ,86678 + ,40 + ,238 + ,44 + ,0 + ,12 + ,945 + ,85709 + ,44 + ,343 + ,65 + ,0 + ,21 + ,554 + ,34662 + ,25 + ,232 + ,10 + ,0 + ,18 + ,1597 + ,150580 + ,77 + ,530 + ,124 + ,0 + ,27 + ,982 + ,99611 + ,35 + ,291 + ,81 + ,0 + ,41 + ,222 + ,19349 + ,11 + ,67 + ,15 + ,0 + ,13 + ,1212 + ,99373 + ,63 + ,397 + ,92 + ,1 + ,12 + ,1143 + ,86230 + ,44 + ,467 + ,42 + ,0 + ,21 + ,435 + ,30837 + ,19 + ,178 + ,10 + ,0 + ,8 + ,532 + ,31706 + ,13 + ,175 + ,24 + ,0 + ,26 + ,882 + ,89806 + ,42 + ,299 + ,64 + ,0 + ,27 + ,608 + ,62088 + ,38 + ,154 + ,45 + ,1 + ,13 + ,459 + ,40151 + ,29 + ,106 + ,22 + ,0 + ,16 + ,578 + ,27634 + ,20 + ,189 + ,56 + ,0 + ,2 + ,826 + ,76990 + ,27 + ,194 + ,94 + ,0 + ,42 + ,509 + ,37460 + ,20 + ,135 + ,19 + ,0 + ,5 + ,717 + ,54157 + ,19 + ,201 + ,35 + ,0 + ,37 + ,637 + ,49862 + ,37 + ,207 + ,32 + ,0 + ,17 + ,857 + ,84337 + ,26 + ,280 + ,35 + ,0 + ,38 + ,830 + ,64175 + ,42 + ,260 + ,48 + ,0 + ,37 + ,652 + ,59382 + ,49 + ,227 + ,49 + ,0 + ,29 + ,707 + ,119308 + ,30 + ,239 + ,48 + ,0 + ,32 + ,954 + ,76702 + ,49 + ,333 + ,62 + ,0 + ,35 + ,1461 + ,103425 + ,67 + ,428 + ,96 + ,1 + ,17 + ,672 + ,70344 + ,28 + ,230 + ,45 + ,0 + ,20 + ,778 + ,43410 + ,19 + ,292 + ,63 + ,0 + ,7 + ,1141 + ,104838 + ,49 + ,350 + ,71 + ,1 + ,46 + ,680 + ,62215 + ,27 + ,186 + ,26 + ,0 + ,24 + ,1090 + ,69304 + ,30 + ,326 + ,48 + ,6 + ,40 + ,616 + ,53117 + ,22 + ,155 + ,29 + ,3 + ,3 + ,285 + ,19764 + ,12 + ,75 + ,19 + ,1 + ,10 + ,1145 + ,86680 + ,31 + ,361 + ,45 + ,2 + ,37 + ,733 + ,84105 + ,20 + ,261 + ,45 + ,0 + ,17 + ,888 + ,77945 + ,20 + ,299 + ,67 + ,0 + ,28 + ,849 + ,89113 + ,39 + ,300 + ,30 + ,0 + ,19 + ,1182 + ,91005 + ,29 + ,450 + ,36 + ,3 + ,29 + ,528 + ,40248 + ,16 + ,183 + ,34 + ,1 + ,8 + ,642 + ,64187 + ,27 + ,238 + ,36 + ,0 + ,10 + ,947 + ,50857 + ,21 + ,165 + ,34 + ,0 + ,15 + ,819 + ,56613 + ,19 + ,234 + ,37 + ,1 + ,15 + ,757 + ,62792 + ,35 + ,176 + ,46 + ,0 + ,28 + ,894 + ,72535 + ,14 + ,329 + ,44 + ,0 + ,17) + ,dim=c(7 + ,289) + ,dimnames=list(c('pageviews' + ,'time_in_rfc' + ,'logins' + ,'compendium_views_info' + ,'compendium_views_pr' + ,'shared_compendiums' + ,'blogged_computations') + ,1:289)) > y <- array(NA,dim=c(7,289),dimnames=list(c('pageviews','time_in_rfc','logins','compendium_views_info','compendium_views_pr','shared_compendiums','blogged_computations'),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 = '2' > par4 <- 'no' > par3 <- '3' > par2 <- 'none' > par1 <- '2' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., 2012, Recursive Partitioning (Regression Trees) (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_regression_trees.wasp/ > #Source of accompanying publication: > # > 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 object(s) 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(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] "pageviews" "time_in_rfc" "logins" [4] "compendium_views_info" "compendium_views_pr" "shared_compendiums" [7] "blogged_computations" > 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/1c9vz1355274422.tab") + } + } > m Conditional inference tree with 11 terminal nodes Response: time_in_rfc Inputs: pageviews, logins, compendium_views_info, compendium_views_pr, shared_compendiums, blogged_computations 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) blogged_computations <= 42; criterion = 1, statistic = 21.332 10)* weights = 53 9) blogged_computations > 42 11)* weights = 11 2) pageviews > 1212 12) compendium_views_pr <= 87; criterion = 0.999, statistic = 14.049 13)* weights = 57 12) compendium_views_pr > 87 14)* weights = 13 1) pageviews > 1613 15) compendium_views_info <= 967; criterion = 1, statistic = 46.779 16) blogged_computations <= 55; criterion = 1, statistic = 19.203 17)* weights = 15 16) blogged_computations > 55 18) logins <= 71; criterion = 0.954, statistic = 7.089 19)* weights = 32 18) logins > 71 20)* weights = 30 15) compendium_views_info > 967 21)* weights = 17 > postscript(file="/var/fisher/rcomp/tmp/241f61355274422.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/3lynl1355274422.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 145472.61 65434.38596 2 120982 125386.18 -4404.18182 3 176508 145472.61 31035.38596 4 179321 236424.60 -57103.60000 5 123185 125386.18 -2201.18182 6 52746 39424.13 13321.86667 7 385534 322592.29 62941.70588 8 33170 19387.40 13782.60000 9 101645 84318.92 17326.07547 10 149061 145472.61 3588.38596 11 165446 145472.61 19973.38596 12 237213 236424.60 788.40000 13 173326 145472.61 27853.38596 14 133131 145472.61 -12341.61404 15 258873 209288.16 49584.84375 16 180083 145472.61 34610.38596 17 324799 322592.29 2206.70588 18 230964 209288.16 21675.84375 19 236785 236424.60 360.40000 20 135473 125386.18 10086.81818 21 202925 209288.16 -6363.15625 22 215147 209288.16 5858.84375 23 344297 236424.60 107872.40000 24 153935 145472.61 8462.38596 25 132943 145472.61 -12529.61404 26 174724 236424.60 -61700.60000 27 174415 236424.60 -62009.60000 28 225548 236424.60 -10876.60000 29 223632 236424.60 -12792.60000 30 124817 145472.61 -20655.61404 31 221698 209288.16 12409.84375 32 210767 209288.16 1478.84375 33 170266 145472.61 24793.38596 34 260561 236424.60 24136.40000 35 84853 84318.92 534.07547 36 294424 322592.29 -28168.29412 37 101011 84318.92 16692.07547 38 215641 209288.16 6352.84375 39 325107 236424.60 88682.40000 40 7176 19387.40 -12211.40000 41 167542 145472.61 22069.38596 42 106408 84318.92 22089.07547 43 96560 144951.27 -48391.26667 44 265769 236424.60 29344.40000 45 269651 322592.29 -52941.29412 46 149112 145472.61 3639.38596 47 175824 236424.60 -60600.60000 48 152871 145472.61 7398.38596 49 111665 84318.92 27346.07547 50 116408 144951.27 -28543.26667 51 362301 322592.29 39708.70588 52 78800 84318.92 -5518.92453 53 183167 209288.16 -26121.15625 54 277965 322592.29 -44627.29412 55 150629 209288.16 -58659.15625 56 168809 145472.61 23336.38596 57 24188 39424.13 -15236.13333 58 329267 236424.60 92842.40000 59 65029 60147.00 4882.00000 60 101097 84318.92 16778.07547 61 218946 209288.16 9657.84375 62 244052 209288.16 34763.84375 63 341570 322592.29 18977.70588 64 103597 84318.92 19278.07547 65 233328 236424.60 -3096.60000 66 256462 236424.60 20037.40000 67 206161 209288.16 -3127.15625 68 311473 322592.29 -11119.29412 69 235800 236424.60 -624.60000 70 177939 144951.27 32987.73333 71 207176 209288.16 -2112.15625 72 196553 145472.61 51080.38596 73 174184 145472.61 28711.38596 74 143246 145472.61 -2226.61404 75 187559 236424.60 -48865.60000 76 187681 209288.16 -21607.15625 77 119016 145472.61 -26456.61404 78 182192 209288.16 -27096.15625 79 73566 84318.92 -10752.92453 80 194979 209288.16 -14309.15625 81 167488 145472.61 22015.38596 82 143756 145472.61 -1716.61404 83 275541 209288.16 66252.84375 84 243199 236424.60 6774.40000 85 182999 145472.61 37526.38596 86 135649 145472.61 -9823.61404 87 152299 145472.61 6826.38596 88 120221 145472.61 -25251.61404 89 346485 322592.29 23892.70588 90 145790 145472.61 317.38596 91 193339 236424.60 -43085.60000 92 80953 125386.18 -44433.18182 93 122774 144951.27 -22177.26667 94 130585 125386.18 5198.81818 95 112611 125386.18 -12775.18182 96 286468 322592.29 -36124.29412 97 241066 236424.60 4641.40000 98 148446 236424.60 -87978.60000 99 204713 209288.16 -4575.15625 100 182079 209288.16 -27209.15625 101 140344 145472.61 -5128.61404 102 220516 209288.16 11227.84375 103 243060 209288.16 33771.84375 104 162765 145472.61 17292.38596 105 182613 145472.61 37140.38596 106 232138 209288.16 22849.84375 107 265318 236424.60 28893.40000 108 85574 145472.61 -59898.61404 109 310839 322592.29 -11753.29412 110 225060 236424.60 -11364.60000 111 232317 209288.16 23028.84375 112 144966 145472.61 -506.61404 113 43287 60147.00 -16860.00000 114 155754 209288.16 -53534.15625 115 164709 145472.61 19236.38596 116 201940 209288.16 -7348.15625 117 235454 236424.60 -970.60000 118 220801 144951.27 75849.73333 119 99466 84318.92 15147.07547 120 92661 105271.69 -12610.69231 121 133328 145472.61 -12144.61404 122 61361 84318.92 -22957.92453 123 125930 144951.27 -19021.26667 124 100750 145472.61 -44722.61404 125 224549 145472.61 79076.38596 126 82316 84318.92 -2002.92453 127 102010 84318.92 17691.07547 128 101523 145472.61 -43949.61404 129 243511 209288.16 34222.84375 130 22938 19387.40 3550.60000 131 41566 60147.00 -18581.00000 132 152474 145472.61 7001.38596 133 61857 39424.13 22432.86667 134 99923 144951.27 -45028.26667 135 132487 105271.69 27215.30769 136 317394 322592.29 -5198.29412 137 21054 19387.40 1666.60000 138 209641 209288.16 352.84375 139 22648 60147.00 -37499.00000 140 31414 39424.13 -8010.13333 141 46698 60147.00 -13449.00000 142 131698 209288.16 -77590.15625 143 91735 84318.92 7416.07547 144 244749 236424.60 8324.40000 145 184510 145472.61 39037.38596 146 79863 105271.69 -25408.69231 147 128423 84318.92 44104.07547 148 97839 84318.92 13520.07547 149 38214 39424.13 -1210.13333 150 151101 105271.69 45829.30769 151 272458 209288.16 63169.84375 152 172494 125386.18 47107.81818 153 108043 145472.61 -37429.61404 154 328107 322592.29 5514.70588 155 250579 236424.60 14154.40000 156 351067 322592.29 28474.70588 157 158015 125386.18 32628.81818 158 98866 84318.92 14547.07547 159 85439 84318.92 1120.07547 160 229242 236424.60 -7182.60000 161 351619 322592.29 29026.70588 162 84207 84318.92 -111.92453 163 120445 145472.61 -25027.61404 164 324598 322592.29 2005.70588 165 131069 145472.61 -14403.61404 166 204271 145472.61 58798.38596 167 165543 209288.16 -43745.15625 168 141722 145472.61 -3750.61404 169 116048 125386.18 -9338.18182 170 250047 144951.27 105095.73333 171 299775 322592.29 -22817.29412 172 195838 209288.16 -13450.15625 173 173260 144951.27 28308.73333 174 254488 236424.60 18063.40000 175 104389 105271.69 -882.69231 176 136084 145472.61 -9388.61404 177 199476 209288.16 -9812.15625 178 92499 84318.92 8180.07547 179 224330 236424.60 -12094.60000 180 135781 105271.69 30509.30769 181 74408 145472.61 -71064.61404 182 81240 105271.69 -24031.69231 183 14688 19387.40 -4699.40000 184 181633 144951.27 36681.73333 185 271856 236424.60 35431.40000 186 7199 19387.40 -12188.40000 187 46660 39424.13 7235.86667 188 17547 19387.40 -1840.40000 189 133368 144951.27 -11583.26667 190 95227 84318.92 10908.07547 191 152601 145472.61 7128.38596 192 98146 84318.92 13827.07547 193 79619 105271.69 -25652.69231 194 59194 105271.69 -46077.69231 195 139942 145472.61 -5530.61404 196 118612 145472.61 -26860.61404 197 72880 84318.92 -11438.92453 198 65475 60147.00 5328.00000 199 99643 145472.61 -45829.61404 200 71965 60147.00 11818.00000 201 77272 60147.00 17125.00000 202 49289 39424.13 9864.86667 203 135131 145472.61 -10341.61404 204 108446 105271.69 3174.30769 205 89746 105271.69 -15525.69231 206 44296 39424.13 4871.86667 207 77648 84318.92 -6670.92453 208 181528 145472.61 36055.38596 209 134019 145472.61 -11453.61404 210 124064 125386.18 -1322.18182 211 92630 84318.92 8311.07547 212 121848 145472.61 -23624.61404 213 52915 60147.00 -7232.00000 214 81872 60147.00 21725.00000 215 58981 84318.92 -25337.92453 216 53515 60147.00 -6632.00000 217 60812 84318.92 -23506.92453 218 56375 60147.00 -3772.00000 219 65490 60147.00 5343.00000 220 80949 60147.00 20802.00000 221 76302 84318.92 -8016.92453 222 104011 145472.61 -41461.61404 223 98104 144951.27 -46847.26667 224 67989 60147.00 7842.00000 225 30989 19387.40 11601.60000 226 135458 144951.27 -9493.26667 227 73504 60147.00 13357.00000 228 63123 84318.92 -21195.92453 229 61254 84318.92 -23064.92453 230 74914 145472.61 -70558.61404 231 31774 60147.00 -28373.00000 232 81437 84318.92 -2881.92453 233 87186 145472.61 -58286.61404 234 50090 60147.00 -10057.00000 235 65745 84318.92 -18573.92453 236 56653 60147.00 -3494.00000 237 158399 145472.61 12926.38596 238 46455 60147.00 -13692.00000 239 73624 84318.92 -10694.92453 240 38395 60147.00 -21752.00000 241 91899 84318.92 7580.07547 242 139526 144951.27 -5425.26667 243 52164 60147.00 -7983.00000 244 51567 60147.00 -8580.00000 245 70551 84318.92 -13767.92453 246 84856 84318.92 537.07547 247 102538 144951.27 -42413.26667 248 86678 60147.00 26531.00000 249 85709 84318.92 1390.07547 250 34662 39424.13 -4762.13333 251 150580 105271.69 45308.30769 252 99611 84318.92 15292.07547 253 19349 19387.40 -38.40000 254 99373 84318.92 15054.07547 255 86230 84318.92 1911.07547 256 30837 39424.13 -8587.13333 257 31706 39424.13 -7718.13333 258 89806 84318.92 5487.07547 259 62088 60147.00 1941.00000 260 40151 39424.13 726.86667 261 27634 39424.13 -11790.13333 262 76990 84318.92 -7328.92453 263 37460 39424.13 -1964.13333 264 54157 60147.00 -5990.00000 265 49862 60147.00 -10285.00000 266 84337 84318.92 18.07547 267 64175 84318.92 -20143.92453 268 59382 60147.00 -765.00000 269 119308 60147.00 59161.00000 270 76702 84318.92 -7616.92453 271 103425 105271.69 -1846.69231 272 70344 60147.00 10197.00000 273 43410 60147.00 -16737.00000 274 104838 125386.18 -20548.18182 275 62215 60147.00 2068.00000 276 69304 84318.92 -15014.92453 277 53117 60147.00 -7030.00000 278 19764 19387.40 376.60000 279 86680 84318.92 2361.07547 280 84105 60147.00 23958.00000 281 77945 84318.92 -6373.92453 282 89113 84318.92 4794.07547 283 91005 84318.92 6686.07547 284 40248 39424.13 823.86667 285 64187 60147.00 4040.00000 286 50857 84318.92 -33461.92453 287 56613 84318.92 -27705.92453 288 62792 60147.00 2645.00000 289 72535 84318.92 -11783.92453 > 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/4gglc1355274422.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/5fzyv1355274422.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/6gqej1355274422.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/7mkxo1355274422.tab") + } > > try(system("convert tmp/241f61355274422.ps tmp/241f61355274422.png",intern=TRUE)) character(0) > try(system("convert tmp/3lynl1355274422.ps tmp/3lynl1355274422.png",intern=TRUE)) character(0) > try(system("convert tmp/4gglc1355274422.ps tmp/4gglc1355274422.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.580 0.621 8.190