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 + ,30 + ,869 + ,120982 + ,56 + ,297 + ,55 + ,4 + ,58 + ,28 + ,1530 + ,176508 + ,54 + ,559 + ,50 + ,12 + ,60 + ,38 + ,2172 + ,179321 + ,89 + ,967 + ,125 + ,2 + ,108 + ,30 + ,901 + ,123185 + ,40 + ,270 + ,40 + ,1 + ,49 + ,22 + ,463 + ,52746 + ,25 + ,143 + ,37 + ,3 + ,0 + ,26 + ,3201 + ,385534 + ,92 + ,1562 + ,63 + ,0 + ,121 + ,25 + ,371 + ,33170 + ,18 + ,109 + ,44 + ,0 + ,1 + ,18 + ,1192 + ,101645 + ,63 + ,371 + ,88 + ,0 + ,20 + ,11 + ,1583 + ,149061 + ,44 + ,656 + ,66 + ,5 + ,43 + ,26 + ,1439 + ,165446 + ,33 + ,511 + ,57 + ,0 + ,69 + ,25 + ,1764 + ,237213 + ,84 + ,655 + ,74 + ,0 + ,78 + ,38 + ,1495 + ,173326 + ,88 + ,465 + ,49 + ,7 + ,86 + ,44 + ,1373 + ,133131 + ,55 + ,525 + ,52 + ,7 + ,44 + ,30 + ,2187 + ,258873 + ,60 + ,885 + ,88 + ,3 + ,104 + ,40 + ,1491 + ,180083 + ,66 + ,497 + ,36 + ,9 + ,63 + ,34 + ,4041 + ,324799 + ,154 + ,1436 + ,108 + ,0 + ,158 + ,47 + ,1706 + ,230964 + ,53 + ,612 + ,43 + ,4 + ,102 + ,30 + ,2152 + ,236785 + ,119 + ,865 + ,75 + ,3 + ,77 + ,31 + ,1036 + ,135473 + ,41 + ,385 + ,32 + ,0 + ,82 + ,23 + ,1882 + ,202925 + ,61 + ,567 + ,44 + ,7 + ,115 + ,36 + ,1929 + ,215147 + ,58 + ,639 + ,85 + ,0 + ,101 + ,36 + ,2242 + ,344297 + ,75 + ,963 + ,86 + ,1 + ,80 + ,30 + ,1220 + ,153935 + ,33 + ,398 + ,56 + ,5 + ,50 + ,25 + ,1289 + ,132943 + ,40 + ,410 + ,50 + ,7 + ,83 + ,39 + ,2515 + ,174724 + ,92 + ,966 + ,135 + ,0 + ,123 + ,34 + ,2147 + ,174415 + ,100 + ,801 + ,63 + ,0 + ,73 + ,31 + ,2352 + ,225548 + ,112 + ,892 + ,81 + ,5 + ,81 + ,31 + ,1638 + ,223632 + ,73 + ,513 + ,52 + ,0 + ,105 + ,33 + ,1222 + ,124817 + ,40 + ,469 + ,44 + ,0 + ,47 + ,25 + ,1812 + ,221698 + ,45 + ,683 + ,113 + ,0 + ,105 + ,33 + ,1677 + ,210767 + ,60 + ,643 + ,39 + ,3 + ,94 + ,35 + ,1579 + ,170266 + ,62 + ,535 + ,73 + ,4 + ,44 + ,42 + ,1731 + ,260561 + ,75 + ,625 + ,48 + ,1 + ,114 + ,43 + ,807 + ,84853 + ,31 + ,264 + ,33 + ,4 + ,38 + ,30 + ,2452 + ,294424 + ,77 + ,992 + ,59 + ,2 + ,107 + ,33 + ,829 + ,101011 + ,34 + ,238 + ,41 + ,0 + ,30 + ,13 + ,1940 + ,215641 + ,46 + ,818 + ,69 + ,0 + ,71 + ,32 + ,2662 + ,325107 + ,99 + ,937 + ,64 + ,0 + ,84 + ,36 + ,186 + ,7176 + ,17 + ,70 + ,1 + ,0 + ,0 + ,0 + ,1499 + ,167542 + ,66 + ,507 + ,59 + ,2 + ,59 + ,28 + ,865 + ,106408 + ,30 + ,260 + ,32 + ,1 + ,33 + ,14 + ,1793 + ,96560 + ,76 + ,503 + ,129 + ,0 + ,42 + ,17 + ,2527 + ,265769 + ,146 + ,927 + ,37 + ,2 + ,96 + ,32 + ,2747 + ,269651 + ,67 + ,1269 + ,31 + ,10 + ,106 + ,30 + ,1324 + ,149112 + ,56 + ,537 + ,65 + ,6 + ,56 + ,35 + ,2702 + ,175824 + ,107 + ,910 + ,107 + ,0 + ,57 + ,20 + ,1383 + ,152871 + ,58 + ,532 + ,74 + ,5 + ,59 + ,28 + ,1179 + ,111665 + ,34 + ,345 + ,54 + ,4 + ,39 + ,28 + ,2099 + ,116408 + ,61 + ,918 + ,76 + ,1 + ,34 + ,39 + ,4308 + ,362301 + ,119 + ,1635 + ,715 + ,2 + ,76 + ,34 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,2 + ,20 + ,26 + ,1831 + ,183167 + ,66 + ,557 + ,66 + ,0 + ,91 + ,39 + ,3373 + ,277965 + ,89 + ,1178 + ,106 + ,8 + ,115 + ,39 + ,1713 + ,150629 + ,44 + ,740 + ,54 + ,3 + ,85 + ,33 + ,1438 + ,168809 + ,66 + ,452 + ,32 + ,0 + ,76 + ,28 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,0 + ,8 + ,4 + ,2253 + ,329267 + ,259 + ,764 + ,71 + ,8 + ,79 + ,39 + ,744 + ,65029 + ,17 + ,255 + ,21 + ,5 + ,21 + ,18 + ,1161 + ,101097 + ,64 + ,454 + ,70 + ,3 + ,30 + ,14 + ,2352 + ,218946 + ,41 + ,866 + ,112 + ,1 + ,76 + ,29 + ,2144 + ,244052 + ,68 + ,574 + ,66 + ,5 + ,101 + ,44 + ,4691 + ,341570 + ,168 + ,1276 + ,190 + ,1 + ,94 + ,21 + ,1112 + ,103597 + ,43 + ,379 + ,66 + ,1 + ,27 + ,16 + ,2694 + ,233328 + ,132 + ,825 + ,165 + ,5 + ,92 + ,28 + ,1973 + ,256462 + ,105 + ,798 + ,56 + ,0 + ,123 + ,35 + ,1769 + ,206161 + ,71 + ,663 + ,61 + ,12 + ,75 + ,28 + ,3148 + ,311473 + ,112 + ,1069 + ,53 + ,8 + ,128 + ,38 + ,2474 + ,235800 + ,94 + ,921 + ,127 + ,8 + ,105 + ,23 + ,2084 + ,177939 + ,82 + ,858 + ,63 + ,8 + ,55 + ,36 + ,1954 + ,207176 + ,70 + ,711 + ,38 + ,8 + ,56 + ,32 + ,1226 + ,196553 + ,57 + ,503 + ,50 + ,2 + ,41 + ,29 + ,1389 + ,174184 + ,53 + ,382 + ,52 + ,0 + ,72 + ,25 + ,1496 + ,143246 + ,103 + ,464 + ,42 + ,5 + ,67 + ,27 + ,2269 + ,187559 + ,121 + ,717 + ,76 + ,8 + ,75 + ,36 + ,1833 + ,187681 + ,62 + ,690 + ,67 + ,2 + ,114 + ,28 + ,1268 + ,119016 + ,52 + ,462 + ,50 + ,5 + ,118 + ,23 + ,1943 + ,182192 + ,52 + ,657 + ,53 + ,12 + ,77 + ,40 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,6 + ,22 + ,23 + ,1762 + ,194979 + ,62 + ,577 + ,50 + ,7 + ,66 + ,40 + ,1403 + ,167488 + ,45 + ,619 + ,77 + ,2 + ,69 + ,28 + ,1425 + ,143756 + ,46 + ,479 + ,57 + ,0 + ,105 + ,34 + ,1857 + ,275541 + ,63 + ,817 + ,73 + ,4 + ,116 + ,33 + ,1840 + ,243199 + ,75 + ,752 + ,34 + ,3 + ,88 + ,28 + ,1502 + ,182999 + ,88 + ,430 + ,39 + ,6 + ,73 + ,34 + ,1441 + ,135649 + ,46 + ,451 + ,46 + ,2 + ,99 + ,30 + ,1420 + ,152299 + ,53 + ,537 + ,63 + ,0 + ,62 + ,33 + ,1416 + ,120221 + ,37 + ,519 + ,35 + ,1 + ,53 + ,22 + ,2970 + ,346485 + ,90 + ,1000 + ,106 + ,0 + ,118 + ,38 + ,1317 + ,145790 + ,63 + ,637 + ,43 + ,5 + ,30 + ,26 + ,1644 + ,193339 + ,78 + ,465 + ,47 + ,2 + ,100 + ,35 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,0 + ,49 + ,8 + ,1654 + ,122774 + ,45 + ,711 + ,162 + ,0 + ,24 + ,24 + ,1054 + ,130585 + ,46 + ,299 + ,57 + ,5 + ,67 + ,29 + ,937 + ,112611 + ,41 + ,248 + ,36 + ,0 + ,46 + ,20 + ,3004 + ,286468 + ,144 + ,1162 + ,263 + ,1 + ,57 + ,29 + ,2008 + ,241066 + ,82 + ,714 + ,78 + ,0 + ,75 + ,45 + ,2547 + ,148446 + ,91 + ,905 + ,63 + ,1 + ,135 + ,37 + ,1885 + ,204713 + ,71 + ,649 + ,54 + ,1 + ,68 + ,33 + ,1626 + ,182079 + ,63 + ,512 + ,63 + ,2 + ,124 + ,33 + ,1468 + ,140344 + ,53 + ,472 + ,77 + ,6 + ,33 + ,25 + ,2445 + ,220516 + ,62 + ,905 + ,79 + ,1 + ,98 + ,32 + ,1964 + ,243060 + ,63 + ,786 + ,110 + ,4 + ,58 + ,29 + ,1381 + ,162765 + ,32 + ,489 + ,56 + ,2 + ,68 + ,28 + ,1369 + ,182613 + ,39 + ,479 + ,56 + ,3 + ,81 + ,28 + ,1659 + ,232138 + ,62 + ,617 + ,43 + ,0 + ,131 + ,31 + ,2888 + ,265318 + ,117 + ,925 + ,111 + ,10 + ,110 + ,52 + ,1290 + ,85574 + ,34 + ,351 + ,71 + ,0 + ,37 + ,21 + ,2845 + ,310839 + ,92 + ,1144 + ,62 + ,9 + ,130 + ,24 + ,1982 + ,225060 + ,93 + ,669 + ,56 + ,7 + ,93 + ,41 + ,1904 + ,232317 + ,54 + ,707 + ,74 + ,0 + ,118 + ,33 + ,1391 + ,144966 + ,144 + ,458 + ,60 + ,0 + ,39 + ,32 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,4 + ,13 + ,19 + ,1743 + ,155754 + ,61 + ,599 + ,68 + ,4 + ,74 + ,20 + ,1559 + ,164709 + ,109 + ,572 + ,53 + ,0 + ,81 + ,31 + ,2014 + ,201940 + ,38 + ,897 + ,87 + ,0 + ,109 + ,31 + ,2143 + ,235454 + ,73 + ,819 + ,46 + ,0 + ,151 + ,32 + ,2146 + ,220801 + ,75 + ,720 + ,105 + ,1 + ,51 + ,18 + ,874 + ,99466 + ,50 + ,273 + ,32 + ,0 + ,28 + ,23 + ,1590 + ,92661 + ,61 + ,508 + ,133 + ,1 + ,40 + ,17 + ,1590 + ,133328 + ,55 + ,506 + ,79 + ,0 + ,56 + ,20 + ,1210 + ,61361 + ,77 + ,451 + ,51 + ,0 + ,27 + ,12 + ,2072 + ,125930 + ,75 + ,699 + ,207 + ,4 + ,37 + ,17 + ,1281 + ,100750 + ,72 + ,407 + ,67 + ,0 + ,83 + ,30 + ,1401 + ,224549 + ,50 + ,465 + ,47 + ,4 + ,54 + ,31 + ,834 + ,82316 + ,32 + ,245 + ,34 + ,4 + ,27 + ,10 + ,1105 + ,102010 + ,53 + ,370 + ,66 + ,3 + ,28 + ,13 + ,1272 + ,101523 + ,42 + ,316 + ,76 + ,0 + ,59 + ,22 + ,1944 + ,243511 + ,71 + ,603 + ,65 + ,0 + ,133 + ,42 + ,391 + ,22938 + ,10 + ,154 + ,9 + ,0 + ,12 + ,1 + ,761 + ,41566 + ,35 + ,229 + ,42 + ,5 + ,0 + ,9 + ,1605 + ,152474 + ,65 + ,577 + ,45 + ,0 + ,106 + ,32 + ,530 + ,61857 + ,25 + ,192 + ,25 + ,4 + ,23 + ,11 + ,1988 + ,99923 + ,66 + ,617 + ,115 + ,0 + ,44 + ,25 + ,1386 + ,132487 + ,41 + ,411 + ,97 + ,0 + ,71 + ,36 + ,2395 + ,317394 + ,86 + ,975 + ,53 + ,1 + ,116 + ,31 + ,387 + ,21054 + ,16 + ,146 + ,2 + ,0 + ,4 + ,0 + ,1742 + ,209641 + ,42 + ,705 + ,52 + ,5 + ,62 + ,24 + ,620 + ,22648 + ,19 + ,184 + ,44 + ,0 + ,12 + ,13 + ,449 + ,31414 + ,19 + ,200 + ,22 + ,0 + ,18 + ,8 + ,800 + ,46698 + ,45 + ,274 + ,35 + ,0 + ,14 + ,13 + ,1684 + ,131698 + ,65 + ,502 + ,74 + ,0 + ,60 + ,19 + ,1050 + ,91735 + ,35 + ,382 + ,103 + ,0 + ,7 + ,18 + ,2699 + ,244749 + ,95 + ,964 + ,144 + ,2 + ,98 + ,33 + ,1606 + ,184510 + ,49 + ,537 + ,60 + ,7 + ,64 + ,40 + ,1502 + ,79863 + ,37 + ,438 + ,134 + ,1 + ,29 + ,22 + ,1204 + ,128423 + ,64 + ,369 + ,89 + ,8 + ,32 + ,38 + ,1138 + ,97839 + ,38 + ,417 + ,42 + ,2 + ,25 + ,24 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,0 + ,16 + ,8 + ,1459 + ,151101 + ,32 + ,514 + ,98 + ,2 + ,48 + ,35 + ,2158 + ,272458 + ,65 + ,822 + ,99 + ,0 + ,100 + ,43 + ,1111 + ,172494 + ,52 + ,389 + ,52 + ,0 + ,46 + ,43 + ,1421 + ,108043 + ,62 + ,466 + ,29 + ,1 + ,45 + ,14 + ,2833 + ,328107 + ,65 + ,1255 + ,125 + ,3 + ,129 + ,41 + ,1955 + ,250579 + ,83 + ,694 + ,106 + ,0 + ,130 + ,38 + ,2922 + ,351067 + ,95 + ,1024 + ,95 + ,3 + ,136 + ,45 + ,1002 + ,158015 + ,29 + ,400 + ,40 + ,0 + ,59 + ,31 + ,1060 + ,98866 + ,18 + ,397 + ,140 + ,0 + ,25 + ,13 + ,956 + ,85439 + ,33 + ,350 + ,43 + ,0 + ,32 + ,28 + ,2186 + ,229242 + ,247 + ,719 + ,128 + ,4 + ,63 + ,31 + ,3604 + ,351619 + ,139 + ,1277 + ,142 + ,4 + ,95 + ,40 + ,1035 + ,84207 + ,29 + ,356 + ,73 + ,11 + ,14 + ,30 + ,1417 + ,120445 + ,118 + ,457 + ,72 + ,0 + ,36 + ,16 + ,3261 + ,324598 + ,110 + ,1402 + ,128 + ,0 + ,113 + ,37 + ,1587 + ,131069 + ,67 + ,600 + ,61 + ,4 + ,47 + ,30 + ,1424 + ,204271 + ,42 + ,480 + ,73 + ,0 + ,92 + ,35 + ,1701 + ,165543 + ,65 + ,595 + ,148 + ,1 + ,70 + ,32 + ,1249 + ,141722 + ,94 + ,436 + ,64 + ,0 + ,19 + ,27 + ,946 + ,116048 + ,64 + ,230 + ,45 + ,0 + ,50 + ,20 + ,1926 + ,250047 + ,81 + ,651 + ,58 + ,0 + ,41 + ,18 + ,3352 + ,299775 + ,95 + ,1367 + ,97 + ,9 + ,91 + ,31 + ,1641 + ,195838 + ,67 + ,564 + ,50 + ,1 + ,111 + ,31 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,3 + ,41 + ,21 + ,2312 + ,254488 + ,83 + ,747 + ,50 + ,10 + ,120 + ,39 + ,1369 + ,104389 + ,45 + ,467 + ,105 + ,5 + ,135 + ,41 + ,1577 + ,136084 + ,30 + ,671 + ,69 + ,0 + ,27 + ,13 + ,2201 + ,199476 + ,70 + ,861 + ,46 + ,2 + ,87 + ,32 + ,961 + ,92499 + ,32 + ,319 + ,57 + ,0 + ,25 + ,18 + ,1900 + ,224330 + ,83 + ,612 + ,52 + ,1 + ,131 + ,39 + ,1254 + ,135781 + ,31 + ,433 + ,98 + ,2 + ,45 + ,14 + ,1335 + ,74408 + ,67 + ,434 + ,61 + ,4 + ,29 + ,7 + ,1597 + ,81240 + ,66 + ,503 + ,89 + ,0 + ,58 + ,17 + ,207 + ,14688 + ,10 + ,85 + ,0 + ,0 + ,4 + ,0 + ,1645 + ,181633 + ,70 + ,564 + ,48 + ,2 + ,47 + ,30 + ,2429 + ,271856 + ,103 + ,824 + ,91 + ,1 + ,109 + ,37 + ,151 + ,7199 + ,5 + ,74 + ,0 + ,0 + ,7 + ,0 + ,474 + ,46660 + ,20 + ,259 + ,7 + ,0 + ,12 + ,5 + ,141 + ,17547 + ,5 + ,69 + ,3 + ,0 + ,0 + ,1 + ,1639 + ,133368 + ,36 + ,535 + ,54 + ,1 + ,37 + ,16 + ,872 + ,95227 + ,34 + ,239 + ,70 + ,0 + ,37 + ,32 + ,1318 + ,152601 + ,48 + ,438 + ,36 + ,2 + ,46 + ,24 + ,1018 + ,98146 + ,40 + ,459 + ,37 + ,0 + ,15 + ,17 + ,1383 + ,79619 + ,43 + ,426 + ,123 + ,3 + ,42 + ,11 + ,1314 + ,59194 + ,31 + ,288 + ,247 + ,6 + ,7 + ,24 + ,1335 + ,139942 + ,42 + ,498 + ,46 + ,0 + ,54 + ,22 + ,1403 + ,118612 + ,46 + ,454 + ,72 + ,2 + ,54 + ,12 + ,910 + ,72880 + ,33 + ,376 + ,41 + ,0 + ,14 + ,19 + ,616 + ,65475 + ,18 + ,225 + ,24 + ,2 + ,16 + ,13 + ,1407 + ,99643 + ,55 + ,555 + ,45 + ,1 + ,33 + ,17 + ,771 + ,71965 + ,35 + ,252 + ,33 + ,1 + ,32 + ,15 + ,766 + ,77272 + ,59 + ,208 + ,27 + ,2 + ,21 + ,16 + ,473 + ,49289 + ,19 + ,130 + ,36 + ,1 + ,15 + ,24 + ,1376 + ,135131 + ,66 + ,481 + ,87 + ,0 + ,38 + ,15 + ,1232 + ,108446 + ,60 + ,389 + ,90 + ,1 + ,22 + ,17 + ,1521 + ,89746 + ,36 + ,565 + ,114 + ,3 + ,28 + ,18 + ,572 + ,44296 + ,25 + ,173 + ,31 + ,0 + ,10 + ,20 + ,1059 + ,77648 + ,47 + ,278 + ,45 + ,0 + ,31 + ,16 + ,1544 + ,181528 + ,54 + ,609 + ,69 + ,0 + ,32 + ,16 + ,1230 + ,134019 + ,53 + ,422 + ,51 + ,0 + ,32 + ,18 + ,1206 + ,124064 + ,40 + ,445 + ,34 + ,1 + ,43 + ,22 + ,1205 + ,92630 + ,40 + ,387 + ,60 + ,4 + ,27 + ,8 + ,1255 + ,121848 + ,39 + ,339 + ,45 + ,0 + ,37 + ,17 + ,613 + ,52915 + ,14 + ,181 + ,54 + ,0 + ,20 + ,18 + ,721 + ,81872 + ,45 + ,245 + ,25 + ,0 + ,32 + ,16 + ,1109 + ,58981 + ,36 + ,384 + ,38 + ,7 + ,0 + ,23 + ,740 + ,53515 + ,28 + ,212 + ,52 + ,2 + ,5 + ,22 + ,1126 + ,60812 + ,44 + ,399 + ,67 + ,0 + ,26 + ,13 + ,728 + ,56375 + ,30 + ,229 + ,74 + ,7 + ,10 + ,13 + ,689 + ,65490 + ,22 + ,224 + ,38 + ,3 + ,27 + ,16 + ,592 + ,80949 + ,17 + ,203 + ,30 + ,0 + ,11 + ,16 + ,995 + ,76302 + ,31 + ,333 + ,26 + ,0 + ,29 + ,20 + ,1613 + ,104011 + ,55 + ,384 + ,67 + ,6 + ,25 + ,22 + ,2048 + ,98104 + ,54 + ,636 + ,132 + ,2 + ,55 + ,17 + ,705 + ,67989 + ,21 + ,185 + ,42 + ,0 + ,23 + ,18 + ,301 + ,30989 + ,14 + ,93 + ,35 + ,0 + ,5 + ,17 + ,1803 + ,135458 + ,81 + ,581 + ,118 + ,3 + ,43 + ,12 + ,799 + ,73504 + ,35 + ,248 + ,68 + ,0 + ,23 + ,7 + ,861 + ,63123 + ,43 + ,304 + ,43 + ,1 + ,34 + ,17 + ,1186 + ,61254 + ,46 + ,344 + ,76 + ,1 + ,36 + ,14 + ,1451 + ,74914 + ,30 + ,407 + ,64 + ,0 + ,35 + ,23 + ,628 + ,31774 + ,23 + ,170 + ,48 + ,1 + ,0 + ,17 + ,1161 + ,81437 + ,38 + ,312 + ,64 + ,0 + ,37 + ,14 + ,1463 + ,87186 + ,54 + ,507 + ,56 + ,0 + ,28 + ,15 + ,742 + ,50090 + ,20 + ,224 + ,71 + ,0 + ,16 + ,17 + ,979 + ,65745 + ,53 + ,340 + ,75 + ,0 + ,26 + ,21 + ,675 + ,56653 + ,45 + ,168 + ,39 + ,0 + ,38 + ,18 + ,1241 + ,158399 + ,39 + ,443 + ,42 + ,0 + ,23 + ,18 + ,676 + ,46455 + ,20 + ,204 + ,39 + ,0 + ,22 + ,17 + ,1049 + ,73624 + ,24 + ,367 + ,93 + ,0 + ,30 + ,17 + ,620 + ,38395 + ,31 + ,210 + ,38 + ,0 + ,16 + ,16 + ,1081 + ,91899 + ,35 + ,335 + ,60 + ,0 + ,18 + ,15 + ,1688 + ,139526 + ,151 + ,364 + ,71 + ,0 + ,28 + ,21 + ,736 + ,52164 + ,52 + ,178 + ,52 + ,0 + ,32 + ,16 + ,617 + ,51567 + ,30 + ,206 + ,27 + ,2 + ,21 + ,14 + ,812 + ,70551 + ,31 + ,279 + ,59 + ,0 + ,23 + ,15 + ,1051 + ,84856 + ,29 + ,387 + ,40 + ,1 + ,29 + ,17 + ,1656 + ,102538 + ,57 + ,490 + ,79 + ,1 + ,50 + ,15 + ,705 + ,86678 + ,40 + ,238 + ,44 + ,0 + ,12 + ,15 + ,945 + ,85709 + ,44 + ,343 + ,65 + ,0 + ,21 + ,10 + ,554 + ,34662 + ,25 + ,232 + ,10 + ,0 + ,18 + ,6 + ,1597 + ,150580 + ,77 + ,530 + ,124 + ,0 + ,27 + ,22 + ,982 + ,99611 + ,35 + ,291 + ,81 + ,0 + ,41 + ,21 + ,222 + ,19349 + ,11 + ,67 + ,15 + ,0 + ,13 + ,1 + ,1212 + ,99373 + ,63 + ,397 + ,92 + ,1 + ,12 + ,18 + ,1143 + ,86230 + ,44 + ,467 + ,42 + ,0 + ,21 + ,17 + ,435 + ,30837 + ,19 + ,178 + ,10 + ,0 + ,8 + ,4 + ,532 + ,31706 + ,13 + ,175 + ,24 + ,0 + ,26 + ,10 + ,882 + ,89806 + ,42 + ,299 + ,64 + ,0 + ,27 + ,16 + ,608 + ,62088 + ,38 + ,154 + ,45 + ,1 + ,13 + ,16 + ,459 + ,40151 + ,29 + ,106 + ,22 + ,0 + ,16 + ,9 + ,578 + ,27634 + ,20 + ,189 + ,56 + ,0 + ,2 + ,16 + ,826 + ,76990 + ,27 + ,194 + ,94 + ,0 + ,42 + ,17 + ,509 + ,37460 + ,20 + ,135 + ,19 + ,0 + ,5 + ,7 + ,717 + ,54157 + ,19 + ,201 + ,35 + ,0 + ,37 + ,15 + ,637 + ,49862 + ,37 + ,207 + ,32 + ,0 + ,17 + ,14 + ,857 + ,84337 + ,26 + ,280 + ,35 + ,0 + ,38 + ,14 + ,830 + ,64175 + ,42 + ,260 + ,48 + ,0 + ,37 + ,18 + ,652 + ,59382 + ,49 + ,227 + ,49 + ,0 + ,29 + ,12 + ,707 + ,119308 + ,30 + ,239 + ,48 + ,0 + ,32 + ,16 + ,954 + ,76702 + ,49 + ,333 + ,62 + ,0 + ,35 + ,21 + ,1461 + ,103425 + ,67 + ,428 + ,96 + ,1 + ,17 + ,19 + ,672 + ,70344 + ,28 + ,230 + ,45 + ,0 + ,20 + ,16 + ,778 + ,43410 + ,19 + ,292 + ,63 + ,0 + ,7 + ,1 + ,1141 + ,104838 + ,49 + ,350 + ,71 + ,1 + ,46 + ,16 + ,680 + ,62215 + ,27 + ,186 + ,26 + ,0 + ,24 + ,10 + ,1090 + ,69304 + ,30 + ,326 + ,48 + ,6 + ,40 + ,19 + ,616 + ,53117 + ,22 + ,155 + ,29 + ,3 + ,3 + ,12 + ,285 + ,19764 + ,12 + ,75 + ,19 + ,1 + ,10 + ,2 + ,1145 + ,86680 + ,31 + ,361 + ,45 + ,2 + ,37 + ,14 + ,733 + ,84105 + ,20 + ,261 + ,45 + ,0 + ,17 + ,17 + ,888 + ,77945 + ,20 + ,299 + ,67 + ,0 + ,28 + ,19 + ,849 + ,89113 + ,39 + ,300 + ,30 + ,0 + ,19 + ,14 + ,1182 + ,91005 + ,29 + ,450 + ,36 + ,3 + ,29 + ,11 + ,528 + ,40248 + ,16 + ,183 + ,34 + ,1 + ,8 + ,4 + ,642 + ,64187 + ,27 + ,238 + ,36 + ,0 + ,10 + ,16 + ,947 + ,50857 + ,21 + ,165 + ,34 + ,0 + ,15 + ,20 + ,819 + ,56613 + ,19 + ,234 + ,37 + ,1 + ,15 + ,12 + ,757 + ,62792 + ,35 + ,176 + ,46 + ,0 + ,28 + ,15 + ,894 + ,72535 + ,14 + ,329 + ,44 + ,0 + ,17 + ,16) + ,dim=c(8 + ,289) + ,dimnames=list(c('pageviews' + ,'time_in_rfc' + ,'logins' + ,'compendium_views_info' + ,'compendium_views_pr' + ,'shared_compendiums' + ,'blogged_computations' + ,'compendiums_reviewed') + ,1:289)) > y <- array(NA,dim=c(8,289),dimnames=list(c('pageviews','time_in_rfc','logins','compendium_views_info','compendium_views_pr','shared_compendiums','blogged_computations','compendiums_reviewed'),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 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] "pageviews" > x[,par1] [1] 1418 869 1530 2172 901 463 3201 371 1192 1583 1439 1764 1495 1373 2187 [16] 1491 4041 1706 2152 1036 1882 1929 2242 1220 1289 2515 2147 2352 1638 1222 [31] 1812 1677 1579 1731 807 2452 829 1940 2662 186 1499 865 1793 2527 2747 [46] 1324 2702 1383 1179 2099 4308 918 1831 3373 1713 1438 496 2253 744 1161 [61] 2352 2144 4691 1112 2694 1973 1769 3148 2474 2084 1954 1226 1389 1496 2269 [76] 1833 1268 1943 893 1762 1403 1425 1857 1840 1502 1441 1420 1416 2970 1317 [91] 1644 870 1654 1054 937 3004 2008 2547 1885 1626 1468 2445 1964 1381 1369 [106] 1659 2888 1290 2845 1982 1904 1391 602 1743 1559 2014 2143 2146 874 1590 [121] 1590 1210 2072 1281 1401 834 1105 1272 1944 391 761 1605 530 1988 1386 [136] 2395 387 1742 620 449 800 1684 1050 2699 1606 1502 1204 1138 568 1459 [151] 2158 1111 1421 2833 1955 2922 1002 1060 956 2186 3604 1035 1417 3261 1587 [166] 1424 1701 1249 946 1926 3352 1641 2035 2312 1369 1577 2201 961 1900 1254 [181] 1335 1597 207 1645 2429 151 474 141 1639 872 1318 1018 1383 1314 1335 [196] 1403 910 616 1407 771 766 473 1376 1232 1521 572 1059 1544 1230 1206 [211] 1205 1255 613 721 1109 740 1126 728 689 592 995 1613 2048 705 301 [226] 1803 799 861 1186 1451 628 1161 1463 742 979 675 1241 676 1049 620 [241] 1081 1688 736 617 812 1051 1656 705 945 554 1597 982 222 1212 1143 [256] 435 532 882 608 459 578 826 509 717 637 857 830 652 707 954 [271] 1461 672 778 1141 680 1090 616 285 1145 733 888 849 1182 528 642 [286] 947 819 757 894 > 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]) 141 151 186 207 222 285 301 371 387 391 435 449 459 463 473 474 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 496 509 528 530 532 554 568 572 578 592 602 608 613 616 617 620 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 628 637 642 652 672 675 676 680 689 705 707 717 721 728 733 736 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 740 742 744 757 761 766 771 778 799 800 807 812 819 826 829 830 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 834 849 857 861 865 869 870 872 874 882 888 893 894 901 910 918 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 937 945 946 947 954 956 961 979 982 995 1002 1018 1035 1036 1049 1050 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1051 1054 1059 1060 1081 1090 1105 1109 1111 1112 1126 1138 1141 1143 1145 1161 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1179 1182 1186 1192 1204 1205 1206 1210 1212 1220 1222 1226 1230 1232 1241 1249 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1254 1255 1268 1272 1281 1289 1290 1314 1317 1318 1324 1335 1369 1373 1376 1381 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1383 1386 1389 1391 1401 1403 1407 1416 1417 1418 1420 1421 1424 1425 1438 1439 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1441 1451 1459 1461 1463 1468 1491 1495 1496 1499 1502 1521 1530 1544 1559 1577 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1579 1583 1587 1590 1597 1605 1606 1613 1626 1638 1639 1641 1644 1645 1654 1656 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1659 1677 1684 1688 1701 1706 1713 1731 1742 1743 1762 1764 1769 1793 1803 1812 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1831 1833 1840 1857 1882 1885 1900 1904 1926 1929 1940 1943 1944 1954 1955 1964 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1973 1982 1988 2008 2014 2035 2048 2072 2084 2099 2143 2144 2146 2147 2152 2158 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2172 2186 2187 2201 2242 2253 2269 2312 2352 2395 2429 2445 2452 2474 2515 2527 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2547 2662 2694 2699 2702 2747 2833 2845 2888 2922 2970 3004 3148 3201 3261 3352 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3373 3604 4041 4308 4691 1 1 1 1 1 > colnames(x) [1] "pageviews" "time_in_rfc" "logins" [4] "compendium_views_info" "compendium_views_pr" "shared_compendiums" [7] "blogged_computations" "compendiums_reviewed" > colnames(x)[par1] [1] "pageviews" > x[,par1] [1] 1418 869 1530 2172 901 463 3201 371 1192 1583 1439 1764 1495 1373 2187 [16] 1491 4041 1706 2152 1036 1882 1929 2242 1220 1289 2515 2147 2352 1638 1222 [31] 1812 1677 1579 1731 807 2452 829 1940 2662 186 1499 865 1793 2527 2747 [46] 1324 2702 1383 1179 2099 4308 918 1831 3373 1713 1438 496 2253 744 1161 [61] 2352 2144 4691 1112 2694 1973 1769 3148 2474 2084 1954 1226 1389 1496 2269 [76] 1833 1268 1943 893 1762 1403 1425 1857 1840 1502 1441 1420 1416 2970 1317 [91] 1644 870 1654 1054 937 3004 2008 2547 1885 1626 1468 2445 1964 1381 1369 [106] 1659 2888 1290 2845 1982 1904 1391 602 1743 1559 2014 2143 2146 874 1590 [121] 1590 1210 2072 1281 1401 834 1105 1272 1944 391 761 1605 530 1988 1386 [136] 2395 387 1742 620 449 800 1684 1050 2699 1606 1502 1204 1138 568 1459 [151] 2158 1111 1421 2833 1955 2922 1002 1060 956 2186 3604 1035 1417 3261 1587 [166] 1424 1701 1249 946 1926 3352 1641 2035 2312 1369 1577 2201 961 1900 1254 [181] 1335 1597 207 1645 2429 151 474 141 1639 872 1318 1018 1383 1314 1335 [196] 1403 910 616 1407 771 766 473 1376 1232 1521 572 1059 1544 1230 1206 [211] 1205 1255 613 721 1109 740 1126 728 689 592 995 1613 2048 705 301 [226] 1803 799 861 1186 1451 628 1161 1463 742 979 675 1241 676 1049 620 [241] 1081 1688 736 617 812 1051 1656 705 945 554 1597 982 222 1212 1143 [256] 435 532 882 608 459 578 826 509 717 637 857 830 652 707 954 [271] 1461 672 778 1141 680 1090 616 285 1145 733 888 849 1182 528 642 [286] 947 819 757 894 > 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/1hn1j1354818902.tab") + } + } > m Conditional inference tree with 17 terminal nodes Response: pageviews Inputs: time_in_rfc, logins, compendium_views_info, compendium_views_pr, shared_compendiums, blogged_computations, compendiums_reviewed Number of observations: 289 1) compendium_views_info <= 555; criterion = 1, statistic = 266.8 2) compendium_views_info <= 304; criterion = 1, statistic = 164.668 3) compendium_views_info <= 154; criterion = 1, statistic = 57.696 4)* weights = 15 3) compendium_views_info > 154 5) time_in_rfc <= 46660; criterion = 1, statistic = 27.859 6)* weights = 17 5) time_in_rfc > 46660 7) compendium_views_info <= 264; criterion = 1, statistic = 19.113 8) blogged_computations <= 32; criterion = 0.99, statistic = 10.188 9)* weights = 30 8) blogged_computations > 32 10)* weights = 9 7) compendium_views_info > 264 11)* weights = 14 2) compendium_views_info > 304 12) compendium_views_info <= 462; criterion = 1, statistic = 51.023 13) logins <= 53; criterion = 1, statistic = 21.221 14) blogged_computations <= 26; criterion = 0.995, statistic = 11.621 15)* weights = 16 14) blogged_computations > 26 16) compendium_views_pr <= 43; criterion = 0.976, statistic = 8.553 17)* weights = 9 16) compendium_views_pr > 43 18) compendium_views_info <= 398; criterion = 0.99, statistic = 10.105 19)* weights = 17 18) compendium_views_info > 398 20)* weights = 10 13) logins > 53 21)* weights = 17 12) compendium_views_info > 462 22) logins <= 58; criterion = 0.955, statistic = 7.406 23)* weights = 24 22) logins > 58 24)* weights = 15 1) compendium_views_info > 555 25) compendium_views_info <= 992; criterion = 1, statistic = 76.433 26) compendium_views_info <= 818; criterion = 1, statistic = 51.209 27) compendium_views_info <= 711; criterion = 0.999, statistic = 14.803 28)* weights = 42 27) compendium_views_info > 711 29)* weights = 14 26) compendium_views_info > 818 30) logins <= 89; criterion = 0.975, statistic = 8.475 31)* weights = 13 30) logins > 89 32)* weights = 12 25) compendium_views_info > 992 33)* weights = 15 > postscript(file="/var/fisher/rcomp/tmp/22cbo1354818902.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/3b9kz1354818902.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 1418 1353.1765 64.8235294 2 869 928.7143 -59.7142857 3 1530 1765.5952 -235.5952381 4 2172 2226.4615 -54.4615385 5 901 928.7143 -27.7142857 6 463 343.6000 119.4000000 7 3201 3353.3333 -152.3333333 8 371 343.6000 27.4000000 9 1192 1353.1765 -161.1764706 10 1583 1765.5952 -182.5952381 11 1439 1414.0833 24.9166667 12 1764 1765.5952 -1.5952381 13 1495 1568.4000 -73.4000000 14 1373 1414.0833 -41.0833333 15 2187 2226.4615 -39.4615385 16 1491 1568.4000 -77.4000000 17 4041 3353.3333 687.6666667 18 1706 1765.5952 -59.5952381 19 2152 2553.4167 -401.4166667 20 1036 1068.4444 -32.4444444 21 1882 1765.5952 116.4047619 22 1929 1765.5952 163.4047619 23 2242 2226.4615 15.5384615 24 1220 1168.4706 51.5294118 25 1289 1360.7000 -71.7000000 26 2515 2553.4167 -38.4166667 27 2147 2045.9286 101.0714286 28 2352 2553.4167 -201.4166667 29 1638 1568.4000 69.6000000 30 1222 1414.0833 -192.0833333 31 1812 1765.5952 46.4047619 32 1677 1765.5952 -88.5952381 33 1579 1568.4000 10.6000000 34 1731 1765.5952 -34.5952381 35 807 830.5556 -23.5555556 36 2452 2226.4615 225.5384615 37 829 711.3000 117.7000000 38 1940 2045.9286 -105.9285714 39 2662 2553.4167 108.5833333 40 186 343.6000 -157.6000000 41 1499 1568.4000 -69.4000000 42 865 830.5556 34.4444444 43 1793 1568.4000 224.6000000 44 2527 2553.4167 -26.4166667 45 2747 3353.3333 -606.3333333 46 1324 1414.0833 -90.0833333 47 2702 2553.4167 148.5833333 48 1383 1414.0833 -31.0833333 49 1179 1168.4706 10.5294118 50 2099 2226.4615 -127.4615385 51 4308 3353.3333 954.6666667 52 918 1022.3750 -104.3750000 53 1831 1765.5952 65.4047619 54 3373 3353.3333 19.6666667 55 1713 2045.9286 -332.9285714 56 1438 1353.1765 84.8235294 57 496 580.6471 -84.6470588 58 2253 2045.9286 207.0714286 59 744 711.3000 32.7000000 60 1161 1353.1765 -192.1764706 61 2352 2226.4615 125.5384615 62 2144 1765.5952 378.4047619 63 4691 3353.3333 1337.6666667 64 1112 1168.4706 -56.4705882 65 2694 2553.4167 140.5833333 66 1973 2045.9286 -72.9285714 67 1769 1765.5952 3.4047619 68 3148 3353.3333 -205.3333333 69 2474 2553.4167 -79.4166667 70 2084 2226.4615 -142.4615385 71 1954 1765.5952 188.4047619 72 1226 1414.0833 -188.0833333 73 1389 1168.4706 220.5294118 74 1496 1568.4000 -72.4000000 75 2269 2045.9286 223.0714286 76 1833 1765.5952 67.4047619 77 1268 1360.7000 -92.7000000 78 1943 1765.5952 177.4047619 79 893 1022.3750 -129.3750000 80 1762 1765.5952 -3.5952381 81 1403 1765.5952 -362.5952381 82 1425 1414.0833 10.9166667 83 1857 2045.9286 -188.9285714 84 1840 2045.9286 -205.9285714 85 1502 1353.1765 148.8235294 86 1441 1360.7000 80.3000000 87 1420 1414.0833 5.9166667 88 1416 1414.0833 1.9166667 89 2970 3353.3333 -383.3333333 90 1317 1765.5952 -448.5952381 91 1644 1568.4000 75.6000000 92 870 1068.4444 -198.4444444 93 1654 1765.5952 -111.5952381 94 1054 928.7143 125.2857143 95 937 830.5556 106.4444444 96 3004 3353.3333 -349.3333333 97 2008 2045.9286 -37.9285714 98 2547 2553.4167 -6.4166667 99 1885 1765.5952 119.4047619 100 1626 1568.4000 57.6000000 101 1468 1414.0833 53.9166667 102 2445 2226.4615 218.5384615 103 1964 2045.9286 -81.9285714 104 1381 1414.0833 -33.0833333 105 1369 1414.0833 -45.0833333 106 1659 1765.5952 -106.5952381 107 2888 2553.4167 334.5833333 108 1290 1168.4706 121.5294118 109 2845 3353.3333 -508.3333333 110 1982 1765.5952 216.4047619 111 1904 1765.5952 138.4047619 112 1391 1353.1765 37.8235294 113 602 580.6471 21.3529412 114 1743 1765.5952 -22.5952381 115 1559 1765.5952 -206.5952381 116 2014 2226.4615 -212.4615385 117 2143 2226.4615 -83.4615385 118 2146 2045.9286 100.0714286 119 874 928.7143 -54.7142857 120 1590 1568.4000 21.6000000 121 1590 1414.0833 175.9166667 122 1210 1353.1765 -143.1764706 123 2072 1765.5952 306.4047619 124 1281 1353.1765 -72.1764706 125 1401 1414.0833 -13.0833333 126 834 711.3000 122.7000000 127 1105 1168.4706 -63.4705882 128 1272 1168.4706 103.5294118 129 1944 1765.5952 178.4047619 130 391 343.6000 47.4000000 131 761 580.6471 180.3529412 132 1605 1765.5952 -160.5952381 133 530 711.3000 -181.3000000 134 1988 1765.5952 222.4047619 135 1386 1360.7000 25.3000000 136 2395 2226.4615 168.5384615 137 387 343.6000 43.4000000 138 1742 1765.5952 -23.5952381 139 620 580.6471 39.3529412 140 449 580.6471 -131.6470588 141 800 928.7143 -128.7142857 142 1684 1568.4000 115.6000000 143 1050 1022.3750 27.6250000 144 2699 2553.4167 145.5833333 145 1606 1414.0833 191.9166667 146 1502 1360.7000 141.3000000 147 1204 1353.1765 -149.1764706 148 1138 1022.3750 115.6250000 149 568 580.6471 -12.6470588 150 1459 1414.0833 44.9166667 151 2158 2226.4615 -68.4615385 152 1111 1168.4706 -57.4705882 153 1421 1568.4000 -147.4000000 154 2833 3353.3333 -520.3333333 155 1955 1765.5952 189.4047619 156 2922 3353.3333 -431.3333333 157 1002 1068.4444 -66.4444444 158 1060 1022.3750 37.6250000 159 956 1068.4444 -112.4444444 160 2186 2045.9286 140.0714286 161 3604 3353.3333 250.6666667 162 1035 1022.3750 12.6250000 163 1417 1353.1765 63.8235294 164 3261 3353.3333 -92.3333333 165 1587 1765.5952 -178.5952381 166 1424 1414.0833 9.9166667 167 1701 1765.5952 -64.5952381 168 1249 1353.1765 -104.1764706 169 946 830.5556 115.4444444 170 1926 1765.5952 160.4047619 171 3352 3353.3333 -1.3333333 172 1641 1765.5952 -124.5952381 173 2035 2045.9286 -10.9285714 174 2312 2045.9286 266.0714286 175 1369 1414.0833 -45.0833333 176 1577 1765.5952 -188.5952381 177 2201 2226.4615 -25.4615385 178 961 1022.3750 -61.3750000 179 1900 1765.5952 134.4047619 180 1254 1360.7000 -106.7000000 181 1335 1353.1765 -18.1764706 182 1597 1568.4000 28.6000000 183 207 343.6000 -136.6000000 184 1645 1765.5952 -120.5952381 185 2429 2553.4167 -124.4166667 186 151 343.6000 -192.6000000 187 474 580.6471 -106.6470588 188 141 343.6000 -202.6000000 189 1639 1414.0833 224.9166667 190 872 830.5556 41.4444444 191 1318 1068.4444 249.5555556 192 1018 1022.3750 -4.3750000 193 1383 1360.7000 22.3000000 194 1314 928.7143 385.2857143 195 1335 1414.0833 -79.0833333 196 1403 1360.7000 42.3000000 197 910 1022.3750 -112.3750000 198 616 711.3000 -95.3000000 199 1407 1414.0833 -7.0833333 200 771 711.3000 59.7000000 201 766 711.3000 54.7000000 202 473 343.6000 129.4000000 203 1376 1568.4000 -192.4000000 204 1232 1353.1765 -121.1764706 205 1521 1765.5952 -244.5952381 206 572 580.6471 -8.6470588 207 1059 928.7143 130.2857143 208 1544 1765.5952 -221.5952381 209 1230 1360.7000 -130.7000000 210 1206 1068.4444 137.5555556 211 1205 1168.4706 36.5294118 212 1255 1168.4706 86.5294118 213 613 711.3000 -98.3000000 214 721 711.3000 9.7000000 215 1109 1022.3750 86.6250000 216 740 711.3000 28.7000000 217 1126 1022.3750 103.6250000 218 728 711.3000 16.7000000 219 689 711.3000 -22.3000000 220 592 711.3000 -119.3000000 221 995 1068.4444 -73.4444444 222 1613 1353.1765 259.8235294 223 2048 1765.5952 282.4047619 224 705 711.3000 -6.3000000 225 301 343.6000 -42.6000000 226 1803 1765.5952 37.4047619 227 799 711.3000 87.7000000 228 861 928.7143 -67.7142857 229 1186 1168.4706 17.5294118 230 1451 1360.7000 90.3000000 231 628 580.6471 47.3529412 232 1161 1168.4706 -7.4705882 233 1463 1414.0833 48.9166667 234 742 711.3000 30.7000000 235 979 1022.3750 -43.3750000 236 675 830.5556 -155.5555556 237 1241 1022.3750 218.6250000 238 676 580.6471 95.3529412 239 1049 1168.4706 -119.4705882 240 620 580.6471 39.3529412 241 1081 1022.3750 58.6250000 242 1688 1353.1765 334.8235294 243 736 711.3000 24.7000000 244 617 711.3000 -94.3000000 245 812 928.7143 -116.7142857 246 1051 1068.4444 -17.4444444 247 1656 1414.0833 241.9166667 248 705 711.3000 -6.3000000 249 945 1022.3750 -77.3750000 250 554 580.6471 -26.6470588 251 1597 1568.4000 28.6000000 252 982 928.7143 53.2857143 253 222 343.6000 -121.6000000 254 1212 1353.1765 -141.1764706 255 1143 1414.0833 -271.0833333 256 435 580.6471 -145.6470588 257 532 580.6471 -48.6470588 258 882 928.7143 -46.7142857 259 608 343.6000 264.4000000 260 459 343.6000 115.4000000 261 578 580.6471 -2.6470588 262 826 830.5556 -4.5555556 263 509 343.6000 165.4000000 264 717 830.5556 -113.5555556 265 637 711.3000 -74.3000000 266 857 928.7143 -71.7142857 267 830 830.5556 -0.5555556 268 652 711.3000 -59.3000000 269 707 711.3000 -4.3000000 270 954 1168.4706 -214.4705882 271 1461 1353.1765 107.8235294 272 672 711.3000 -39.3000000 273 778 580.6471 197.3529412 274 1141 1168.4706 -27.4705882 275 680 711.3000 -31.3000000 276 1090 1168.4706 -78.4705882 277 616 711.3000 -95.3000000 278 285 343.6000 -58.6000000 279 1145 1168.4706 -23.4705882 280 733 711.3000 21.7000000 281 888 928.7143 -40.7142857 282 849 928.7143 -79.7142857 283 1182 1068.4444 113.5555556 284 528 580.6471 -52.6470588 285 642 711.3000 -69.3000000 286 947 711.3000 235.7000000 287 819 711.3000 107.7000000 288 757 711.3000 45.7000000 289 894 1022.3750 -128.3750000 > 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/4sdu31354818902.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/5e9sh1354818902.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/6atkh1354818902.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/73wsh1354818902.tab") + } > > try(system("convert tmp/22cbo1354818902.ps tmp/22cbo1354818902.png",intern=TRUE)) character(0) > try(system("convert tmp/3b9kz1354818902.ps tmp/3b9kz1354818902.png",intern=TRUE)) character(0) > try(system("convert tmp/4sdu31354818902.ps tmp/4sdu31354818902.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.648 0.677 10.312